Class QNodeDefinitionBuilder
java.lang.Object
org.apache.jackrabbit.spi.commons.nodetype.QItemDefinitionBuilder
org.apache.jackrabbit.spi.commons.nodetype.QNodeDefinitionBuilder
A builder for a
QNodeDefinition.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRequiredPrimaryType(Name name) Adds a required primary type of the node definition being built.build()Creates a newQNodeDefinitioninstance based on the state of this builder.booleanName[]voidsetAllowsSameNameSiblings(boolean allowSns) voidsetDefaultPrimaryType(Name name) voidsetRequiredPrimaryTypes(Name[] names) Methods inherited from class org.apache.jackrabbit.spi.commons.nodetype.QItemDefinitionBuilder
getAutoCreated, getDeclaringNodeType, getMandatory, getName, getOnParentVersion, getProtected, setAutoCreated, setDeclaringNodeType, setMandatory, setName, setOnParentVersion, setProtected
-
Constructor Details
-
QNodeDefinitionBuilder
public QNodeDefinitionBuilder()
-
-
Method Details
-
setDefaultPrimaryType
- Parameters:
name- the name of the default primary type of the node definition being built.
-
getDefaultPrimaryType
- Returns:
- the name of the default primary type of the node definition being built.
-
addRequiredPrimaryType
Adds a required primary type of the node definition being built.- Parameters:
name- the name of a required primary type.
-
setRequiredPrimaryTypes
- Parameters:
names- array of names of the required primary types of the node definition being built.
-
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
Creates a newQNodeDefinitioninstance based on the state of this builder.- Returns:
- a new
QNodeDefinitioninstance. - Throws:
IllegalStateException- if the instance has not the necessary information to build the QNodeDefinition instance.
-