org.apache.jackrabbit.core.nodetype.jsr283
Interface NodeTypeTemplate

All Superinterfaces:
NodeTypeDefinition
All Known Implementing Classes:
NodeTypeTemplateImpl

public interface NodeTypeTemplate
extends NodeTypeDefinition

The NodeTypeTemplate interface represents a simple container structure 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. Implementations of this interface need not contain any validation logic.

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
 List getNodeDefinitionTemplates()
          Returns a mutable List of NodeDefinitionTemplate objects.
 List getPropertyDefinitionTemplates()
          Returns a mutable List of PropertyDefinitionTemplate 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 setName(String name)
          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.
 
Methods inherited from interface org.apache.jackrabbit.core.nodetype.jsr283.NodeTypeDefinition
getDeclaredChildNodeDefinitions, getDeclaredPropertyDefinitions, getDeclaredSupertypeNames, getName, getPrimaryItemName, hasOrderableChildNodes, isAbstract, isMixin
 

Method Detail

setName

void setName(String name)
Sets the name of the node type.

Parameters:
name - a String.

setDeclaredSuperTypeNames

void setDeclaredSuperTypeNames(String[] names)
Sets the names of the supertypes of the node type.

Parameters:
names - a String array.

setAbstract

void setAbstract(boolean abstractStatus)
Sets the abstract flag of the node type.

Parameters:
abstractStatus - a boolean.

setMixin

void setMixin(boolean mixin)
Sets the mixin flag of the node type.

Parameters:
mixin - a boolean.

setOrderableChildNodes

void setOrderableChildNodes(boolean orderable)
Sets the orderable child nodes flag of the node type.

Parameters:
orderable - a boolean.

setPrimaryItemName

void setPrimaryItemName(String name)
Sets the name of the primary item.

Parameters:
name - a String.

getPropertyDefinitionTemplates

List getPropertyDefinitionTemplates()
Returns a mutable List of PropertyDefinitionTemplate objects. To define a new NodeTypeTemplate or change an existing one, PropertyDefinitionTemplate objects can be added to or removed from this List.

Returns:
a mutable List of PropertyDefinitionTemplate objects.

getNodeDefinitionTemplates

List getNodeDefinitionTemplates()
Returns a mutable List of NodeDefinitionTemplate objects. To define a new NodeTypeTemplate or change an existing one, NodeDefinitionTemplate objects can be added to or removed from this List.

Returns:
a mutable List of NodeDefinitionTemplate objects.


Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.