Package org.saidone.processors
Class AbstractNodeProcessor
java.lang.Object
org.saidone.processors.AbstractNodeProcessor
- All Implemented Interfaces:
NodeProcessor
- Direct Known Subclasses:
AddAspectsAndSetPropertiesProcessor,ChainingNodeProcessor,DeleteNodeProcessor,DownloadNodeProcessor,LogNodeNameProcessor,MoveNodeProcessor,SetPermissionsProcessor,VoidProcessor
Base implementation of
NodeProcessor that pulls node identifiers
from the shared queue and delegates work to
NodeProcessor.processNode(String, ProcessorConfig).
Implementations typically use the getNode(String) helpers to fetch
metadata and honor the readOnly flag to avoid writes when running in
dry-run mode.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.alfresco.core.model.NodeLoad a node by id without explicitly requesting properties.protected org.alfresco.core.model.NodeLoad a node by id, optionally requesting properties.protected org.alfresco.core.model.NodeLoad a node by id, requesting specific include parameters.process(ProcessorConfig config) Start processing nodes asynchronously by reading identifiers from the queue.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.saidone.processors.NodeProcessor
processNode
-
Field Details
-
readOnly
@Value("${application.read-only:true}") protected boolean readOnly
-
-
Constructor Details
-
AbstractNodeProcessor
public AbstractNodeProcessor()
-
-
Method Details
-
process
Start processing nodes asynchronously by reading identifiers from the queue.- Specified by:
processin interfaceNodeProcessor- Parameters:
config- processor configuration- Returns:
- future representing the asynchronous task
- Throws:
RuntimeException- if the processing thread is interrupted while polling the queue
-
getNode
Load a node by id without explicitly requesting properties.- Parameters:
nodeId- Alfresco node id- Returns:
- the node entry
-
getNode
Load a node by id, optionally requesting properties.- Parameters:
nodeId- Alfresco node idincludeProperties- whether to request properties in the response- Returns:
- the node entry
-
getNode
Load a node by id, requesting specific include parameters.- Parameters:
nodeId- Alfresco node idinclude- list of include flags to pass to the API- Returns:
- the node entry
-