public abstract class MovingNode extends Object
| Constructor and Description |
|---|
MovingNode() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(MovingNode child) |
Optional<MovingNode> |
findByPath(String path) |
void |
findReferences(org.apache.sling.api.resource.ResourceResolver rr,
String referenceSearchRoot,
int maxReferences) |
List<String> |
getAllReferences() |
List<MovingNode> |
getChildren() |
protected Map<String,Object> |
getClonedProperties(org.apache.sling.api.resource.Resource source) |
String |
getDestinationPath() |
MovingNode |
getParent() |
String |
getPreviousSibling() |
List<String> |
getPublishedReferences() |
String |
getSourcePath() |
boolean |
hasChild(String path) |
abstract boolean |
isAbleToHaveChildren() |
abstract boolean |
isCopiedBeforeMove() |
boolean |
isDestinationAlreadyExists() |
boolean |
isLeaf() |
boolean |
isSourceActivated() |
abstract boolean |
isSupposedToBeReferenced() |
abstract void |
move(ReplicatorQueue replicatorQueue,
org.apache.sling.api.resource.ResourceResolver rr) |
void |
setChildren(List<MovingNode> children) |
void |
setDestinationAlreadyExists(boolean destinationAlreadyExists) |
void |
setDestinationPath(String destinationPath) |
void |
setParent(MovingNode parent) |
void |
setSourcePath(String sourcePath) |
void |
visit(Consumer<MovingNode> consumer)
Depth-first visitor, provide consumer function every node in the tree
|
void |
visit(Consumer<MovingNode> consumer,
Consumer<MovingNode> leafConsumer,
Function<MovingNode,Boolean> traversalFilter)
Depth-first visitor
|
public abstract boolean isCopiedBeforeMove()
public abstract boolean isSupposedToBeReferenced()
public abstract boolean isAbleToHaveChildren()
public void addChild(MovingNode child)
public boolean isLeaf()
public boolean isSourceActivated()
public String getSourcePath()
public void setSourcePath(String sourcePath)
sourcePath - the sourcePath to setpublic String getDestinationPath()
public void setDestinationPath(String destinationPath)
destinationPath - the destinationPath to setpublic MovingNode getParent()
public void setParent(MovingNode parent)
parent - the parent to setpublic List<MovingNode> getChildren()
public void setChildren(List<MovingNode> children)
children - the children to setpublic boolean isDestinationAlreadyExists()
public void setDestinationAlreadyExists(boolean destinationAlreadyExists)
destinationAlreadyExists - the destinationAlreadyExists to setpublic String getPreviousSibling()
public abstract void move(ReplicatorQueue replicatorQueue, org.apache.sling.api.resource.ResourceResolver rr) throws IllegalAccessException, MovingException
public void findReferences(org.apache.sling.api.resource.ResourceResolver rr,
String referenceSearchRoot,
int maxReferences)
throws IllegalAccessException
IllegalAccessExceptionpublic void visit(Consumer<MovingNode> consumer)
consumer - Consumer which accepts nodespublic void visit(Consumer<MovingNode> consumer, Consumer<MovingNode> leafConsumer, Function<MovingNode,Boolean> traversalFilter)
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 truepublic Optional<MovingNode> findByPath(String path)
public boolean hasChild(String path)
Copyright © 2013–2020 Adobe. All rights reserved.