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 mutableTreeimplementation 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 newAbstractTreeinstanceprotectedNodeBuilderTree(@Nullable NodeBuilderTree parent, @NotNull NodeBuilder nodeBuilder, @NotNull String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected @NotNull NodeBuilderTreecreateChild(@NotNull String name)Factory method for creating child trees@NotNull StringgetName()protected @NotNull NodeBuildergetNodeBuilder()protected @Nullable AbstractMutableTreegetParentOrNull()-
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 newAbstractTreeinstance- Parameters:
nodeBuilder-NodeBuilderfor 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:
getParentOrNullin classAbstractTree- Returns:
- the parent of this tree or
nullfor the root
-
getNodeBuilder
@NotNull protected @NotNull NodeBuilder getNodeBuilder()
- Specified by:
getNodeBuilderin classAbstractTree- Returns:
- The
NodeBuilderfor the underlying node state
-
getName
@NotNull public @NotNull String getName()
- Returns:
- the name of this
Treeinstance.
-
createChild
@NotNull protected @NotNull NodeBuilderTree createChild(@NotNull @NotNull String name) throws IllegalArgumentException
Description copied from class:AbstractTreeFactory method for creating child trees- Specified by:
createChildin 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
-
-