Interface TreeManager
-
- All Known Implementing Classes:
BTreeManager
public interface TreeManagerTreeManager instances are responsible for the mapping between sequence views ofNodes andPropertys and an hierarchical JCR representation. They are passed to the various factory methods inItemSequenceto parameterize the behavior ofNodeSequences andPropertySequences.- See Also:
NodeSequence,PropertySequence
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleangetAutoSave()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()Comparatorused for establishing the order of the keys in the sequence.NodegetRoot()booleanisLeaf(Node node)Determines whether the givennodeis a leaf.booleanisRoot(Node node)Determined whether the givennodeis the root node of the JCR sub-tree.voidjoin(ItemSequence itemSequence, Node node, Node cause)After the nodecausehas been deleted from the sequenceitemSequence, the implementation of this method may decide to join the parentnodeofcausewith some other nodes.voidjoin(ItemSequence itemSequence, Node node, Property cause)After the propertycausehas been deleted from the sequenceitemSequence, the implementation of this method may decide to join the parentnodeofcausewith some other nodes.voidsplit(ItemSequence itemSequence, Node node, Node cause)After the nodecausehas been inserted into the sequenceitemSequence, the implementation of this method may decide to split the parentnodeofcauseinto two or more new nodes.voidsplit(ItemSequence itemSequence, Node node, Property cause)After the propertycausehas been inserted into the sequenceitemSequence, the implementation of this method may decide to split the parentnodeofcauseinto two or more new nodes.
-
-
-
Method Detail
-
getRoot
Node getRoot()
- Returns:
- the root node of the JCR sub-tree where the items of the sequence are be mapped to.
-
isRoot
boolean isRoot(Node node) throws RepositoryException
Determined whether the givennodeis the root node of the JCR sub-tree.- Parameters:
node- Node to test for root- Returns:
getRoot().isSame(node).- Throws:
RepositoryException
-
isLeaf
boolean isLeaf(Node node) throws RepositoryException
Determines whether the givennodeis a leaf. Leaf nodes are the nodes which are actually part of aNodeSequenceor the parents of the properties of aPropertySequence.- Parameters:
node- Node to test for leaf- Returns:
trueifnodeis a leaf node,falseotherwise.- Throws:
RepositoryException
-
getOrder
Comparator<String> getOrder()
Comparatorused for establishing the order of the keys in the sequence.- Returns:
- a
Comparator<String>instance
-
split
void split(ItemSequence itemSequence, Node node, Node cause) throws RepositoryException
After the nodecausehas been inserted into the sequenceitemSequence, the implementation of this method may decide to split the parentnodeofcauseinto two or more new nodes. Splitting must be done such that the overall order of the keys in this sequence obeys the order given bygetOrder()as much as possible.- Parameters:
itemSequence- theItemSequencewhere the new nodecausehas been inserted.node- the parent node of the newly inserted nodecause- the newly inserted node ornullif not known.- Throws:
RepositoryException
-
split
void split(ItemSequence itemSequence, Node node, Property cause) throws RepositoryException
After the propertycausehas been inserted into the sequenceitemSequence, the implementation of this method may decide to split the parentnodeofcauseinto two or more new nodes. Splitting must be done such that the overall order of the keys in this sequence obeys the order given bygetOrder()as much as possible.- Parameters:
itemSequence- theItemSequencewhere the new propertycausehas been inserted.node- the parent node of the newly inserted propertycause- the newly inserted property ornullif not known.- Throws:
RepositoryException
-
join
void join(ItemSequence itemSequence, Node node, Node cause) throws RepositoryException
After the nodecausehas been deleted from the sequenceitemSequence, the implementation of this method may decide to join the parentnodeofcausewith some other nodes. Joining must be done such that the overall order of the keys in this sequence obeys the order given bygetOrder()as much as possible.- Parameters:
itemSequence- theItemSequencewhere the nodecausehas been deleted from.node- the parent node from whichcausehas been deleted.cause- the deleted node ornullif not known. Note:causemight be stale.- Throws:
RepositoryException
-
join
void join(ItemSequence itemSequence, Node node, Property cause) throws RepositoryException
After the propertycausehas been deleted from the sequenceitemSequence, the implementation of this method may decide to join the parentnodeofcausewith some other nodes. Joining must be done such that the overall order of the keys in this sequence obeys the order given bygetOrder()as much as possible.- Parameters:
itemSequence- theItemSequencewhere the propertycausehas been deleted from.node- the parent node from whichcausehas been deleted.cause- the deleted property ornullif not known. Note:causemight be stale.- Throws:
RepositoryException
-
getAutoSave
boolean getAutoSave()
Whether to automatically save changes of the current session occurring from adding/removing nodes and properties.- Returns:
trueif changes should be automatically saved,falseotherwiese.
-
-