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 SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected Fileprotected IDirectoryModuleprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected ILibraryModulestatic final Stringprotected booleanprotected booleanprotected static HashMapFields inherited from class com.axemble.vdoc.sdk.impl.AbstractElementmodule
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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.BaseTransformerresourceToXML, resourceToXML, resourceToXML, 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, resourceToXML
- 
Field Details- 
prefix- See Also:
 
- 
directoryModule
- 
libraryModule
- 
attachmentsFolder
- 
includeAttachmentsContentprotected boolean includeAttachmentsContent
- 
includeLabelsprotected boolean includeLabels
- 
includeLinkedWorkflowInstancesprotected boolean includeLinkedWorkflowInstances
- 
includeStorageResourcesprotected boolean includeStorageResources
- 
includeLinkedResourcesprotected boolean includeLinkedResources
- 
useGuidprotected boolean useGuid
- 
stopExecutionOnCriticalErrorprotected boolean stopExecutionOnCriticalError
- 
xmlImportersMap
 
- 
- 
Constructor Details- 
PortalResourceTransformer
 
- 
- 
Method Details- 
getImporter
- 
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, 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
 
- 
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
 
- 
buildXMLHistory
- 
buildXMLBody- Throws:
- Exception
 
- 
buildXMLBody- Throws:
- Exception
 
- 
dateToString
- 
parseDate
- 
notNull
- 
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
 
- 
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
 
- 
importHistoryprotected static void importHistory(IResource childResource, Element fieldElement) throws WorkflowModuleException, RemoteException 
- 
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.
 
- 
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- the includeAttachmentsContent to set
 
- 
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- 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.
 
 
-