org.jboss.dna.jcr
Class JcrNodeTypeTemplate

java.lang.Object
  extended by org.jboss.dna.jcr.JcrNodeTypeTemplate
All Implemented Interfaces:
NodeTypeDefinition, NodeTypeTemplate

@NotThreadSafe
public class JcrNodeTypeTemplate
extends Object
implements NodeTypeTemplate

DNA implementation of the JCR NodeTypeTemplate interface


Method Summary
 javax.jcr.nodetype.NodeDefinition[] getDeclaredNodeDefinitions()
          Get the array of child node definition templates for this node type
 javax.jcr.nodetype.PropertyDefinition[] getDeclaredPropertyDefinitions()
          Get the array of property definition templates for this node type.
 String[] getDeclaredSupertypes()
          Get the direct supertypes for this node type.
 String getName()
          Get the name of the node type being defined
 List<NodeDefinitionTemplate> getNodeDefinitionTemplates()
          Get the modifiable list of child node definition templates for this node type
 String getPrimaryItemName()
          Get the name of the primary item for this node type
 List<PropertyDefinitionTemplate> getPropertyDefinitionTemplates()
          Get the modifiable list of property definition templates for this node type.
 boolean hasOrderableChildNodes()
          Get whether this node type supports orderable child nodes.
 boolean isAbstract()
          Get whether this node type is abstract.
 boolean isMixin()
          Get whether this node type is a mixin.
 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 class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNodeDefinitionTemplates

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

Specified by:
getNodeDefinitionTemplates in interface NodeTypeTemplate
Returns:
the node type's list of child node definition templates; never null
See Also:
NodeTypeTemplate.getNodeDefinitionTemplates()

getPropertyDefinitionTemplates

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

Specified by:
getPropertyDefinitionTemplates in interface NodeTypeTemplate
Returns:
the node type's list of property definition templates; never null
See Also:
NodeTypeTemplate.getPropertyDefinitionTemplates()

setAbstract

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

Specified by:
setAbstract in interface NodeTypeTemplate
Parameters:
isAbstract - true if this node type is to be abstract, or false if it is concrete
See Also:
NodeTypeTemplate.setAbstract(boolean)

setDeclaredSupertypeNames

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

Specified by:
setDeclaredSupertypeNames in interface NodeTypeTemplate
Parameters:
names - the names of the direct supertypes, or empty or null if there are none.
See Also:
NodeTypeTemplate.setDeclaredSupertypeNames(java.lang.String[])

setMixin

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

Specified by:
setMixin in interface NodeTypeTemplate
Parameters:
mixin - true if this node type is a mixin, or false otherwise
See Also:
NodeTypeTemplate.setMixin(boolean)

setName

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

Specified by:
setName in interface NodeTypeTemplate
Parameters:
name - the name
See Also:
NodeTypeTemplate.setName(java.lang.String)

setOrderableChildNodes

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

Specified by:
setOrderableChildNodes in interface NodeTypeTemplate
Parameters:
orderable - true if this node type supports orderable child nodes, or false otherwise
See Also:
NodeTypeTemplate.setOrderableChildNodes(boolean)

setPrimaryItemName

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

Specified by:
setPrimaryItemName in interface NodeTypeTemplate
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
See Also:
type.NodeTypeTemplate#setPrimaryItemName(java.lang.String)

getDeclaredNodeDefinitions

public javax.jcr.nodetype.NodeDefinition[] getDeclaredNodeDefinitions()
Get the array of child node definition templates for this node type

Specified by:
getDeclaredNodeDefinitions in interface NodeTypeDefinition
Returns:
the node type's list of child node definitions; never null
See Also:
NodeTypeDefinition.getDeclaredNodeDefinitions()

getDeclaredPropertyDefinitions

public javax.jcr.nodetype.PropertyDefinition[] getDeclaredPropertyDefinitions()
Get the array of property definition templates for this node type.

Specified by:
getDeclaredPropertyDefinitions in interface NodeTypeDefinition
Returns:
the node type's list of property definitions; never null
See Also:
NodeTypeDefinition.getDeclaredPropertyDefinitions()

getDeclaredSupertypes

public String[] getDeclaredSupertypes()
Get the direct supertypes for this node type.

Specified by:
getDeclaredSupertypes in interface NodeTypeDefinition
Returns:
the names of the direct supertypes, or an empty array if there are none
See Also:
NodeTypeDefinition.getDeclaredSupertypes()

getName

public String getName()
Get the name of the node type being defined

Specified by:
getName in interface NodeTypeDefinition
Returns:
the name
See Also:
NodeTypeDefinition.getName()

getPrimaryItemName

public String getPrimaryItemName()
Get the name of the primary item for this node type

Specified by:
getPrimaryItemName in interface NodeTypeDefinition
Returns:
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
See Also:
NodeTypeDefinition.getPrimaryItemName()

hasOrderableChildNodes

public boolean hasOrderableChildNodes()
Get whether this node type supports orderable child nodes.

Specified by:
hasOrderableChildNodes in interface NodeTypeDefinition
Returns:
true if this node type supports orderable child nodes, or false otherwise
See Also:
NodeTypeDefinition.hasOrderableChildNodes()

isAbstract

public boolean isAbstract()
Get whether this node type is abstract.

Specified by:
isAbstract in interface NodeTypeDefinition
Returns:
true if this node type is abstract, or false if it is concrete
See Also:
NodeTypeDefinition.isAbstract()

isMixin

public boolean isMixin()
Get whether this node type is a mixin.

Specified by:
isMixin in interface NodeTypeDefinition
Returns:
true if this node type is a mixin, or false if it is concrete
See Also:
NodeTypeDefinition.isMixin()


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