Package org.saidone.processors
Class AspectsAndPropertiesProcessor
java.lang.Object
org.saidone.component.BaseComponent
org.saidone.processors.AbstractNodeProcessor
org.saidone.processors.AspectsAndPropertiesProcessor
- All Implemented Interfaces:
NodeProcessor,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
Applies aspect and property updates to nodes loaded from Alfresco.
The processor expects the following optional configuration arguments:
aspects: list of aspect QNames to append to the node aspect set.!aspects: list of aspect QNames to remove from the node aspect set.properties: map of property QNames to values that must be sent in the update payload. Supplying anullvalue clears the corresponding property in Alfresco.
AbstractNodeProcessor.readOnly is enabled,
the processor still computes and logs the update payload but does not invoke Alfresco update APIs.-
Field Summary
Fields inherited from class org.saidone.processors.AbstractNodeProcessor
nodesApi, readOnly -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprocessNode(String nodeId, ProcessorConfig config) Builds and optionally sends aNodeBodyUpdatefor the target node.Methods inherited from class org.saidone.processors.AbstractNodeProcessor
getNode, getNode, getNode, processMethods inherited from class org.saidone.component.BaseComponent
setApplicationContext, shutDown, start, stop
-
Constructor Details
-
AspectsAndPropertiesProcessor
public AspectsAndPropertiesProcessor()
-
-
Method Details
-
processNode
Builds and optionally sends aNodeBodyUpdatefor the target node.Processing flow:
- Load the current node and start from its current aspect list.
- Add all values configured in
aspects. - Remove all values configured in
!aspects. - Set
propertiesas the properties map in the update request.
AbstractNodeProcessor.readOnlyistrue.- Parameters:
nodeId- Alfresco identifier of the node to update.config- processor configuration containing aspect/property instructions.
-