org.apache.jackrabbit.spi.commons.nodetype
Class QNodeDefinitionBuilder
java.lang.Object
org.apache.jackrabbit.spi.commons.nodetype.QItemDefinitionBuilder
org.apache.jackrabbit.spi.commons.nodetype.QNodeDefinitionBuilder
public class QNodeDefinitionBuilder
- extends QItemDefinitionBuilder
A builder for a QNodeDefinition.
| Methods inherited from class org.apache.jackrabbit.spi.commons.nodetype.QItemDefinitionBuilder |
getAutoCreated, getDeclaringNodeType, getMandatory, getName, getOnParentVersion, getProtected, setAutoCreated, setDeclaringNodeType, setMandatory, setName, setOnParentVersion, setProtected |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QNodeDefinitionBuilder
public QNodeDefinitionBuilder()
setDefaultPrimaryType
public void setDefaultPrimaryType(org.apache.jackrabbit.spi.Name name)
- Parameters:
name - the name of the default primary type of the node definition
being built.
getDefaultPrimaryType
public org.apache.jackrabbit.spi.Name getDefaultPrimaryType()
- Returns:
- the name of the default primary type of the node definition being
built.
addRequiredPrimaryType
public void addRequiredPrimaryType(org.apache.jackrabbit.spi.Name name)
- Adds a required primary type of the node definition being built.
- Parameters:
name - the name of a required primary type.
setRequiredPrimaryTypes
public void setRequiredPrimaryTypes(org.apache.jackrabbit.spi.Name[] names)
- Parameters:
names - array of names of the required primary types of the node
definition being built.
getRequiredPrimaryTypes
public org.apache.jackrabbit.spi.Name[] getRequiredPrimaryTypes()
- Returns:
- array of names of the required primary types of the node
definition being built.
setAllowsSameNameSiblings
public void setAllowsSameNameSiblings(boolean allowSns)
- Parameters:
allowSns - true if building a node definition with same name
siblings, false otherwise.
getAllowsSameNameSiblings
public boolean getAllowsSameNameSiblings()
- Returns:
- true if building a node definition with same name siblings, false
otherwise.
build
public org.apache.jackrabbit.spi.QNodeDefinition build()
throws IllegalStateException
- Creates a new
QNodeDefinition instance based on the state of this
builder.
- Returns:
- a new
QNodeDefinition instance.
- Throws:
IllegalStateException - if the instance has not the necessary
information to build the QNodeDefinition
instance.
Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.