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 SummaryFieldsModifier 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.AbstractElementmodule
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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.BaseTransformerresourceToXML, resourceToXMLMethods inherited from class com.axemble.vdoc.sdk.impl.AbstractElementgetModuleMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.axemble.vdoc.sdk.interfaces.ITransformerresourceToXML, resourceToXML
- 
Field Details- 
prefix- See Also:
 
- 
directoryModule
- 
libraryModule
- 
includeLabelsprotected boolean includeLabels
- 
transformerHelperprotected com.axemble.vdoc.core.helpers.TransformerHelper transformerHelper
- 
protocolURICacheprotected com.axemble.vdp.resource.classes.ResourceProtocolURICache protocolURICache
 
- 
- 
Constructor Details- 
ProcessResourceTransformer
 
- 
- 
Method Details- 
importHistorypublic void importHistory(IResource childResource, Element fieldElement) throws WorkflowModuleException - Specified by:
- importHistoryin interface- com.axemble.vdoc.core.helpers.transformer.InternalResourceTransformer
- Throws:
- WorkflowModuleException
 
- 
xmlToResourceDescription copied from interface:ITransformerImport a resource from an XML stream.- Specified by:
- xmlToResourcein interface- ITransformer
- Parameters:
- inputStream- The- InputStreamobject to read from.
- resourceFolder- The directory from where to import the attachments.
- Returns:
- A IResourceobject.
- Throws:
- IOException
 
- 
xmlToResourceDescription copied from interface:ITransformerImport a resource from an XML stream.- Specified by:
- xmlToResourcein interface- ITransformer
- Parameters:
- inputStream- The- InputStreamobject to read from.
- Returns:
- A IResourceobject.
- Throws:
- IOException
 
- 
xmlToResourceDescription copied from interface:ITransformerUpdates a resource.- Specified by:
- xmlToResourcein interface- ITransformer
- Parameters:
- resource- The- IResourceto update.
- inputStream- The- InputStreamobject to read from.
- Returns:
- A IResourceobject.
- Throws:
- IOException
 
- 
getResourceInterface
- 
resourceToXMLpublic 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 interface- ITransformer
- Specified by:
- resourceToXMLin class- com.axemble.vdoc.sdk.impl.base.BaseTransformer
- Parameters:
- resource- The- IResourceto transform.
- outputStream- The- OutputStreamobject to write to.
- attachmentsFolder- The directory where to export the attachments.
- includeAttachmentsContent- If true, includes the attachments into the XML stream.
- Throws:
- IOException
 
- 
resourceToXMLpublic 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 interface- ITransformer
- Overrides:
- resourceToXMLin class- com.axemble.vdoc.sdk.impl.base.BaseTransformer
- Parameters:
- resource- The- IResourceto transform.
- outputStream- The- OutputStreamobject to write to.
- includeAttachmentsContent- If true, includes the attachments into the XML stream.
- Throws:
- IOException
 
- 
resourceToXMLpublic void resourceToXML(IResource resource, OutputStream outputStream, File attachmentsFolder, boolean includeAttachmentsContent, boolean includeWorkflowInstanceBody) throws IOException - Overrides:
- resourceToXMLin class- com.axemble.vdoc.sdk.impl.base.BaseTransformer
- Throws:
- IOException
 
- 
resourceToXMLpublic 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 interface- ITransformer
- Overrides:
- resourceToXMLin class- com.axemble.vdoc.sdk.impl.base.BaseTransformer
- Parameters:
- resource- The- IResourceto transform.
- outputStream- The- OutputStreamobject to write to.
- attachmentsFolder- The directory where to export the attachments.
- Throws:
- IOException
 
- 
resourceToXMLDescription copied from interface:ITransformerAllows to transform aIResourceobject to an XML document.- Specified by:
- resourceToXMLin interface- ITransformer
- Overrides:
- resourceToXMLin class- com.axemble.vdoc.sdk.impl.base.BaseTransformer
- Parameters:
- resource- The- IResourceto transform.
- outputStream- The- OutputStreamobject to write to.
- Throws:
- IOException
 
- 
buildXMLHeader- Specified by:
- buildXMLHeaderin interface- com.axemble.vdoc.core.helpers.transformer.InternalResourceTransformer
- Throws:
- Exception
 
- 
buildXMLHistory- Specified by:
- buildXMLHistoryin interface- com.axemble.vdoc.core.helpers.transformer.InternalResourceTransformer
 
- 
buildXMLBody- Throws:
- Exception
 
- 
buildXMLBodypublic void buildXMLBody(Element parent, IResource resource, Map<String, String> labels) throws Exception- Specified by:
- buildXMLBodyin interface- com.axemble.vdoc.core.helpers.transformer.InternalResourceTransformer
- Throws:
- Exception
 
- 
buildXMLBodypublic void buildXMLBody(Element parent, IResource resource, Map<String, String> labels, boolean includeWorkflowInstanceBody) throws Exception- Specified by:
- buildXMLBodyin interface- com.axemble.vdoc.core.helpers.transformer.InternalResourceTransformer
- Throws:
- Exception
 
- 
dateToString
- 
parseDate
- 
notNull
- 
getDirectoryModule
- 
resourceToXMLpublic 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 interface- ITransformer
- Parameters:
- resource- The- IResourceobject to request property values from.
- columns- A- Collectionof property names.
- outputStream- The- OutputStreamobject to write to.
- Throws:
- IOException
 
- 
setIncludeAttachmentsContentpublic 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 interface- ITransformer
- Parameters:
- includeAttachmentsContent- Set to false to avoid file content inclusion.
 
- 
setIncludeLabelspublic 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 interface- ITransformer
- Parameters:
- includeLabels- Set to false to avoid labels inclusion.
 
- 
setIncludeLinkedResourcespublic void setIncludeLinkedResources(boolean includeLinkedResources) Description copied from interface:ITransformerAllows to include or notILinkedResourceobjects. By default, the value is set to true.- Specified by:
- setIncludeLinkedResourcesin interface- ITransformer
- Parameters:
- includeLinkedResources- Set to false to avoid linked resources inclusion.
 
- 
setIncludeLinkedWorkflowInstancespublic 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 interface- ITransformer
- Parameters:
- includeLinkedWorkflowInstances- Set to false to avoid linked workflow instances inclusion.
 
- 
getProtocolURICachepublic com.axemble.vdp.resource.classes.ResourceProtocolURICache getProtocolURICache()
- 
setProtocolURICachepublic void setProtocolURICache(com.axemble.vdp.resource.classes.ResourceProtocolURICache protocolURICache) 
- 
useGuidpublic void useGuid(boolean generateGuid) Description copied from interface:ITransformerAllows to specify whether to use generate a Guid or not.- Specified by:
- useGuidin interface- ITransformer
- Parameters:
- generateGuid-
 
- 
setIncludeStorageResourcespublic void setIncludeStorageResources(boolean includeStorageResources) Description copied from interface:ITransformerAllows to include or notIStorageResourceobjects. By default, the value is set to false.- Specified by:
- setIncludeStorageResourcesin interface- com.axemble.vdoc.core.helpers.transformer.InternalResourceTransformer
- Specified by:
- setIncludeStorageResourcesin interface- ITransformer
- Parameters:
- includeStorageResources- Set to true to allow storage resources inclusion.
 
- 
setStopExecutionOnCriticalErrorpublic 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 interface- ITransformer
- Parameters:
- stopExecutionOnCriticalError- Set to true to stop the execution of the treatment if an exception occure.
 
 
-