public interface TreeManager
Node
s and Property
s and an hierarchical JCR
representation. They are passed to the various factory methods in
ItemSequence
to parameterize the behavior of NodeSequence
s
and PropertySequence
s.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. |
javax.jcr.Node |
getRoot() |
boolean |
isLeaf(javax.jcr.Node node)
Determines whether the given
node is a leaf. |
boolean |
isRoot(javax.jcr.Node node)
Determined whether the given
node is the root node of the
JCR sub-tree. |
void |
join(ItemSequence itemSequence,
javax.jcr.Node node,
javax.jcr.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,
javax.jcr.Node node,
javax.jcr.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,
javax.jcr.Node node,
javax.jcr.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,
javax.jcr.Node node,
javax.jcr.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. |
javax.jcr.Node getRoot()
boolean isRoot(javax.jcr.Node node) throws javax.jcr.RepositoryException
node
is the root node of the
JCR sub-tree.node
- Node to test for rootgetRoot().isSame(node)
.javax.jcr.RepositoryException
boolean isLeaf(javax.jcr.Node node) throws javax.jcr.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.javax.jcr.RepositoryException
Comparator<String> getOrder()
Comparator
used for establishing the order of the keys in the
sequence.Comparator<String>
instancevoid split(ItemSequence itemSequence, javax.jcr.Node node, javax.jcr.Node cause) throws javax.jcr.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.javax.jcr.RepositoryException
void split(ItemSequence itemSequence, javax.jcr.Node node, javax.jcr.Property cause) throws javax.jcr.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.javax.jcr.RepositoryException
void join(ItemSequence itemSequence, javax.jcr.Node node, javax.jcr.Node cause) throws javax.jcr.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.javax.jcr.RepositoryException
void join(ItemSequence itemSequence, javax.jcr.Node node, javax.jcr.Property cause) throws javax.jcr.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.javax.jcr.RepositoryException
boolean getAutoSave()
true
if changes should be automatically saved,
false
otherwiese.Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.