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 QNodeTypeDefinition
build()
Creates a newQNodeTypeDefinition
instance based on the state of this builder.QNodeDefinition[]
getChildNodeDefs()
Name
getName()
Name
getPrimaryItemName()
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.boolean
hasOrderableChildNodes()
boolean
isAbstract()
boolean
isMixin()
boolean
isQueryable()
void
setAbstract(boolean isAbstract)
void
setChildNodeDefs(QNodeDefinition[] childDefs)
void
setMixin(boolean isMixin)
void
setName(Name name)
Set the name of the node type definition being builtvoid
setOrderableChildNodes(boolean isOrderable)
void
setPrimaryItemName(Name primaryItemName)
void
setPropertyDefs(QPropertyDefinition[] propDefs)
void
setQueryable(boolean queryable)
void
setSupertypes(Name[] supertypes)
Specifies the supertypes of the node type definition being builtvoid
setSupportedMixinTypes(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
null
if 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
-true
if building a mixin node type definition;false
otherwise.- See Also:
NodeTypeDefinition.isMixin()
-
isMixin
public boolean isMixin()
- Returns:
true
if building a mixin node type definition;false
otherwise.- 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, ornull
when 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
null
when there are no known constraints.
-
setOrderableChildNodes
public void setOrderableChildNodes(boolean isOrderable)
- Parameters:
isOrderable
-true
if building a node type having orderable child nodes;false
otherwise.- See Also:
NodeTypeDefinition.hasOrderableChildNodes()
-
hasOrderableChildNodes
public boolean hasOrderableChildNodes()
- Returns:
true
if building a node type having orderable child nodes;false
otherwise.- See Also:
NodeTypeDefinition.hasOrderableChildNodes()
-
setPrimaryItemName
public void setPrimaryItemName(Name primaryItemName)
- Parameters:
primaryItemName
- the name of the primary item ornull
if not set.- See Also:
NodeTypeDefinition.getPrimaryItemName()
-
getPrimaryItemName
public Name getPrimaryItemName()
- Returns:
- the name of the primary item or
null
if not set. - See Also:
NodeTypeDefinition.getPrimaryItemName()
-
isAbstract
public boolean isAbstract()
- Returns:
true
if the node type is abstract.- See Also:
NodeTypeDefinition.isAbstract()
-
setAbstract
public void setAbstract(boolean isAbstract)
- Parameters:
isAbstract
-true
if building a node type that is abstract.- See Also:
NodeTypeDefinition.isAbstract()
-
isQueryable
public boolean isQueryable()
- Returns:
true
if the node type is queryable- See Also:
NodeTypeDefinition.isQueryable()
-
setQueryable
public void setQueryable(boolean queryable)
- Parameters:
queryable
-true
if 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 newQNodeTypeDefinition
instance based on the state of this builder.- Returns:
- a new
QNodeTypeDefinition
instance. - Throws:
IllegalStateException
- if the instance has not the necessary information to build the QNodeTypeDefinition instance.
-
-