org.jboss.dna.jcr.nodetype
Interface NodeTypeTemplate

All Superinterfaces:
NodeTypeDefinition
All Known Implementing Classes:
JcrNodeTypeTemplate

@NotThreadSafe
public interface NodeTypeTemplate
extends NodeTypeDefinition

A template that can be used to create new node types, patterned after the approach in the proposed JSR-283. This interface extends the NodeTypeDefinition interface and adds setter methods for the various attributes.


Method Summary
 List<NodeDefinitionTemplate> getNodeDefinitionTemplates()
          Get the modifiable list of child node definition templates for this node type
 List<PropertyDefinitionTemplate> getPropertyDefinitionTemplates()
          Get the modifiable list of property definition templates for this node type.
 void setAbstract(boolean isAbstract)
          Set whether this node type is abstract.
 void setDeclaredSupertypeNames(String[] names)
          Set the direct supertypes for this node type.
 void setMixin(boolean mixin)
          Set whether this node type is a mixin.
 void setName(String name)
          Set the name of the node type
 void setOrderableChildNodes(boolean orderable)
          Set whether this node type supports orderable child nodes.
 void setPrimaryItemName(String name)
          Set the name of the primary item for this node type
 
Methods inherited from interface org.jboss.dna.jcr.nodetype.NodeTypeDefinition
getDeclaredNodeDefinitions, getDeclaredPropertyDefinitions, getDeclaredSupertypes, getName, getPrimaryItemName, hasOrderableChildNodes, isAbstract, isMixin
 

Method Detail

setName

void setName(String name)
Set the name of the node type

Parameters:
name - the name

setDeclaredSupertypeNames

void setDeclaredSupertypeNames(String[] names)
Set the direct supertypes for this node type.

Parameters:
names - the names of the direct supertypes, or empty or null if there are none.

setAbstract

void setAbstract(boolean isAbstract)
Set whether this node type is abstract.

Parameters:
isAbstract - true if this node type is to be abstract, or false if it is concrete

setMixin

void setMixin(boolean mixin)
Set whether this node type is a mixin.

Parameters:
mixin - true if this node type is a mixin, or false otherwise

setOrderableChildNodes

void setOrderableChildNodes(boolean orderable)
Set whether this node type supports orderable child nodes.

Parameters:
orderable - true if this node type supports orderable child nodes, or false otherwise

setPrimaryItemName

void setPrimaryItemName(String name)
Set the name of the primary item for this node type

Parameters:
name - the name of the child node or property that represents the primary item for nodes that use this type, or null if there is none

getPropertyDefinitionTemplates

List<PropertyDefinitionTemplate> getPropertyDefinitionTemplates()
Get the modifiable list of property definition templates for this node type.

Returns:
the node type's list of property definition templates; never null

getNodeDefinitionTemplates

List<NodeDefinitionTemplate> getNodeDefinitionTemplates()
Get the modifiable list of child node definition templates for this node type

Returns:
the node type's list of child node definition templates; never null


Copyright © 2008-2009 JBoss, a division of Red Hat. All Rights Reserved.