Class QNodeTypeDefinitionBuilder
java.lang.Object
org.apache.jackrabbit.spi.commons.nodetype.QNodeTypeDefinitionBuilder
A builder for
QNodeTypeDefinition.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates a newQNodeTypeDefinitioninstance based on the state of this builder.getName()Name[]Returns an array containing the names of the supertypes of the node type definition being built.Name[]Returns an array containing the names of additional mixin types supported on this node type.booleanbooleanbooleanisMixin()booleanvoidsetAbstract(boolean isAbstract) voidsetChildNodeDefs(QNodeDefinition[] childDefs) voidsetMixin(boolean isMixin) voidSet 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.
-
Constructor Details
-
QNodeTypeDefinitionBuilder
public QNodeTypeDefinitionBuilder()
-
-
Method Details
-
setName
Set the name of the node type definition being built- Parameters:
name- the name- See Also:
-
getName
- Returns:
- the name of the node type definition being built or
nullif not set. - See Also:
-
setSupertypes
Specifies the supertypes of the node type definition being built- Parameters:
supertypes- the supertypes- See Also:
-
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:
-
setMixin
public void setMixin(boolean isMixin) - Parameters:
isMixin-trueif building a mixin node type definition;falseotherwise.- See Also:
-
isMixin
public boolean isMixin()- Returns:
trueif building a mixin node type definition;falseotherwise.- See Also:
-
setSupportedMixinTypes
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
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:
-
hasOrderableChildNodes
public boolean hasOrderableChildNodes()- Returns:
trueif building a node type having orderable child nodes;falseotherwise.- See Also:
-
setPrimaryItemName
- Parameters:
primaryItemName- the name of the primary item ornullif not set.- See Also:
-
getPrimaryItemName
- Returns:
- the name of the primary item or
nullif not set. - See Also:
-
isAbstract
public boolean isAbstract()- Returns:
trueif the node type is abstract.- See Also:
-
setAbstract
public void setAbstract(boolean isAbstract) - Parameters:
isAbstract-trueif building a node type that is abstract.- See Also:
-
isQueryable
public boolean isQueryable()- Returns:
trueif the node type is queryable- See Also:
-
setQueryable
public void setQueryable(boolean queryable) - Parameters:
queryable-trueif building a node type that is queryable- See Also:
-
setPropertyDefs
- Parameters:
propDefs- an array containing the property definitions of the node type definition being built.- See Also:
-
getPropertyDefs
- Returns:
- an array containing the property definitions of the node type definition being built.
- See Also:
-
setChildNodeDefs
- Parameters:
childDefs- an array containing the child node definitions of the node type definition being.- See Also:
-
getChildNodeDefs
- Returns:
- an array containing the child node definitions of the node type definition being built.
- See Also:
-
build
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.
-