Package org.saidone.processors
Class DownloadNodeProcessor
java.lang.Object
org.saidone.processors.AbstractNodeProcessor
org.saidone.processors.DownloadNodeProcessor
- All Implemented Interfaces:
NodeProcessor
Downloads content and metadata of a node to the local filesystem.
For each processed node a folder matching its path is created under the
configured output directory. The node's binary content is saved using its
original name while the metadata is stored in an adjacent
*.metadata.properties.xml file.
The output format is compatible with Alfresco bulk import.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringalfPropertiesToXmlString(Properties properties) Serializes Alfresco properties to an XML string usingXmlMapper.voidprocessNode(String nodeId, ProcessorConfig config) Downloads a single node.static voidwriteStringToFile(String path, String content) Writes a string to the specified file using UTF-8 encoding.Methods inherited from class org.saidone.processors.AbstractNodeProcessor
castToListOfStrings, castToMapOfStringObject, getNode, getNode, getNode, process
-
Constructor Details
-
DownloadNodeProcessor
public DownloadNodeProcessor()
-
-
Method Details
-
processNode
Downloads a single node.- Parameters:
nodeId- id of the node to downloadconfig- processor configuration containing theoutput-dirargument
-
alfPropertiesToXmlString
Serializes Alfresco properties to an XML string usingXmlMapper.- Parameters:
properties- properties to serialize- Returns:
- XML representation of the properties
-
writeStringToFile
Writes a string to the specified file using UTF-8 encoding.- Parameters:
path- output file pathcontent- content to write- Throws:
IOException- if the file cannot be written
-