org.apache.jackrabbit.spi.commons
Class ItemInfoBuilder.NodeInfoBuilder

java.lang.Object
  extended by org.apache.jackrabbit.spi.commons.ItemInfoBuilder.NodeInfoBuilder
Enclosing class:
ItemInfoBuilder

public static class ItemInfoBuilder.NodeInfoBuilder
extends Object

Builder for NodeInfos. Use one of the ItemInfoBuilder.nodeInfoBuilder() methods to create instances of this class.


Method Summary
 ItemInfoBuilder.NodeInfoBuilder addMixin(org.apache.jackrabbit.spi.Name name)
          Add a mixin type
 ItemInfoBuilder.NodeInfoBuilder addNodeInfo(org.apache.jackrabbit.spi.NodeInfo nodeInfo)
          Add a NodeInfo
 ItemInfoBuilder.NodeInfoBuilder addPropertyInfo(org.apache.jackrabbit.spi.PropertyInfo propertyInfo)
          Add a PropertyInfo
 ItemInfoBuilder.NodeInfoBuilder build()
          Build the NodeInfo.
 ItemInfoBuilder.NodeInfoBuilder createNodeInfo()
          Create a new child NodeInfo on this NodeInfo.
 ItemInfoBuilder.NodeInfoBuilder createNodeInfo(String localName)
          Create a new child NodeInfo on this NodeInfo with a given localName.
 ItemInfoBuilder.PropertyInfoBuilder createPropertyInfo()
          Create a new child PropertyInfo on this NodeInfo.
 ItemInfoBuilder.PropertyInfoBuilder createPropertyInfo(String localName)
          Create a new child PropertyInfo with a given localName on this NodeInfo.
 ItemInfoBuilder.PropertyInfoBuilder createPropertyInfo(String localName, String value)
          Create a new child PropertyInfo with a given localName and a given value of type String on this NodeInfo.
 org.apache.jackrabbit.spi.NodeInfo getNodeInfo()
          Returns the NodeInfo which has been built by this builder.
 ItemInfoBuilder.NodeInfoBuilder getParent()
           
 ItemInfoBuilder.NodeInfoBuilder includeChildInfos(boolean include)
          Whether the ChildInfos should be included or not.
 ItemInfoBuilder.NodeInfoBuilder setIndex(int index)
          Set the index.
 ItemInfoBuilder.NodeInfoBuilder setName(org.apache.jackrabbit.spi.Name name)
          Set the name of the node
 ItemInfoBuilder.NodeInfoBuilder setName(String localName)
          Set the localName of the node
 ItemInfoBuilder.NodeInfoBuilder setNamespace(String namespace)
          Set the namespace
 ItemInfoBuilder.NodeInfoBuilder setParentPath(org.apache.jackrabbit.spi.Path parentPath)
          Set the parent's path of the node
 ItemInfoBuilder.NodeInfoBuilder setPrimaryType(org.apache.jackrabbit.spi.Name name)
          Set the name of the primary type.
 ItemInfoBuilder.NodeInfoBuilder setUUID(String uuid)
          Set the uuid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createPropertyInfo

public ItemInfoBuilder.PropertyInfoBuilder createPropertyInfo(String localName,
                                                              String value)
                                                       throws RepositoryException
Create a new child PropertyInfo with a given localName and a given value of type String on this NodeInfo.

Parameters:
localName -
value -
Returns:
this
Throws:
RepositoryException

createPropertyInfo

public ItemInfoBuilder.PropertyInfoBuilder createPropertyInfo(String localName)
Create a new child PropertyInfo with a given localName on this NodeInfo.

Parameters:
localName -
Returns:
this

createPropertyInfo

public ItemInfoBuilder.PropertyInfoBuilder createPropertyInfo()
Create a new child PropertyInfo on this NodeInfo.

Returns:
this

createNodeInfo

public ItemInfoBuilder.NodeInfoBuilder createNodeInfo(String localName)
Create a new child NodeInfo on this NodeInfo with a given localName.

Parameters:
localName -
Returns:
this

createNodeInfo

public ItemInfoBuilder.NodeInfoBuilder createNodeInfo()
Create a new child NodeInfo on this NodeInfo.

Returns:
this

setName

public ItemInfoBuilder.NodeInfoBuilder setName(org.apache.jackrabbit.spi.Name name)
Set the name of the node

Parameters:
name -
Returns:

setName

public ItemInfoBuilder.NodeInfoBuilder setName(String localName)
Set the localName 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(org.apache.jackrabbit.spi.Path parentPath)
Set the parent's path of the node

Parameters:
parentPath -
Returns:

setPrimaryType

public ItemInfoBuilder.NodeInfoBuilder setPrimaryType(org.apache.jackrabbit.spi.Name name)
Set the name of the primary type.

Parameters:
name -
Returns:
See Also:
NodeInfo.getNodetype()

addMixin

public ItemInfoBuilder.NodeInfoBuilder addMixin(org.apache.jackrabbit.spi.Name name)
Add a mixin type

Parameters:
name -
Returns:
See Also:
NodeInfo.getMixins()

includeChildInfos

public ItemInfoBuilder.NodeInfoBuilder includeChildInfos(boolean include)
Whether the ChildInfos should be included or not.

Parameters:
include -
Returns:
See Also:
NodeInfo.getChildInfos()

build

public ItemInfoBuilder.NodeInfoBuilder build()
                                      throws RepositoryException
Build the NodeInfo. If a ItemInfoBuilder.Listener is associated with this instance, then its ItemInfoBuilder.Listener.createChildInfos(NodeId, Iterator) and its ItemInfoBuilder.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 org.apache.jackrabbit.spi.NodeInfo getNodeInfo()
Returns the NodeInfo which has been built by this builder.

Returns:
Throws:
IllegalStateException - if build() has not been called before.

addPropertyInfo

public ItemInfoBuilder.NodeInfoBuilder addPropertyInfo(org.apache.jackrabbit.spi.PropertyInfo propertyInfo)
Add a PropertyInfo

Parameters:
propertyInfo -
Returns:
this

addNodeInfo

public ItemInfoBuilder.NodeInfoBuilder addNodeInfo(org.apache.jackrabbit.spi.NodeInfo nodeInfo)
Add a NodeInfo

Parameters:
nodeInfo -
Returns:
this


Copyright © 2004-2014 The Apache Software Foundation. All Rights Reserved.