Package com.axemble.vdoc.sdk.impl
Class ProcessResourceTransformer
java.lang.Object
com.axemble.vdoc.sdk.impl.AbstractElement
com.axemble.vdoc.sdk.impl.base.BaseTransformer
com.axemble.vdoc.sdk.impl.ProcessResourceTransformer
- All Implemented Interfaces:
com.axemble.vdoc.core.helpers.transformer.InternalResourceTransformer,ITransformer,Serializable
public class ProcessResourceTransformer
extends com.axemble.vdoc.sdk.impl.base.BaseTransformer
implements ITransformer, com.axemble.vdoc.core.helpers.transformer.InternalResourceTransformer
- Author:
- vlygeros
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IDirectoryModuleprotected booleanprotected ILibraryModulestatic final Stringprotected com.axemble.vdp.resource.classes.ResourceProtocolURICacheprotected com.axemble.vdoc.core.helpers.TransformerHelperFields inherited from class com.axemble.vdoc.sdk.impl.AbstractElement
module -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildXMLBody(Element parent, IResource resource, Collection columns) voidvoidbuildXMLBody(Element parent, IResource resource, Map<String, String> labels, boolean includeWorkflowInstanceBody) voidbuildXMLHeader(Element parent, IResource resource) voidbuildXMLHistory(Element parent, IResource resource) protected static StringdateToString(Date date) protected IDirectoryModulecom.axemble.vdp.resource.classes.ResourceProtocolURICacheprotected StringgetResourceInterface(IResource resource) voidimportHistory(IResource childResource, Element fieldElement) protected Stringprotected static DatevoidresourceToXML(IResource resource, OutputStream outputStream) Allows to transform aIResourceobject to an XML document.voidresourceToXML(IResource resource, OutputStream outputStream, boolean includeAttachmentsContent, boolean includeWorkflowInstanceBody) Allows to transform aIResourceobject to an XML document.voidresourceToXML(IResource resource, OutputStream outputStream, File attachmentsFolder) Allows to transform aIResourceobject to an XML document.voidresourceToXML(IResource resource, OutputStream outputStream, File attachmentsFolder, boolean includeAttachmentsContent) Allows to transform aIResourceobject to an XML document.voidresourceToXML(IResource resource, OutputStream outputStream, File attachmentsFolder, boolean includeAttachmentsContent, boolean includeWorkflowInstanceBody) voidresourceToXML(IResource resource, Collection columns, OutputStream outputStream) Allows to get values of a resource by specifying the columns to retrieve.voidsetIncludeAttachmentsContent(boolean includeAttachmentsContent) Allows to include or not the files content.voidsetIncludeLabels(boolean includeLabels) Allows to include or not the labels.voidsetIncludeLinkedResources(boolean includeLinkedResources) Allows to include or notILinkedResourceobjects.voidsetIncludeLinkedWorkflowInstances(boolean includeLinkedWorkflowInstances) Allows to include or not linkedIWorkflowInstanceobjects.voidsetIncludeStorageResources(boolean includeStorageResources) Allows to include or notIStorageResourceobjects.voidsetProtocolURICache(com.axemble.vdp.resource.classes.ResourceProtocolURICache protocolURICache) voidsetStopExecutionOnCriticalError(boolean stopExecutionOnCriticalError) Allows to stop the execution of the treatment if an exception occur.voiduseGuid(boolean generateGuid) Allows to specify whether to use generate a Guid or not.xmlToResource(IResource resource, InputStream inputStream) Updates a resource.xmlToResource(InputStream inputStream) Import a resource from an XML stream.xmlToResource(InputStream inputStream, File resourceFolder) Import a resource from an XML stream.Methods inherited from class com.axemble.vdoc.sdk.impl.base.BaseTransformer
resourceToXML, resourceToXMLMethods inherited from class com.axemble.vdoc.sdk.impl.AbstractElement
getModuleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.axemble.vdoc.sdk.interfaces.ITransformer
resourceToXML, resourceToXML
-
Field Details
-
prefix
- See Also:
-
directoryModule
-
libraryModule
-
includeLabels
protected boolean includeLabels -
transformerHelper
protected com.axemble.vdoc.core.helpers.TransformerHelper transformerHelper -
protocolURICache
protected com.axemble.vdp.resource.classes.ResourceProtocolURICache protocolURICache
-
-
Constructor Details
-
ProcessResourceTransformer
-
-
Method Details
-
importHistory
public void importHistory(IResource childResource, Element fieldElement) throws WorkflowModuleException - Specified by:
importHistoryin interfacecom.axemble.vdoc.core.helpers.transformer.InternalResourceTransformer- Throws:
WorkflowModuleException
-
xmlToResource
Description copied from interface:ITransformerImport a resource from an XML stream.- Specified by:
xmlToResourcein interfaceITransformer- Parameters:
inputStream- TheInputStreamobject to read from.resourceFolder- The directory from where to import the attachments.- Returns:
- A
IResourceobject. - Throws:
IOException
-
xmlToResource
Description copied from interface:ITransformerImport a resource from an XML stream.- Specified by:
xmlToResourcein interfaceITransformer- Parameters:
inputStream- TheInputStreamobject to read from.- Returns:
- A
IResourceobject. - Throws:
IOException
-
xmlToResource
Description copied from interface:ITransformerUpdates a resource.- Specified by:
xmlToResourcein interfaceITransformer- Parameters:
resource- TheIResourceto update.inputStream- TheInputStreamobject to read from.- Returns:
- A
IResourceobject. - Throws:
IOException
-
getResourceInterface
-
resourceToXML
public void resourceToXML(IResource resource, OutputStream outputStream, File attachmentsFolder, boolean includeAttachmentsContent) throws IOException Description copied from interface:ITransformerAllows to transform aIResourceobject to an XML document.- Specified by:
resourceToXMLin interfaceITransformer- Specified by:
resourceToXMLin classcom.axemble.vdoc.sdk.impl.base.BaseTransformer- Parameters:
resource- TheIResourceto transform.outputStream- TheOutputStreamobject to write to.attachmentsFolder- The directory where to export the attachments.includeAttachmentsContent- If true, includes the attachments into the XML stream.- Throws:
IOException
-
resourceToXML
public void resourceToXML(IResource resource, OutputStream outputStream, boolean includeAttachmentsContent, boolean includeWorkflowInstanceBody) throws IOException Description copied from interface:ITransformerAllows to transform aIResourceobject to an XML document.- Specified by:
resourceToXMLin interfaceITransformer- Overrides:
resourceToXMLin classcom.axemble.vdoc.sdk.impl.base.BaseTransformer- Parameters:
resource- TheIResourceto transform.outputStream- TheOutputStreamobject to write to.includeAttachmentsContent- If true, includes the attachments into the XML stream.- Throws:
IOException
-
resourceToXML
public void resourceToXML(IResource resource, OutputStream outputStream, File attachmentsFolder, boolean includeAttachmentsContent, boolean includeWorkflowInstanceBody) throws IOException - Overrides:
resourceToXMLin classcom.axemble.vdoc.sdk.impl.base.BaseTransformer- Throws:
IOException
-
resourceToXML
public void resourceToXML(IResource resource, OutputStream outputStream, File attachmentsFolder) throws IOException Description copied from interface:ITransformerAllows to transform aIResourceobject to an XML document.- Specified by:
resourceToXMLin interfaceITransformer- Overrides:
resourceToXMLin classcom.axemble.vdoc.sdk.impl.base.BaseTransformer- Parameters:
resource- TheIResourceto transform.outputStream- TheOutputStreamobject to write to.attachmentsFolder- The directory where to export the attachments.- Throws:
IOException
-
resourceToXML
Description copied from interface:ITransformerAllows to transform aIResourceobject to an XML document.- Specified by:
resourceToXMLin interfaceITransformer- Overrides:
resourceToXMLin classcom.axemble.vdoc.sdk.impl.base.BaseTransformer- Parameters:
resource- TheIResourceto transform.outputStream- TheOutputStreamobject to write to.- Throws:
IOException
-
buildXMLHeader
- Specified by:
buildXMLHeaderin interfacecom.axemble.vdoc.core.helpers.transformer.InternalResourceTransformer- Throws:
Exception
-
buildXMLHistory
- Specified by:
buildXMLHistoryin interfacecom.axemble.vdoc.core.helpers.transformer.InternalResourceTransformer
-
buildXMLBody
- Throws:
Exception
-
buildXMLBody
public void buildXMLBody(Element parent, IResource resource, Map<String, String> labels) throws Exception- Specified by:
buildXMLBodyin interfacecom.axemble.vdoc.core.helpers.transformer.InternalResourceTransformer- Throws:
Exception
-
buildXMLBody
public void buildXMLBody(Element parent, IResource resource, Map<String, String> labels, boolean includeWorkflowInstanceBody) throws Exception- Specified by:
buildXMLBodyin interfacecom.axemble.vdoc.core.helpers.transformer.InternalResourceTransformer- Throws:
Exception
-
dateToString
-
parseDate
-
notNull
-
getDirectoryModule
-
resourceToXML
public void resourceToXML(IResource resource, Collection columns, OutputStream outputStream) throws IOException Description copied from interface:ITransformerAllows to get values of a resource by specifying the columns to retrieve.- Specified by:
resourceToXMLin interfaceITransformer- Parameters:
resource- TheIResourceobject to request property values from.columns- ACollectionof property names.outputStream- TheOutputStreamobject to write to.- Throws:
IOException
-
setIncludeAttachmentsContent
public void setIncludeAttachmentsContent(boolean includeAttachmentsContent) Description copied from interface:ITransformerAllows to include or not the files content. By default, the value is set to true.- Specified by:
setIncludeAttachmentsContentin interfaceITransformer- Parameters:
includeAttachmentsContent- Set to false to avoid file content inclusion.
-
setIncludeLabels
public void setIncludeLabels(boolean includeLabels) Description copied from interface:ITransformerAllows to include or not the labels. By default, the value is set to true.- Specified by:
setIncludeLabelsin interfaceITransformer- Parameters:
includeLabels- Set to false to avoid labels inclusion.
-
setIncludeLinkedResources
public void setIncludeLinkedResources(boolean includeLinkedResources) Description copied from interface:ITransformerAllows to include or notILinkedResourceobjects. By default, the value is set to true.- Specified by:
setIncludeLinkedResourcesin interfaceITransformer- Parameters:
includeLinkedResources- Set to false to avoid linked resources inclusion.
-
setIncludeLinkedWorkflowInstances
public void setIncludeLinkedWorkflowInstances(boolean includeLinkedWorkflowInstances) Description copied from interface:ITransformerAllows to include or not linkedIWorkflowInstanceobjects. By default, the value is set to true.- Specified by:
setIncludeLinkedWorkflowInstancesin interfaceITransformer- Parameters:
includeLinkedWorkflowInstances- Set to false to avoid linked workflow instances inclusion.
-
getProtocolURICache
public com.axemble.vdp.resource.classes.ResourceProtocolURICache getProtocolURICache() -
setProtocolURICache
public void setProtocolURICache(com.axemble.vdp.resource.classes.ResourceProtocolURICache protocolURICache) -
useGuid
public void useGuid(boolean generateGuid) Description copied from interface:ITransformerAllows to specify whether to use generate a Guid or not.- Specified by:
useGuidin interfaceITransformer- Parameters:
generateGuid-
-
setIncludeStorageResources
public void setIncludeStorageResources(boolean includeStorageResources) Description copied from interface:ITransformerAllows to include or notIStorageResourceobjects. By default, the value is set to false.- Specified by:
setIncludeStorageResourcesin interfacecom.axemble.vdoc.core.helpers.transformer.InternalResourceTransformer- Specified by:
setIncludeStorageResourcesin interfaceITransformer- Parameters:
includeStorageResources- Set to true to allow storage resources inclusion.
-
setStopExecutionOnCriticalError
public void setStopExecutionOnCriticalError(boolean stopExecutionOnCriticalError) Description copied from interface:ITransformerAllows to stop the execution of the treatment if an exception occur. By default, the value is set to false.- Specified by:
setStopExecutionOnCriticalErrorin interfaceITransformer- Parameters:
stopExecutionOnCriticalError- Set to true to stop the execution of the treatment if an exception occure.
-