Package javax.jcr.nodetype
Interface NodeTypeTemplate
-
- All Superinterfaces:
NodeTypeDefinition
- All Known Implementing Classes:
NodeTypeTemplateImpl
public interface NodeTypeTemplate extends NodeTypeDefinition
TheNodeTypeTemplateinterface is used to define node types which are then registered through theNodeTypeManager.registerNodeTypemethod.NodeTypeTemplate, likeNodeType, is a subclass ofNodeTypeDefinitionso it shares withNodeTypethose methods that are relevant to a static definition. In addition,NodeTypeTemplateprovides methods for setting the attributes of the definition.See the corresponding
getmethods for each attribute inNodeTypeDefinitionfor the default values assumed when a new emptyNodeTypeTemplateis created (as opposed to one extracted from an existingNodeType).- Since:
- JCR 2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.ListgetNodeDefinitionTemplates()Returns a mutableListofNodeDefinitionTemplateobjects.java.util.ListgetPropertyDefinitionTemplates()Returns a mutableListofPropertyDefinitionTemplateobjects.voidsetAbstract(boolean abstractStatus)Sets the abstract flag of the node type.voidsetDeclaredSuperTypeNames(java.lang.String[] names)Sets the names of the supertypes of the node type.voidsetMixin(boolean mixin)Sets the mixin flag of the node type.voidsetName(java.lang.String name)Sets the name of the node type.voidsetOrderableChildNodes(boolean orderable)Sets the orderable child nodes flag of the node type.voidsetPrimaryItemName(java.lang.String name)Sets the name of the primary item.voidsetQueryable(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 Detail
-
setName
void setName(java.lang.String name) throws ConstraintViolationExceptionSets 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- ifnameis not a syntactically valid JCR name in either qualified or expanded form.
-
setDeclaredSuperTypeNames
void setDeclaredSuperTypeNames(java.lang.String[] names) throws ConstraintViolationExceptionSets 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- ifnamesincludes 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
void setPrimaryItemName(java.lang.String name) throws ConstraintViolationExceptionSets 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- ifnameis 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
java.util.List getPropertyDefinitionTemplates()
Returns a mutableListofPropertyDefinitionTemplateobjects. To define a newNodeTypeTemplateor change an existing one,PropertyDefinitionTemplateobjects can be added to or removed from thisList.- Returns:
- a mutable
ListofPropertyDefinitionTemplateobjects.
-
getNodeDefinitionTemplates
java.util.List getNodeDefinitionTemplates()
Returns a mutableListofNodeDefinitionTemplateobjects. To define a newNodeTypeTemplateor change an existing one,NodeDefinitionTemplateobjects can be added to or removed from thisList.- Returns:
- a mutable
ListofNodeDefinitionTemplateobjects.
-
-