Class ItemInfoBuilder.NodeInfoBuilder
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.ItemInfoBuilder.NodeInfoBuilder
-
- Enclosing class:
- ItemInfoBuilder
public static class ItemInfoBuilder.NodeInfoBuilder extends Object
Builder forNodeInfo
s. Use one of theItemInfoBuilder.nodeInfoBuilder()
methods to create instances of this class.
-
-
Method Summary
-
-
-
Method Detail
-
createPropertyInfo
public ItemInfoBuilder.PropertyInfoBuilder createPropertyInfo(String localName, String value) throws RepositoryException
Create a new childPropertyInfo
with a givenlocalName
and a givenvalue
of typeString
on thisNodeInfo
.- Parameters:
localName
-value
-- Returns:
this
- Throws:
RepositoryException
-
createPropertyInfo
public ItemInfoBuilder.PropertyInfoBuilder createPropertyInfo(String localName)
- Parameters:
localName
-- Returns:
this
-
createPropertyInfo
public ItemInfoBuilder.PropertyInfoBuilder createPropertyInfo()
Create a new childPropertyInfo
on thisNodeInfo
.- Returns:
this
-
createNodeInfo
public ItemInfoBuilder.NodeInfoBuilder createNodeInfo(String localName)
Create a new childNodeInfo
on this NodeInfo with a givenlocalName
.- Parameters:
localName
-- Returns:
this
-
createNodeInfo
public ItemInfoBuilder.NodeInfoBuilder createNodeInfo()
Create a new childNodeInfo
on this NodeInfo.- Returns:
this
-
setName
public ItemInfoBuilder.NodeInfoBuilder setName(Name name)
Set thename
of the node- Parameters:
name
-- Returns:
-
setName
public ItemInfoBuilder.NodeInfoBuilder setName(String localName)
Set thelocalName
of the node- Parameters:
localName
-- Returns:
-
setNamespace
public ItemInfoBuilder.NodeInfoBuilder setNamespace(String namespace)
Set the namespace- Parameters:
namespace
-- Returns:
-
setIndex
public ItemInfoBuilder.NodeInfoBuilder setIndex(int index)
Set the index.- Parameters:
index
-- Returns:
- See Also:
NodeInfo.getIndex()
-
setUUID
public ItemInfoBuilder.NodeInfoBuilder setUUID(String uuid)
Set the uuid- Parameters:
uuid
-- Returns:
-
setParentPath
public ItemInfoBuilder.NodeInfoBuilder setParentPath(Path parentPath)
Set the parent's path of the node- Parameters:
parentPath
-- Returns:
-
setPrimaryType
public ItemInfoBuilder.NodeInfoBuilder setPrimaryType(Name name)
Set the name of the primary type.- Parameters:
name
-- Returns:
- See Also:
NodeInfo.getNodetype()
-
addMixin
public ItemInfoBuilder.NodeInfoBuilder addMixin(Name name)
Add a mixin type- Parameters:
name
-- Returns:
- See Also:
NodeInfo.getMixins()
-
includeChildInfos
public ItemInfoBuilder.NodeInfoBuilder includeChildInfos(boolean include)
Whether theChildInfo
s should be included or not.- Parameters:
include
-- Returns:
- See Also:
NodeInfo.getChildInfos()
-
build
public ItemInfoBuilder.NodeInfoBuilder build() throws RepositoryException
Build theNodeInfo
. If aItemInfoBuilder.Listener
is associated with this instance, then itsItemInfoBuilder.Listener.createChildInfos(NodeId, Iterator)
and itsItemInfoBuilder.Listener.createNodeInfo(NodeInfo)
methods are called.- Returns:
- the parent builder of this builder
- Throws:
RepositoryException
IllegalStateException
- if build has been called before
-
getParent
public ItemInfoBuilder.NodeInfoBuilder getParent()
- Returns:
- the parent builder of this builder
-
getNodeInfo
public NodeInfo getNodeInfo()
Returns theNodeInfo
which has been built by this builder.- Returns:
- Throws:
IllegalStateException
- ifbuild()
has not been called before.
-
addPropertyInfo
public ItemInfoBuilder.NodeInfoBuilder addPropertyInfo(PropertyInfo propertyInfo)
Add aPropertyInfo
- Parameters:
propertyInfo
-- Returns:
this
-
addNodeInfo
public ItemInfoBuilder.NodeInfoBuilder addNodeInfo(NodeInfo nodeInfo)
Add aNodeInfo
- Parameters:
nodeInfo
-- Returns:
this
-
-