Class QNodeTypeDefinitionBuilder
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.nodetype.QNodeTypeDefinitionBuilder
-
public class QNodeTypeDefinitionBuilder extends Object
A builder forQNodeTypeDefinition.
-
-
Constructor Summary
Constructors Constructor Description QNodeTypeDefinitionBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.jackrabbit.spi.QNodeTypeDefinitionbuild()Creates a newQNodeTypeDefinitioninstance based on the state of this builder.org.apache.jackrabbit.spi.QNodeDefinition[]getChildNodeDefs()org.apache.jackrabbit.spi.NamegetName()org.apache.jackrabbit.spi.NamegetPrimaryItemName()org.apache.jackrabbit.spi.QPropertyDefinition[]getPropertyDefs()org.apache.jackrabbit.spi.Name[]getSuperTypes()Returns an array containing the names of the supertypes of the node type definition being built.org.apache.jackrabbit.spi.Name[]getSupportedMixinTypes()Returns an array containing the names of additional mixin types supported on this node type.booleanhasOrderableChildNodes()booleanisAbstract()booleanisMixin()booleanisQueryable()voidsetAbstract(boolean isAbstract)voidsetChildNodeDefs(org.apache.jackrabbit.spi.QNodeDefinition[] childDefs)voidsetMixin(boolean isMixin)voidsetName(org.apache.jackrabbit.spi.Name name)Set the name of the node type definition being builtvoidsetOrderableChildNodes(boolean isOrderable)voidsetPrimaryItemName(org.apache.jackrabbit.spi.Name primaryItemName)voidsetPropertyDefs(org.apache.jackrabbit.spi.QPropertyDefinition[] propDefs)voidsetQueryable(boolean queryable)voidsetSupertypes(org.apache.jackrabbit.spi.Name[] supertypes)Specifies the supertypes of the node type definition being builtvoidsetSupportedMixinTypes(org.apache.jackrabbit.spi.Name[] names)Sets the names of additional mixin types supported on this node type.
-
-
-
Method Detail
-
setName
public void setName(org.apache.jackrabbit.spi.Name name)
Set the name of the node type definition being built- Parameters:
name- the name- See Also:
NodeTypeDefinition.getName()
-
getName
public org.apache.jackrabbit.spi.Name getName()
- Returns:
- the name of the node type definition being built or
nullif not set. - See Also:
NodeTypeDefinition.getName()
-
setSupertypes
public void setSupertypes(org.apache.jackrabbit.spi.Name[] supertypes)
Specifies the supertypes of the node type definition being built- Parameters:
supertypes- the supertypes- See Also:
NodeTypeDefinition.getDeclaredSupertypeNames()
-
getSuperTypes
public org.apache.jackrabbit.spi.Name[] getSuperTypes()
Returns an array containing the names of the supertypes of the node type definition being built.- Returns:
- an array of supertype names
- See Also:
NodeTypeDefinition.getDeclaredSupertypeNames()
-
setMixin
public void setMixin(boolean isMixin)
- Parameters:
isMixin-trueif building a mixin node type definition;falseotherwise.- See Also:
NodeTypeDefinition.isMixin()
-
isMixin
public boolean isMixin()
- Returns:
trueif building a mixin node type definition;falseotherwise.- See Also:
NodeTypeDefinition.isMixin()
-
setSupportedMixinTypes
public void setSupportedMixinTypes(org.apache.jackrabbit.spi.Name[] names)
Sets the names of additional mixin types supported on this node type.- Parameters:
names- an array of mixin type names, ornullwhen there are no known constraints
-
getSupportedMixinTypes
public org.apache.jackrabbit.spi.Name[] getSupportedMixinTypes()
Returns an array containing the names of additional mixin types supported on this node type.- Returns:
- an array of mixin type names, or
nullwhen there are no known constraints.
-
setOrderableChildNodes
public void setOrderableChildNodes(boolean isOrderable)
- Parameters:
isOrderable-trueif building a node type having orderable child nodes;falseotherwise.- See Also:
NodeTypeDefinition.hasOrderableChildNodes()
-
hasOrderableChildNodes
public boolean hasOrderableChildNodes()
- Returns:
trueif building a node type having orderable child nodes;falseotherwise.- See Also:
NodeTypeDefinition.hasOrderableChildNodes()
-
setPrimaryItemName
public void setPrimaryItemName(org.apache.jackrabbit.spi.Name primaryItemName)
- Parameters:
primaryItemName- the name of the primary item ornullif not set.- See Also:
NodeTypeDefinition.getPrimaryItemName()
-
getPrimaryItemName
public org.apache.jackrabbit.spi.Name getPrimaryItemName()
- Returns:
- the name of the primary item or
nullif not set. - See Also:
NodeTypeDefinition.getPrimaryItemName()
-
isAbstract
public boolean isAbstract()
- Returns:
trueif the node type is abstract.- See Also:
NodeTypeDefinition.isAbstract()
-
setAbstract
public void setAbstract(boolean isAbstract)
- Parameters:
isAbstract-trueif building a node type that is abstract.- See Also:
NodeTypeDefinition.isAbstract()
-
isQueryable
public boolean isQueryable()
- Returns:
trueif the node type is queryable- See Also:
NodeTypeDefinition.isQueryable()
-
setQueryable
public void setQueryable(boolean queryable)
- Parameters:
queryable-trueif building a node type that is queryable- See Also:
NodeTypeDefinition.isQueryable()
-
setPropertyDefs
public void setPropertyDefs(org.apache.jackrabbit.spi.QPropertyDefinition[] propDefs)
- Parameters:
propDefs- an array containing the property definitions of the node type definition being built.- See Also:
NodeTypeDefinition.getDeclaredPropertyDefinitions()
-
getPropertyDefs
public org.apache.jackrabbit.spi.QPropertyDefinition[] getPropertyDefs()
- Returns:
- an array containing the property definitions of the node type definition being built.
- See Also:
NodeTypeDefinition.getDeclaredPropertyDefinitions()
-
setChildNodeDefs
public void setChildNodeDefs(org.apache.jackrabbit.spi.QNodeDefinition[] childDefs)
- Parameters:
childDefs- an array containing the child node definitions of the node type definition being.- See Also:
NodeTypeDefinition.getDeclaredChildNodeDefinitions()
-
getChildNodeDefs
public org.apache.jackrabbit.spi.QNodeDefinition[] getChildNodeDefs()
- Returns:
- an array containing the child node definitions of the node type definition being built.
- See Also:
NodeTypeDefinition.getDeclaredChildNodeDefinitions()
-
build
public org.apache.jackrabbit.spi.QNodeTypeDefinition build() throws IllegalStateExceptionCreates a newQNodeTypeDefinitioninstance based on the state of this builder.- Returns:
- a new
QNodeTypeDefinitioninstance. - Throws:
IllegalStateException- if the instance has not the necessary information to build the QNodeTypeDefinition instance.
-
-