Class ItemInfoBuilder.NodeInfoBuilder
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.ItemInfoBuilder.NodeInfoBuilder
-
- Enclosing class:
- ItemInfoBuilder
public static class ItemInfoBuilder.NodeInfoBuilder extends java.lang.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(java.lang.String localName, java.lang.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(java.lang.String localName)
- Parameters:
localName
-- Returns:
this
-
createPropertyInfo
public ItemInfoBuilder.PropertyInfoBuilder createPropertyInfo()
Create a new childPropertyInfo
on thisNodeInfo
.- Returns:
this
-
createNodeInfo
public ItemInfoBuilder.NodeInfoBuilder createNodeInfo(java.lang.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(java.lang.String localName)
Set thelocalName
of the node- Parameters:
localName
-- Returns:
-
setNamespace
public ItemInfoBuilder.NodeInfoBuilder setNamespace(java.lang.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(java.lang.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
java.lang.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:
java.lang.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
-
-