org.apache.jackrabbit.spi.commons.nodetype
Class AbstractNodeTypeManager

java.lang.Object
  extended by org.apache.jackrabbit.spi.commons.nodetype.AbstractNodeTypeManager
All Implemented Interfaces:
NodeTypeManager
Direct Known Subclasses:
NodeTypeManagerImpl, NodeTypeManagerImpl

public abstract class AbstractNodeTypeManager
extends Object
implements NodeTypeManager

AbstractNodeTypeManager covers creation of node type templates and definition templates.


Constructor Summary
AbstractNodeTypeManager()
           
 
Method Summary
 NodeDefinitionTemplate createNodeDefinitionTemplate()
           
 NodeTypeTemplate createNodeTypeTemplate()
           
 NodeTypeTemplate createNodeTypeTemplate(NodeTypeDefinition ntd)
           
 PropertyDefinitionTemplate createPropertyDefinitionTemplate()
           
abstract  NamePathResolver getNamePathResolver()
          Returns the NamePathResolver used to validate JCR names.
abstract  NodeDefinition getNodeDefinition(QNodeDefinition nd)
          Retrieve the NodeDefinition for the given QNodeDefinition.
abstract  NodeType getNodeType(Name ntName)
          Return the node type with the specified ntName.
abstract  PropertyDefinition getPropertyDefinition(QPropertyDefinition pd)
          Retrieve the PropertyDefinition for the given QPropertyDefinition.
 NodeType registerNodeType(NodeTypeDefinition ntd, boolean allowUpdate)
           
 void unregisterNodeType(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jcr.nodetype.NodeTypeManager
getAllNodeTypes, getMixinNodeTypes, getNodeType, getPrimaryNodeTypes, hasNodeType, registerNodeTypes, unregisterNodeTypes
 

Constructor Detail

AbstractNodeTypeManager

public AbstractNodeTypeManager()
Method Detail

getNodeType

public abstract NodeType getNodeType(Name ntName)
                              throws NoSuchNodeTypeException
Return the node type with the specified ntName.

Parameters:
ntName - Name of the node type to be returned.
Returns:
the node type with the specified ntName.
Throws:
NoSuchNodeTypeException - If no such node type exists.

getNodeDefinition

public abstract NodeDefinition getNodeDefinition(QNodeDefinition nd)
Retrieve the NodeDefinition for the given QNodeDefinition.

Parameters:
nd - the QNodeDefinition.
Returns:
the node definition.

getPropertyDefinition

public abstract PropertyDefinition getPropertyDefinition(QPropertyDefinition pd)
Retrieve the PropertyDefinition for the given QPropertyDefinition.

Parameters:
pd - the QPropertyDefinition.
Returns:
the property definition.

getNamePathResolver

public abstract NamePathResolver getNamePathResolver()
Returns the NamePathResolver used to validate JCR names.

Returns:
the NamePathResolver used to convert JCR names/paths to internal onces and vice versa. The resolver may also be used to validate names passed to the various templates.

createNodeTypeTemplate

public NodeTypeTemplate createNodeTypeTemplate()
                                        throws UnsupportedRepositoryOperationException,
                                               RepositoryException
Specified by:
createNodeTypeTemplate in interface NodeTypeManager
Throws:
UnsupportedRepositoryOperationException
RepositoryException
See Also:
NodeTypeManager.createNodeTypeTemplate()

createNodeTypeTemplate

public NodeTypeTemplate createNodeTypeTemplate(NodeTypeDefinition ntd)
                                        throws UnsupportedRepositoryOperationException,
                                               RepositoryException
Specified by:
createNodeTypeTemplate in interface NodeTypeManager
Throws:
UnsupportedRepositoryOperationException
RepositoryException
See Also:
NodeTypeManager.createNodeTypeTemplate(NodeTypeDefinition)

createNodeDefinitionTemplate

public NodeDefinitionTemplate createNodeDefinitionTemplate()
                                                    throws UnsupportedRepositoryOperationException,
                                                           RepositoryException
Specified by:
createNodeDefinitionTemplate in interface NodeTypeManager
Throws:
UnsupportedRepositoryOperationException
RepositoryException
See Also:
NodeTypeManager.createNodeDefinitionTemplate()

createPropertyDefinitionTemplate

public PropertyDefinitionTemplate createPropertyDefinitionTemplate()
                                                            throws UnsupportedRepositoryOperationException,
                                                                   RepositoryException
Specified by:
createPropertyDefinitionTemplate in interface NodeTypeManager
Throws:
UnsupportedRepositoryOperationException
RepositoryException
See Also:
NodeTypeManager.createPropertyDefinitionTemplate()

registerNodeType

public NodeType registerNodeType(NodeTypeDefinition ntd,
                                 boolean allowUpdate)
                          throws RepositoryException
Specified by:
registerNodeType in interface NodeTypeManager
Throws:
RepositoryException
See Also:
NodeTypeManager.registerNodeType(NodeTypeDefinition, boolean)

unregisterNodeType

public void unregisterNodeType(String name)
                        throws UnsupportedRepositoryOperationException,
                               NoSuchNodeTypeException,
                               RepositoryException
Specified by:
unregisterNodeType in interface NodeTypeManager
Throws:
UnsupportedRepositoryOperationException
NoSuchNodeTypeException
RepositoryException
See Also:
NodeTypeManager.unregisterNodeType(String)


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