Class NodeBuilderTree
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.tree.impl.AbstractTree
-
- org.apache.jackrabbit.oak.plugins.tree.impl.AbstractMutableTree
-
- org.apache.jackrabbit.oak.plugins.tree.impl.NodeBuilderTree
-
- All Implemented Interfaces:
Tree
public final class NodeBuilderTree extends AbstractMutableTree
A mutableTree
implementation based on an underlyingNodeBuilder
, which tracks all changes recorded through this tree's mutator methods.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.jackrabbit.oak.api.Tree
Tree.Status
-
-
Field Summary
-
Fields inherited from interface org.apache.jackrabbit.oak.api.Tree
EMPTY_ARRAY
-
-
Constructor Summary
Constructors Modifier Constructor Description NodeBuilderTree(@NotNull String name, @NotNull NodeBuilder nodeBuilder)
Create a newAbstractTree
instanceprotected
NodeBuilderTree(@Nullable NodeBuilderTree parent, @NotNull NodeBuilder nodeBuilder, @NotNull String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected @NotNull NodeBuilderTree
createChild(@NotNull String name)
Factory method for creating child trees@NotNull String
getName()
protected @NotNull NodeBuilder
getNodeBuilder()
protected @Nullable AbstractMutableTree
getParentOrNull()
-
Methods inherited from class org.apache.jackrabbit.oak.plugins.tree.impl.AbstractMutableTree
addChild, orderBefore, remove, removeProperty, setOrderableChildren, setProperty, setProperty, setProperty, updateChildOrder
-
Methods inherited from class org.apache.jackrabbit.oak.plugins.tree.impl.AbstractTree
buildPath, exists, getChild, getChildNames, getChildren, getChildrenCount, getInternalNodeNames, getNodeState, getParent, getPath, getProperties, getProperty, getPropertyCount, getPropertyStatus, getStatus, hasChild, hasOrderableChildren, hasProperty, isHidden, isRoot, toString
-
-
-
-
Constructor Detail
-
NodeBuilderTree
public NodeBuilderTree(@NotNull @NotNull String name, @NotNull @NotNull NodeBuilder nodeBuilder)
Create a newAbstractTree
instance- Parameters:
nodeBuilder
-NodeBuilder
for the underlying node statename
- name of the tree
-
NodeBuilderTree
protected NodeBuilderTree(@Nullable @Nullable NodeBuilderTree parent, @NotNull @NotNull NodeBuilder nodeBuilder, @NotNull @NotNull String name)
-
-
Method Detail
-
getParentOrNull
@Nullable protected @Nullable AbstractMutableTree getParentOrNull()
- Specified by:
getParentOrNull
in classAbstractTree
- Returns:
- the parent of this tree or
null
for the root
-
getNodeBuilder
@NotNull protected @NotNull NodeBuilder getNodeBuilder()
- Specified by:
getNodeBuilder
in classAbstractTree
- Returns:
- The
NodeBuilder
for the underlying node state
-
getName
@NotNull public @NotNull String getName()
- Returns:
- the name of this
Tree
instance.
-
createChild
@NotNull protected @NotNull NodeBuilderTree createChild(@NotNull @NotNull String name) throws IllegalArgumentException
Description copied from class:AbstractTree
Factory method for creating child trees- Specified by:
createChild
in classAbstractTree
- Parameters:
name
- name of the child tree- Returns:
- child tree of this tree with the given
name
- Throws:
IllegalArgumentException
- if the given name string is empty or contains the forward slash character
-
-