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
-
Field Summary
Modifier and TypeFieldDescriptionprotected File
protected IDirectoryModule
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected ILibraryModule
static final String
protected boolean
protected boolean
protected static HashMap
Fields inherited from class com.axemble.vdoc.sdk.impl.AbstractElement
module
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
buildXMLBody
(Element parent, IResource resource) void
buildXMLBody
(Element parent, IResource resource, Collection columns) void
buildXMLHistory
(Element parent, IResource resource) protected static String
dateToString
(Date date) protected static PortalResourceTransformer.IXMLImporter
getImporter
(String key) protected static void
importHistory
(IResource childResource, Element fieldElement) protected String
protected static Date
void
resourceToXML
(IResource resource, OutputStream outputStream) Allows to transform aIResource
object to an XML document.void
resourceToXML
(IResource resource, OutputStream outputStream, File attachmentsFolder) Allows to transform aIResource
object to an XML document.void
resourceToXML
(IResource resource, OutputStream outputStream, File attachmentsFolder, boolean includeAttachmentsContent) Allows to transform aIResource
object to an XML document.void
resourceToXML
(IResource resource, Collection columns, OutputStream outputStream) Allows to get values of a resource by specifying the columns to retrieve.void
setIncludeAttachmentsContent
(boolean includeAttachmentsContent) Allows to include or not the files content.void
setIncludeLabels
(boolean includeLabels) Allows to include or not the labels.void
setIncludeLinkedResources
(boolean includeLinkedResources) Allows to include or notILinkedResource
objects.void
setIncludeLinkedWorkflowInstances
(boolean includeLinkedWorkflowInstances) Allows to include or not linkedIWorkflowInstance
objects.void
setIncludeStorageResources
(boolean includeStorageResources) Allows to include or notIStorageResource
objects.void
setStopExecutionOnCriticalError
(boolean stopExecutionOnCriticalError) Allows to stop the execution of the treatment if an exception occur.void
useGuid
(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, resourceToXML
Methods inherited from class com.axemble.vdoc.sdk.impl.AbstractElement
getModule
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:ITransformer
Allows to transform aIResource
object to an XML document.- Specified by:
resourceToXML
in interfaceITransformer
- Specified by:
resourceToXML
in classcom.axemble.vdoc.sdk.impl.base.BaseTransformer
- Parameters:
resource
- TheIResource
to transform.outputStream
- TheOutputStream
object 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:ITransformer
Allows to transform aIResource
object to an XML document.- Specified by:
resourceToXML
in interfaceITransformer
- Overrides:
resourceToXML
in classcom.axemble.vdoc.sdk.impl.base.BaseTransformer
- Parameters:
resource
- TheIResource
to transform.outputStream
- TheOutputStream
object to write to.attachmentsFolder
- The directory where to export the attachments.- Throws:
IOException
-
resourceToXML
Description copied from interface:ITransformer
Allows to transform aIResource
object to an XML document.- Specified by:
resourceToXML
in interfaceITransformer
- Overrides:
resourceToXML
in classcom.axemble.vdoc.sdk.impl.base.BaseTransformer
- Parameters:
resource
- TheIResource
to transform.outputStream
- TheOutputStream
object to write to.- Throws:
IOException
-
xmlToResource
Description copied from interface:ITransformer
Import a resource from an XML stream.- Specified by:
xmlToResource
in interfaceITransformer
- Parameters:
inputStream
- TheInputStream
object to read from.- Returns:
- A
IResource
object. - Throws:
IOException
-
xmlToResource
Description copied from interface:ITransformer
Updates a resource.- Specified by:
xmlToResource
in interfaceITransformer
- Parameters:
resource
- TheIResource
to update.inputStream
- TheInputStream
object to read from.- Returns:
- A
IResource
object. - 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:ITransformer
Allows to get values of a resource by specifying the columns to retrieve.- Specified by:
resourceToXML
in interfaceITransformer
- Parameters:
resource
- TheIResource
object to request property values from.columns
- ACollection
of property names.outputStream
- TheOutputStream
object to write to.- Throws:
IOException
-
xmlToResource
Description copied from interface:ITransformer
Import a resource from an XML stream.- Specified by:
xmlToResource
in interfaceITransformer
- Parameters:
inputStream
- TheInputStream
object to read from.resourceFolder
- The directory from where to import the attachments.- Returns:
- A
IResource
object. - Throws:
IOException
-
importHistory
protected static void importHistory(IResource childResource, Element fieldElement) throws WorkflowModuleException, RemoteException -
setIncludeLabels
public void setIncludeLabels(boolean includeLabels) Description copied from interface:ITransformer
Allows to include or not the labels. By default, the value is set to true.- Specified by:
setIncludeLabels
in interfaceITransformer
- Parameters:
includeLabels
- Set to false to avoid labels inclusion.
-
setIncludeLinkedResources
public void setIncludeLinkedResources(boolean includeLinkedResources) Description copied from interface:ITransformer
Allows to include or notILinkedResource
objects. By default, the value is set to true.- Specified by:
setIncludeLinkedResources
in interfaceITransformer
- Parameters:
includeLinkedResources
- Set to false to avoid linked resources inclusion.
-
setIncludeLinkedWorkflowInstances
public void setIncludeLinkedWorkflowInstances(boolean includeLinkedWorkflowInstances) Description copied from interface:ITransformer
Allows to include or not linkedIWorkflowInstance
objects. By default, the value is set to true.- Specified by:
setIncludeLinkedWorkflowInstances
in interfaceITransformer
- Parameters:
includeLinkedWorkflowInstances
- Set to false to avoid linked workflow instances inclusion.
-
setIncludeAttachmentsContent
public void setIncludeAttachmentsContent(boolean includeAttachmentsContent) Description copied from interface:ITransformer
Allows to include or not the files content. By default, the value is set to true.- Specified by:
setIncludeAttachmentsContent
in interfaceITransformer
- Parameters:
includeAttachmentsContent
- the includeAttachmentsContent to set
-
useGuid
public void useGuid(boolean generateGuid) Description copied from interface:ITransformer
Allows to specify whether to use generate a Guid or not.- Specified by:
useGuid
in interfaceITransformer
- Parameters:
generateGuid
-
-
setIncludeStorageResources
public void setIncludeStorageResources(boolean includeStorageResources) Description copied from interface:ITransformer
Allows to include or notIStorageResource
objects. By default, the value is set to false.- Specified by:
setIncludeStorageResources
in interfaceITransformer
- Parameters:
includeStorageResources
- Set to true to allow storage resources inclusion.
-
setStopExecutionOnCriticalError
public void setStopExecutionOnCriticalError(boolean stopExecutionOnCriticalError) Description copied from interface:ITransformer
Allows to stop the execution of the treatment if an exception occur. By default, the value is set to false.- Specified by:
setStopExecutionOnCriticalError
in interfaceITransformer
- Parameters:
stopExecutionOnCriticalError
- Set to true to stop the execution of the treatment if an exception occure.
-