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(Name name)
          Add a mixin type
 ItemInfoBuilder.NodeInfoBuilder addNodeInfo(NodeInfo nodeInfo)
          Add a NodeInfo
 ItemInfoBuilder.NodeInfoBuilder addPropertyInfo(PropertyInfo propertyInfo)
          Add a PropertyInfo
 ItemInfoBuilder.NodeInfoBuilder build()
          Build the NodeInfo.
 ItemInfoBuilder.NodeInfoBuilder createNodeInfo(String name)
          Create a new child NodeInfo on this NodeInfo with a given name.
 ItemInfoBuilder.PropertyInfoBuilder createPropertyInfo(String name)
          Create a new child PropertyInfo with a given name on this NodeInfo.
 ItemInfoBuilder.PropertyInfoBuilder createPropertyInfo(String name, String value)
          Create a new child PropertyInfo with a given name and a given value of type String on this NodeInfo.
 NodeInfo getNodeInfo()
          Returns the NodeInfo which has been built by this builder.
 ItemInfoBuilder.NodeInfoBuilder includeChildInfos(boolean include)
          Whether the ChildInfos should be included or not.
 ItemInfoBuilder.NodeInfoBuilder setIndex(int index)
          Set the index.
 ItemInfoBuilder.NodeInfoBuilder setPrimaryType(Name name)
          Set the name of the primary type.
 
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 name,
                                                              String value)
                                                       throws RepositoryException
Create a new child PropertyInfo with a given name and a given value of type String on this NodeInfo.

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

createPropertyInfo

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

Parameters:
name -
Returns:
this

createNodeInfo

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

Parameters:
name -
Returns:
this

setIndex

public ItemInfoBuilder.NodeInfoBuilder setIndex(int index)
Set the index.

Parameters:
index -
Returns:
See Also:
NodeInfo.getIndex()

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 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

getNodeInfo

public 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(PropertyInfo propertyInfo)
Add a PropertyInfo

Parameters:
propertyInfo -
Returns:
this

addNodeInfo

public ItemInfoBuilder.NodeInfoBuilder addNodeInfo(NodeInfo nodeInfo)
Add a NodeInfo

Parameters:
nodeInfo -
Returns:
this


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