org.kuali.rice.kew.edl.service.impl
Class EDocLiteServiceImpl

java.lang.Object
  extended by org.kuali.rice.kew.edl.service.impl.EDocLiteServiceImpl
All Implemented Interfaces:
EDocLiteService, XmlExporter, XmlLoader

public class EDocLiteServiceImpl
extends Object
implements EDocLiteService

DAO-based EDocLiteService implementation

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
private  EDocLiteDAO dao
          The Spring-wired DAO bean
private  EDLGlobalConfig edlGlobalConfig
           
private static org.apache.log4j.Logger LOG
           
private  StyleService styleService
          Spring wired StyleService bean
 
Constructor Summary
EDocLiteServiceImpl()
           
 
Method Summary
 org.jdom.Element export(ExportDataSet dataSet)
           
private static WorkflowServiceErrorException generateException(String error, Throwable cause)
           
private static WorkflowServiceErrorException generateMissingAttribException(String element, String attrib)
           
private static WorkflowServiceErrorException generateMissingChildException(String element, String child)
           
private static WorkflowServiceErrorException generateSerializationException(String element, TransformerException cause)
           
 Document getDefinitionXml(EDocLiteAssociation edlAssociation)
           
 EDLController getEDLController(Long documentId)
           
 EDLController getEDLController(String edlName)
           
 EDocLiteAssociation getEDocLiteAssociation(Long associationId)
           
 EDocLiteAssociation getEDocLiteAssociation(String docTypeName)
           
 List getEDocLiteAssociations()
           
 EDocLiteDefinition getEDocLiteDefinition(String definitionName)
           
 List getEDocLiteDefinitions()
           
 EDocLiteStyle getEDocLiteStyle(String styleName)
           
 List<String> getEDocLiteStyles()
           
 Templates getStyleAsTranslet(String name)
           
 void initEDLGlobalConfig()
           
 void loadXml(InputStream inputStream, String principalId)
           
private static Document parse(InputStream stream)
          Parses an arbitrary XML stream
private static EDocLiteAssociation parseEDocLiteAssociation(Element e)
          Parses an EDocLiteAssocation
