Class AspectsAndPropertiesProcessor

All Implemented Interfaces:
NodeProcessor, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

@Component public class AspectsAndPropertiesProcessor extends AbstractNodeProcessor
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 a null value clears the corresponding property in Alfresco.
Missing arguments are treated as empty collections/maps. When AbstractNodeProcessor.readOnly is enabled, the processor still computes and logs the update payload but does not invoke Alfresco update APIs.
  • Constructor Details

    • AspectsAndPropertiesProcessor

      public AspectsAndPropertiesProcessor()
  • Method Details

    • processNode

      public void processNode(String nodeId, ProcessorConfig config)
      Builds and optionally sends a NodeBodyUpdate for the target node.

      Processing flow:

      1. Load the current node and start from its current aspect list.
      2. Add all values configured in aspects.
      3. Remove all values configured in !aspects.
      4. Set properties as the properties map in the update request.
      The resulting payload is always logged at debug level. The remote update call is skipped when AbstractNodeProcessor.readOnly is true.
      Parameters:
      nodeId - Alfresco identifier of the node to update.
      config - processor configuration containing aspect/property instructions.