java.lang.Object
com.adobe.acs.commons.mcp.impl.processes.renovator.MovingNode
Direct Known Subclasses:
MovingAsset, MovingFolder, MovingPage, MovingResource

public abstract class MovingNode extends Object
Represents a node in the process of moving.
  • Constructor Details

    • MovingNode

      public MovingNode()
  • Method Details

    • isCopiedBeforeMove

      public abstract boolean isCopiedBeforeMove()
    • isSupposedToBeReferenced

      public abstract boolean isSupposedToBeReferenced()
    • isAbleToHaveChildren

      public abstract boolean isAbleToHaveChildren()
    • isAuditableMove

      protected abstract boolean isAuditableMove()
    • addChild

      public void addChild(MovingNode child)
    • isLeaf

      public boolean isLeaf()
    • isSourceActivated

      public boolean isSourceActivated()
    • getSourcePath

      public String getSourcePath()
      Returns:
      the sourcePath
    • setSourcePath

      public void setSourcePath(String sourcePath)
      Parameters:
      sourcePath - the sourcePath to set
    • getDestinationPath

      public String getDestinationPath()
      Returns:
      the destinationPath
    • setDestinationPath

      public void setDestinationPath(String destinationPath)
      Parameters:
      destinationPath - the destinationPath to set
    • getParent

      public MovingNode getParent()
      Returns:
      the parent
    • setParent

      public void setParent(MovingNode parent)
      Parameters:
      parent - the parent to set
    • getChildren

      public List<MovingNode> getChildren()
      Returns:
      the children
    • setChildren

      public void setChildren(List<MovingNode> children)
      Parameters:
      children - the children to set
    • getAllReferences

      public List<String> getAllReferences()
      Returns:
      the references
    • getPublishedReferences

      public List<String> getPublishedReferences()
      Returns:
      the references
    • isDestinationAlreadyExists

      public boolean isDestinationAlreadyExists()
      Returns:
      the destinationAlreadyExists
    • setDestinationAlreadyExists

      public void setDestinationAlreadyExists(boolean destinationAlreadyExists)
      Parameters:
      destinationAlreadyExists - the destinationAlreadyExists to set
    • getPreviousSibling

      public String getPreviousSibling()
    • move

      public abstract void move(ReplicatorQueue replicatorQueue, org.apache.sling.api.resource.ResourceResolver rr) throws IllegalAccessException, MovingException
      Throws:
      IllegalAccessException
      MovingException
    • findReferences

      public void findReferences(org.apache.sling.api.resource.ResourceResolver rr, String referenceSearchRoot, int maxReferences) throws IllegalAccessException
      Throws:
      IllegalAccessException
    • visit

      public void visit(Consumer<MovingNode> consumer)
      Depth-first visitor, provide consumer function every node in the tree
      Parameters:
      consumer - Consumer which accepts nodes
    • visit

      public void visit(Consumer<MovingNode> consumer, Consumer<MovingNode> leafConsumer, Function<MovingNode,Boolean> traversalFilter)
      Depth-first visitor
      Parameters:
      consumer - Consumer for traversed nodes
      leafConsumer - Consumer for leaf nodes (first level after traversalFilter returns false), if no traversal function this is never called
      traversalFilter - Function which determines if the tree should be evaluated any deeper, Null means always true
    • findByPath

      public Optional<MovingNode> findByPath(String path)
    • hasChild

      public boolean hasChild(String path)
    • getClonedProperties

      protected Map<String,Object> getClonedProperties(org.apache.sling.api.resource.Resource source)
    • addAuditRecordForMove

      public void addAuditRecordForMove(org.apache.sling.api.resource.ResourceResolver rr, com.day.cq.audit.AuditLog auditLog)