Package javax.jcr.nodetype
Interface NodeTypeTemplate
- All Superinterfaces:
NodeTypeDefinition
- All Known Implementing Classes:
NodeTypeTemplateImpl
The
NodeTypeTemplate
interface is used to define node types which
are then registered through the NodeTypeManager.registerNodeType
method.
NodeTypeTemplate
, like NodeType
, is a subclass of
NodeTypeDefinition
so it shares with NodeType
those
methods that are relevant to a static definition. In addition,
NodeTypeTemplate
provides methods for setting the attributes of
the definition.
See the corresponding get
methods for each attribute in
NodeTypeDefinition
for the default values assumed when a new
empty NodeTypeTemplate
is created (as opposed to one extracted
from an existing NodeType
).
- Since:
- JCR 2.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns a mutableList
ofNodeDefinitionTemplate
objects.Returns a mutableList
ofPropertyDefinitionTemplate
objects.void
setAbstract
(boolean abstractStatus) Sets the abstract flag of the node type.void
setDeclaredSuperTypeNames
(String[] names) Sets the names of the supertypes of the node type.void
setMixin
(boolean mixin) Sets the mixin flag of the node type.void
Sets the name of the node type.void
setOrderableChildNodes
(boolean orderable) Sets the orderable child nodes flag of the node type.void
setPrimaryItemName
(String name) Sets the name of the primary item.void
setQueryable
(boolean queryable) Sets the queryable status of the node type.Methods inherited from interface javax.jcr.nodetype.NodeTypeDefinition
getDeclaredChildNodeDefinitions, getDeclaredPropertyDefinitions, getDeclaredSupertypeNames, getName, getPrimaryItemName, hasOrderableChildNodes, isAbstract, isMixin, isQueryable
-
Method Details
-
setName
Sets the name of the node type. This must be a JCR name in either qualified or expanded form.- Parameters:
name
- a JCR name.- Throws:
ConstraintViolationException
- ifname
is not a syntactically valid JCR name in either qualified or expanded form.
-
setDeclaredSuperTypeNames
Sets the names of the supertypes of the node type. These must be a JCR names in either qualified or expanded form.- Parameters:
names
- an array of JCR names.- Throws:
ConstraintViolationException
- ifnames
includes a name that is not a syntactically valid JCR name in either qualified or expanded form.
-
setAbstract
void setAbstract(boolean abstractStatus) Sets the abstract flag of the node type.- Parameters:
abstractStatus
- aboolean
.
-
setMixin
void setMixin(boolean mixin) Sets the mixin flag of the node type.- Parameters:
mixin
- aboolean
.
-
setOrderableChildNodes
void setOrderableChildNodes(boolean orderable) Sets the orderable child nodes flag of the node type.- Parameters:
orderable
- aboolean
.
-
setPrimaryItemName
Sets the name of the primary item. This must be a JCR name in either qualified or expanded form.- Parameters:
name
- a JCR name.- Throws:
ConstraintViolationException
- ifname
is not a syntactically valid JCR name in either qualified or expanded form.
-
setQueryable
void setQueryable(boolean queryable) Sets the queryable status of the node type.- Parameters:
queryable
- aboolean
.
-
getPropertyDefinitionTemplates
List getPropertyDefinitionTemplates()Returns a mutableList
ofPropertyDefinitionTemplate
objects. To define a newNodeTypeTemplate
or change an existing one,PropertyDefinitionTemplate
objects can be added to or removed from thisList
.- Returns:
- a mutable
List
ofPropertyDefinitionTemplate
objects.
-
getNodeDefinitionTemplates
List getNodeDefinitionTemplates()Returns a mutableList
ofNodeDefinitionTemplate
objects. To define a newNodeTypeTemplate
or change an existing one,NodeDefinitionTemplate
objects can be added to or removed from thisList
.- Returns:
- a mutable
List
ofNodeDefinitionTemplate
objects.
-