public class DefaultAggregateHandler extends java.lang.Object implements AggregateHandler
Constructor and Description |
---|
DefaultAggregateHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
isAggregateRoot(Node node)
Checks if the given node is an aggregate root.
|
boolean |
isRemoveNodes()
Checks if this handler removes the nodes in the
processForReplication(javax.jcr.Session, ReplicationAction)
for a delete replication. |
java.util.List<java.lang.String> |
prepareForReplication(Session session,
ReplicationActionType type,
java.lang.String path)
Returns a list of aggregate roots of the subtree starting at the specified path that are relevant for the
given replication action.
|
void |
processForReplication(Session session,
ReplicationAction action)
Processes the aggregate addressed by the replication action.
|
void |
setRemoveNodes(boolean removeNodes)
Sets the flag that controls if this handler should remove the node in the
processForReplication(javax.jcr.Session, ReplicationAction) . |
public boolean isRemoveNodes()
processForReplication(javax.jcr.Session, ReplicationAction)
for a delete replication.public void setRemoveNodes(boolean removeNodes)
processForReplication(javax.jcr.Session, ReplicationAction)
. the default is false
.removeNodes
- the flagpublic boolean isAggregateRoot(Node node)
isAggregateRoot
in interface AggregateHandler
node
- node to testtrue
if the node is a hierarchy node.public java.util.List<java.lang.String> prepareForReplication(Session session, ReplicationActionType type, java.lang.String path) throws ReplicationException
isAggregateRoot(javax.jcr.Node)
recursively, but only
for DELETE and DEACTIVATE action types.prepareForReplication
in interface AggregateHandler
session
- session to use for traversaltype
- replication action typepath
- start pathReplicationException
- to abort the replication in the preparation stagepublic void processForReplication(Session session, ReplicationAction action) throws ReplicationException
processForReplication
in interface AggregateHandler
session
- the session to use to process the contentaction
- the replication actionReplicationException
- to abort the replication in the preparation stageCopyright © 2010 - 2023 Adobe. All Rights Reserved