Class AbstractNodeProcessor

java.lang.Object
org.saidone.processors.AbstractNodeProcessor
All Implemented Interfaces:
NodeProcessor
Direct Known Subclasses:
AddAspectsAndSetPropertiesProcessor, ChainingNodeProcessor, DeleteNodeProcessor, DownloadNodeProcessor, LogNodeNameProcessor, MoveNodeProcessor, SetPermissionsProcessor, VoidProcessor

public abstract class AbstractNodeProcessor extends Object implements NodeProcessor
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 Details

    • readOnly

      @Value("${application.read-only:true}") protected boolean readOnly
  • Constructor Details

    • AbstractNodeProcessor

      public AbstractNodeProcessor()
  • Method Details

    • process

      public CompletableFuture<Void> process(ProcessorConfig config)
      Start processing nodes asynchronously by reading identifiers from the queue.
      Specified by:
      process in interface NodeProcessor
      Parameters:
      config - processor configuration
      Returns:
      future representing the asynchronous task
      Throws:
      RuntimeException - if the processing thread is interrupted while polling the queue
    • getNode

      protected org.alfresco.core.model.Node getNode(String nodeId)
      Load a node by id without explicitly requesting properties.
      Parameters:
      nodeId - Alfresco node id
      Returns:
      the node entry
    • getNode

      protected org.alfresco.core.model.Node getNode(String nodeId, boolean includeProperties)
      Load a node by id, optionally requesting properties.
      Parameters:
      nodeId - Alfresco node id
      includeProperties - whether to request properties in the response
      Returns:
      the node entry
    • getNode

      protected org.alfresco.core.model.Node getNode(String nodeId, List<String> include)
      Load a node by id, requesting specific include parameters.
      Parameters:
      nodeId - Alfresco node id
      include - list of include flags to pass to the API
      Returns:
      the node entry