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 QNodeTypeDefinitionbuild()Creates a newQNodeTypeDefinitioninstance based on the state of this builder.QNodeDefinition[]getChildNodeDefs()NamegetName()NamegetPrimaryItemName()QPropertyDefinition[]getPropertyDefs()Name[]getSuperTypes()Returns an array containing the names of the supertypes of the node type definition being built.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(QNodeDefinition[] childDefs)voidsetMixin(boolean isMixin)voidsetName(Name name)Set the name of the node type definition being builtvoidsetOrderableChildNodes(boolean isOrderable)voidsetPrimaryItemName(Name primaryItemName)voidsetPropertyDefs(QPropertyDefinition[] propDefs)voidsetQueryable(boolean queryable)voidsetSupertypes(Name[] supertypes)Specifies the supertypes of the node type definition being builtvoidsetSupportedMixinTypes(Name[] names)Sets the names of additional mixin types supported on this node type.
-
-
-
Method Detail
-
setName
public void setName(Name name)
Set the name of the node type definition being built- Parameters:
name- the name- See Also:
NodeTypeDefinition.getName()
-
getName
public Name getName()
- Returns:
- the name of the node type definition being built or
nullif not set. - See Also:
NodeTypeDefinition.getName()
-
setSupertypes
public void setSupertypes(Name[] supertypes)
Specifies the supertypes of the node type definition being built- Parameters:
supertypes- the supertypes- See Also:
NodeTypeDefinition.getDeclaredSupertypeNames()
-
getSuperTypes
public 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(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 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(Name primaryItemName)
- Parameters:
primaryItemName- the name of the primary item ornullif not set.- See Also:
NodeTypeDefinition.getPrimaryItemName()
-
getPrimaryItemName
public 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(QPropertyDefinition[] propDefs)
- Parameters:
propDefs- an array containing the property definitions of the node type definition being built.- See Also:
NodeTypeDefinition.getDeclaredPropertyDefinitions()
-
getPropertyDefs
public QPropertyDefinition[] getPropertyDefs()
- Returns:
- an array containing the property definitions of the node type definition being built.
- See Also:
NodeTypeDefinition.getDeclaredPropertyDefinitions()
-
setChildNodeDefs
public void setChildNodeDefs(QNodeDefinition[] childDefs)
- Parameters:
childDefs- an array containing the child node definitions of the node type definition being.- See Also:
NodeTypeDefinition.getDeclaredChildNodeDefinitions()
-
getChildNodeDefs
public QNodeDefinition[] getChildNodeDefs()
- Returns:
- an array containing the child node definitions of the node type definition being built.
- See Also:
NodeTypeDefinition.getDeclaredChildNodeDefinitions()
-
build
public QNodeTypeDefinition build() throws IllegalStateException
Creates 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.
-
-