Package com.axemble.vdoc.sdk.impl
Class PortalResourceTransformer
java.lang.Object
com.axemble.vdoc.sdk.impl.AbstractElement
com.axemble.vdoc.sdk.impl.base.BaseTransformer
com.axemble.vdoc.sdk.impl.PortalResourceTransformer
- All Implemented Interfaces:
ITransformer,Serializable
public class PortalResourceTransformer
extends com.axemble.vdoc.sdk.impl.base.BaseTransformer
implements ITransformer
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Fileprotected IDirectoryModuleprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected ILibraryModulestatic final Stringprotected booleanprotected booleanprotected static HashMapFields inherited from class com.axemble.vdoc.sdk.impl.AbstractElement
module -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildXMLBody(Element parent, IResource resource) voidbuildXMLBody(Element parent, IResource resource, Collection columns) voidbuildXMLHistory(Element parent, IResource resource) protected static StringdateToString(Date date) protected static PortalResourceTransformer.IXMLImportergetImporter(String key) protected static 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, 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, 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.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, resourceToXML, 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, resourceToXML
-
Field Details
-
prefix
- See Also:
-
directoryModule
-
libraryModule
-
attachmentsFolder
-
includeAttachmentsContent
protected boolean includeAttachmentsContent -
includeLabels
protected boolean includeLabels -
includeLinkedWorkflowInstances
protected boolean includeLinkedWorkflowInstances -
includeStorageResources
protected boolean includeStorageResources -
includeLinkedResources
protected boolean includeLinkedResources -
useGuid
protected boolean useGuid -
stopExecutionOnCriticalError
protected boolean stopExecutionOnCriticalError -
xmlImportersMap
-
-
Constructor Details
-
PortalResourceTransformer
-
-
Method Details
-
getImporter
-
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, 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
-
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
-
buildXMLHistory
-
buildXMLBody
- Throws:
Exception
-
buildXMLBody
- Throws:
Exception
-
dateToString
-
parseDate
-
notNull
-
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
-
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
-
importHistory
protected static void importHistory(IResource childResource, Element fieldElement) throws WorkflowModuleException, RemoteException -
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.
-
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- the includeAttachmentsContent to set
-
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 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.
-