Class ItemInfoBuilder.NodeInfoBuilder
java.lang.Object
org.apache.jackrabbit.spi.commons.ItemInfoBuilder.NodeInfoBuilder
- Enclosing class:
ItemInfoBuilder
Builder for
NodeInfos. Use one of the ItemInfoBuilder.nodeInfoBuilder()
methods to create instances of this class.-
Method Summary
Modifier and TypeMethodDescriptionAdd a mixin typeaddNodeInfo(NodeInfo nodeInfo) Add aNodeInfoaddPropertyInfo(PropertyInfo propertyInfo) Add aPropertyInfobuild()Build theNodeInfo.Create a new childNodeInfoon this NodeInfo.createNodeInfo(String localName) Create a new childNodeInfoon this NodeInfo with a givenlocalName.Create a new childPropertyInfoon thisNodeInfo.createPropertyInfo(String localName) createPropertyInfo(String localName, String value) Create a new childPropertyInfowith a givenlocalNameand a givenvalueof typeStringon thisNodeInfo.Returns theNodeInfowhich has been built by this builder.includeChildInfos(boolean include) Whether theChildInfos should be included or not.setIndex(int index) Set the index.Set thelocalNameof the nodeSet thenameof the nodesetNamespace(String namespace) Set the namespacesetParentPath(Path parentPath) Set the parent's path of the nodesetPrimaryType(Name name) Set the name of the primary type.Set the uuid
-
Method Details
-
createPropertyInfo
public ItemInfoBuilder.PropertyInfoBuilder createPropertyInfo(String localName, String value) throws RepositoryException Create a new childPropertyInfowith a givenlocalNameand a givenvalueof typeStringon thisNodeInfo.- Parameters:
localName-value-- Returns:
this- Throws:
RepositoryException
-
createPropertyInfo
- Parameters:
localName-- Returns:
this
-
createPropertyInfo
Create a new childPropertyInfoon thisNodeInfo.- Returns:
this
-
createNodeInfo
Create a new childNodeInfoon this NodeInfo with a givenlocalName.- Parameters:
localName-- Returns:
this
-
createNodeInfo
Create a new childNodeInfoon this NodeInfo.- Returns:
this
-
setName
Set thenameof the node- Parameters:
name-- Returns:
-
setName
Set thelocalNameof the node- Parameters:
localName-- Returns:
-
setNamespace
Set the namespace- Parameters:
namespace-- Returns:
-
setIndex
Set the index.- Parameters:
index-- Returns:
- See Also:
-
setUUID
Set the uuid- Parameters:
uuid-- Returns:
-
setParentPath
Set the parent's path of the node- Parameters:
parentPath-- Returns:
-
setPrimaryType
Set the name of the primary type.- Parameters:
name-- Returns:
- See Also:
-
addMixin
Add a mixin type- Parameters:
name-- Returns:
- See Also:
-
includeChildInfos
Whether theChildInfos should be included or not.- Parameters:
include-- Returns:
- See Also:
-
build
Build theNodeInfo. If aItemInfoBuilder.Listeneris 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:
RepositoryExceptionIllegalStateException- if build has been called before
-
getParent
- Returns:
- the parent builder of this builder
-
getNodeInfo
Returns theNodeInfowhich has been built by this builder.- Returns:
- Throws:
IllegalStateException- ifbuild()has not been called before.
-
addPropertyInfo
Add aPropertyInfo- Parameters:
propertyInfo-- Returns:
this
-
addNodeInfo
Add aNodeInfo- Parameters:
nodeInfo-- Returns:
this
-