public interface TreeManager
Nodes and Propertys and an hierarchical JCR
representation. They are passed to the various factory methods in
ItemSequence to parameterize the behavior of NodeSequences
and PropertySequences.NodeSequence,
PropertySequence| Modifier and Type | Method and Description |
|---|---|
boolean |
getAutoSave()
Whether to automatically save changes of the current session occurring
from adding/removing nodes and properties.
|
Set<String> |
getIgnoredProperties()
Properties to ignore.
|
Comparator<String> |
getOrder()
Comparator used for establishing the order of the keys in the
sequence. |
Node |
getRoot() |
boolean |
isLeaf(Node node)
Determines whether the given
node is a leaf. |
boolean |
isRoot(Node node)
Determined whether the given
node is the root node of the
JCR sub-tree. |
void |
join(ItemSequence itemSequence,
Node node,
Node cause)
After the node
cause has been deleted from the sequence
itemSequence, the implementation of this method may decide
to join the parent node of cause with some
other nodes. |
void |
join(ItemSequence itemSequence,
Node node,
Property cause)
After the property
cause has been deleted from the sequence
itemSequence, the implementation of this method may decide
to join the parent node of cause with some
other nodes. |
void |
split(ItemSequence itemSequence,
Node node,
Node cause)
After the node
cause has been inserted into the sequence
itemSequence, the implementation of this method may decide
to split the parent node of cause into two or
more new nodes. |
void |
split(ItemSequence itemSequence,
Node node,
Property cause)
After the property
cause has been inserted into the sequence
itemSequence, the implementation of this method may decide
to split the parent node of cause into two or
more new nodes. |
Node getRoot()
boolean isRoot(Node node) throws RepositoryException
node is the root node of the
JCR sub-tree.node - Node to test for rootgetRoot().isSame(node).RepositoryExceptionboolean isLeaf(Node node) throws RepositoryException
node is a leaf. Leaf nodes are
the nodes which are actually part of a NodeSequence or the
parents of the properties of a PropertySequence.node - Node to test for leaftrue if node is a leaf node,
false otherwise.RepositoryExceptionComparator<String> getOrder()
Comparator used for establishing the order of the keys in the
sequence.Comparator<String> instancevoid split(ItemSequence itemSequence, Node node, Node cause) throws RepositoryException
cause has been inserted into the sequence
itemSequence, the implementation of this method may decide
to split the parent node of cause into two or
more new nodes. Splitting must be done such that the overall order of the
keys in this sequence obeys the order given by getOrder() as
much as possible.itemSequence - the ItemSequence where the new node
cause has been inserted.node - the parent node of the newly inserted nodecause - the newly inserted node or null if not known.RepositoryExceptionvoid split(ItemSequence itemSequence, Node node, Property cause) throws RepositoryException
cause has been inserted into the sequence
itemSequence, the implementation of this method may decide
to split the parent node of cause into two or
more new nodes. Splitting must be done such that the overall order of the
keys in this sequence obeys the order given by getOrder() as
much as possible.itemSequence - the ItemSequence where the new property
cause has been inserted.node - the parent node of the newly inserted propertycause - the newly inserted property or null if not
known.RepositoryExceptionvoid join(ItemSequence itemSequence, Node node, Node cause) throws RepositoryException
cause has been deleted from the sequence
itemSequence, the implementation of this method may decide
to join the parent node of cause with some
other nodes. Joining must be done such that the overall order of the keys
in this sequence obeys the order given by getOrder() as much as
possible.itemSequence - the ItemSequence where the node
cause has been deleted from.node - the parent node from which cause has been
deleted.cause - the deleted node or null if not known.
Note: cause might be stale.RepositoryExceptionvoid join(ItemSequence itemSequence, Node node, Property cause) throws RepositoryException
cause has been deleted from the sequence
itemSequence, the implementation of this method may decide
to join the parent node of cause with some
other nodes. Joining must be done such that the overall order of the keys
in this sequence obeys the order given by getOrder() as much as
possible.itemSequence - the ItemSequence where the property
cause has been deleted from.node - the parent node from which cause has been
deleted.cause - the deleted property or null if not known.
Note: cause might be stale.RepositoryExceptionboolean getAutoSave()
true if changes should be automatically saved,
false otherwiese.Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.