private static EDocLiteDefinition parseEDocLiteDefinition(Element e)
          Parses an EDocLiteDefinition
 void removeDefinitionFromCache(String defName)
           
 void removeStyleFromCache(String styleName)
           
 void saveEDocLiteAssociation(EDocLiteAssociation assoc)
           
 void saveEDocLiteAssociation(InputStream xml)
           
 void saveEDocLiteDefinition(EDocLiteDefinition data)
           
 void saveEDocLiteDefinition(InputStream xml)
           
 void saveEDocLiteStyle(EDocLiteStyle data)
           
 void saveEDocLiteStyle(InputStream xml)
           
 List search(EDocLiteAssociation edocLite)
           
 void setEDocLiteDAO(EDocLiteDAO dao)
           
 void setStyleService(StyleService styleService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final org.apache.log4j.Logger LOG

edlGlobalConfig

private EDLGlobalConfig edlGlobalConfig

dao

private EDocLiteDAO dao
The Spring-wired DAO bean


styleService

private StyleService styleService
Spring wired StyleService bean

Constructor Detail

EDocLiteServiceImpl

public EDocLiteServiceImpl()
Method Detail

setEDocLiteDAO

public void setEDocLiteDAO(EDocLiteDAO dao)

setStyleService

public void setStyleService(StyleService styleService)

getEDLController

public EDLController getEDLController(String edlName)
Specified by:
getEDLController in interface EDocLiteService

getEDLController

public EDLController getEDLController(Long documentId)
Specified by:
getEDLController in interface EDocLiteService

initEDLGlobalConfig

public void initEDLGlobalConfig()
Specified by:
initEDLGlobalConfig in interface EDocLiteService

getDefinitionXml

public Document getDefinitionXml(EDocLiteAssociation edlAssociation)
Specified by:
getDefinitionXml in interface EDocLiteService

generateException

private static WorkflowServiceErrorException generateException(String error,
                                                               Throwable cause)

generateMissingAttribException

private static WorkflowServiceErrorException generateMissingAttribException(String element,
                                                                            String attrib)

generateMissingChildException

private static WorkflowServiceErrorException generateMissingChildException(String element,
                                                                           String child)

generateSerializationException

private static WorkflowServiceErrorException generateSerializationException(String element,
                                                                            TransformerException cause)

parse

private static Document parse(InputStream stream)
Parses an arbitrary XML stream

Parameters:
stream - stream containing XML doc content
Returns:
parsed Document object

parseEDocLiteAssociation

private static EDocLiteAssociation parseEDocLiteAssociation(Element e)
Parses an EDocLiteAssocation

Parameters:
e - element to parse
Returns:
an EDocLiteAssocation

parseEDocLiteDefinition

private static EDocLiteDefinition parseEDocLiteDefinition(Element e)
Parses an EDocLiteDefinition

Parameters:
e - element to parse
Returns:
an EDocLiteDefinition

saveEDocLiteStyle

public void saveEDocLiteStyle(EDocLiteStyle data)
Specified by:
saveEDocLiteStyle in interface EDocLiteService

saveEDocLiteDefinition

public void saveEDocLiteDefinition(EDocLiteDefinition data)
Specified by:
saveEDocLiteDefinition in interface EDocLiteService

saveEDocLiteAssociation

public void saveEDocLiteAssociation(EDocLiteAssociation assoc)
Specified by:
saveEDocLiteAssociation in interface EDocLiteService

saveEDocLiteStyle

public void saveEDocLiteStyle(InputStream xml)
Specified by:
saveEDocLiteStyle in interface EDocLiteService

saveEDocLiteDefinition

public void saveEDocLiteDefinition(InputStream xml)
Specified by:
saveEDocLiteDefinition in interface EDocLiteService

saveEDocLiteAssociation

public void saveEDocLiteAssociation(InputStream xml)
Specified by:
saveEDocLiteAssociation in interface EDocLiteService

getEDocLiteStyle

public EDocLiteStyle getEDocLiteStyle(String styleName)
Specified by:
getEDocLiteStyle in interface EDocLiteService

getEDocLiteDefinition

public EDocLiteDefinition getEDocLiteDefinition(String definitionName)
Specified by:
getEDocLiteDefinition in interface EDocLiteService

getEDocLiteAssociation

public EDocLiteAssociation getEDocLiteAssociation(String docTypeName)
Specified by:
getEDocLiteAssociation in interface EDocLiteService

getEDocLiteStyles

public List<String> getEDocLiteStyles()
Specified by:
getEDocLiteStyles in interface EDocLiteService

getEDocLiteDefinitions

public List getEDocLiteDefinitions()
Specified by:
getEDocLiteDefinitions in interface EDocLiteService

getEDocLiteAssociations

public List getEDocLiteAssociations()
Specified by:
getEDocLiteAssociations in interface EDocLiteService

getStyleAsTranslet

public Templates getStyleAsTranslet(String name)
                             throws TransformerConfigurationException
Specified by:
getStyleAsTranslet in interface EDocLiteService
Throws:
TransformerConfigurationException

removeStyleFromCache

public void removeStyleFromCache(String styleName)
Specified by:
removeStyleFromCache in interface EDocLiteService

removeDefinitionFromCache

public void removeDefinitionFromCache(String defName)
Specified by:
removeDefinitionFromCache in interface EDocLiteService

search

public List search(EDocLiteAssociation edocLite)
Specified by:
search in interface EDocLiteService

getEDocLiteAssociation

public EDocLiteAssociation getEDocLiteAssociation(Long associationId)
Specified by:
getEDocLiteAssociation in interface EDocLiteService

loadXml

public void loadXml(InputStream inputStream,
                    String principalId)
Specified by:
loadXml in interface XmlLoader

export

public org.jdom.Element export(ExportDataSet dataSet)
Specified by:
export in interface XmlExporter


Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.