Class MovingNode
java.lang.Object
com.adobe.acs.commons.mcp.impl.processes.renovator.MovingNode
- Direct Known Subclasses:
MovingAsset,MovingFolder,MovingPage,MovingResource
Represents a node in the process of moving.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAuditRecordForMove(org.apache.sling.api.resource.ResourceResolver rr, com.day.cq.audit.AuditLog auditLog) voidaddChild(MovingNode child) findByPath(String path) voidfindReferences(org.apache.sling.api.resource.ResourceResolver rr, String referenceSearchRoot, int maxReferences) getClonedProperties(org.apache.sling.api.resource.Resource source) booleanabstract booleanprotected abstract booleanabstract booleanbooleanbooleanisLeaf()booleanabstract booleanabstract voidmove(ReplicatorQueue replicatorQueue, org.apache.sling.api.resource.ResourceResolver rr) voidsetChildren(List<MovingNode> children) voidsetDestinationAlreadyExists(boolean destinationAlreadyExists) voidsetDestinationPath(String destinationPath) voidsetParent(MovingNode parent) voidsetSourcePath(String sourcePath) voidvisit(Consumer<MovingNode> consumer) Depth-first visitor, provide consumer function every node in the treevoidvisit(Consumer<MovingNode> consumer, Consumer<MovingNode> leafConsumer, Function<MovingNode, Boolean> traversalFilter) Depth-first visitor
-
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
-
isLeaf
public boolean isLeaf() -
isSourceActivated
public boolean isSourceActivated() -
getSourcePath
- Returns:
- the sourcePath
-
setSourcePath
- Parameters:
sourcePath- the sourcePath to set
-
getDestinationPath
- Returns:
- the destinationPath
-
setDestinationPath
- Parameters:
destinationPath- the destinationPath to set
-
getParent
- Returns:
- the parent
-
setParent
- Parameters:
parent- the parent to set
-
getChildren
- Returns:
- the children
-
setChildren
- Parameters:
children- the children to set
-
getAllReferences
- Returns:
- the references
-
getPublishedReferences
- Returns:
- the references
-
isDestinationAlreadyExists
public boolean isDestinationAlreadyExists()- Returns:
- the destinationAlreadyExists
-
setDestinationAlreadyExists
public void setDestinationAlreadyExists(boolean destinationAlreadyExists) - Parameters:
destinationAlreadyExists- the destinationAlreadyExists to set
-
getPreviousSibling
-
move
public abstract void move(ReplicatorQueue replicatorQueue, org.apache.sling.api.resource.ResourceResolver rr) throws IllegalAccessException, MovingException -
findReferences
public void findReferences(org.apache.sling.api.resource.ResourceResolver rr, String referenceSearchRoot, int maxReferences) throws IllegalAccessException - Throws:
IllegalAccessException
-
visit
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 nodesleafConsumer- Consumer for leaf nodes (first level after traversalFilter returns false), if no traversal function this is never calledtraversalFilter- Function which determines if the tree should be evaluated any deeper, Null means always true
-
findByPath
-
hasChild
-
getClonedProperties
-
addAuditRecordForMove
public void addAuditRecordForMove(org.apache.sling.api.resource.ResourceResolver rr, com.day.cq.audit.AuditLog auditLog)
-