org.apache.jackrabbit.jcr2spi.nodetype
Class NodeTypeManagerImpl

java.lang.Object
  extended by org.apache.jackrabbit.jcr2spi.nodetype.NodeTypeManagerImpl
All Implemented Interfaces:
NodeTypeManager, NodeTypeRegistryListener, Dumpable

public class NodeTypeManagerImpl
extends Object
implements NodeTypeManager, NodeTypeRegistryListener, Dumpable

A NodeTypeManagerImpl implements a session dependant NodeTypeManager.


Constructor Summary
NodeTypeManagerImpl(NodeTypeRegistry ntReg, ManagerProvider mgrProvider, ValueFactory valueFactory)
          Creates a new NodeTypeManagerImpl instance.
 
Method Summary
 void dump(PrintStream ps)
          Dumps the state of this instance in a human readable format for diagnostic purposes.
 NodeTypeIterator getAllNodeTypes()
          
 NodeTypeIterator getMixinNodeTypes()
          
 NodeDefinition getNodeDefinition(QNodeDefinition def)
          Retrieve the NodeDefinition for the given QNodeDefinition.
 NodeTypeImpl getNodeType(Name name)
           
 NodeType getNodeType(String nodeTypeName)
          
 NodeTypeIterator getPrimaryNodeTypes()
          
 PropertyDefinition getPropertyDefinition(QPropertyDefinition def)
          Retrieve the PropertyDefinition for the given QPropertyDefinition.
 boolean hasNodeType(Name nodeTypeName)
           
 void nodeTypeRegistered(Name ntName)
          Called when a node type has been registered.
 void nodeTypeReRegistered(Name ntName)
          Called when a node type has been re-registered.
 void nodeTypeUnregistered(Name ntName)
          Called when a node type has been deregistered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeTypeManagerImpl

public NodeTypeManagerImpl(NodeTypeRegistry ntReg,
                           ManagerProvider mgrProvider,
                           ValueFactory valueFactory)
Creates a new NodeTypeManagerImpl instance.

Parameters:
ntReg - node type registry
mgrProvider - the manager provider
valueFactory - the JCR value factory
Method Detail

getNodeType

public NodeTypeImpl getNodeType(Name name)
                         throws NoSuchNodeTypeException
Parameters:
name -
Returns:
Throws:
NoSuchNodeTypeException

hasNodeType

public boolean hasNodeType(Name nodeTypeName)
Parameters:
nodeTypeName -
Returns:

getNodeDefinition

public NodeDefinition getNodeDefinition(QNodeDefinition def)
Retrieve the NodeDefinition for the given QNodeDefinition.

Parameters:
def -
Returns:

getPropertyDefinition

public PropertyDefinition getPropertyDefinition(QPropertyDefinition def)
Retrieve the PropertyDefinition for the given QPropertyDefinition.

Parameters:
def -
Returns:

nodeTypeRegistered

public void nodeTypeRegistered(Name ntName)
Called when a node type has been registered.

Specified by:
nodeTypeRegistered in interface NodeTypeRegistryListener
Parameters:
ntName - name of the node type that has been registered

nodeTypeReRegistered

public void nodeTypeReRegistered(Name ntName)
Called when a node type has been re-registered.

Specified by:
nodeTypeReRegistered in interface NodeTypeRegistryListener
Parameters:
ntName - name of the node type that has been registered

nodeTypeUnregistered

public void nodeTypeUnregistered(Name ntName)
Called when a node type has been deregistered.

Specified by:
nodeTypeUnregistered in interface NodeTypeRegistryListener
Parameters:
ntName - name of the node type that has been unregistered

getAllNodeTypes

public NodeTypeIterator getAllNodeTypes()
                                 throws RepositoryException

Specified by:
getAllNodeTypes in interface NodeTypeManager
Throws:
RepositoryException

getPrimaryNodeTypes

public NodeTypeIterator getPrimaryNodeTypes()
                                     throws RepositoryException

Specified by:
getPrimaryNodeTypes in interface NodeTypeManager
Throws:
RepositoryException

getMixinNodeTypes

public NodeTypeIterator getMixinNodeTypes()
                                   throws RepositoryException

Specified by:
getMixinNodeTypes in interface NodeTypeManager
Throws:
RepositoryException

getNodeType

public NodeType getNodeType(String nodeTypeName)
                     throws NoSuchNodeTypeException

Specified by:
getNodeType in interface NodeTypeManager
Throws:
NoSuchNodeTypeException

dump

public void dump(PrintStream ps)
Dumps the state of this instance in a human readable format for diagnostic purposes.

Specified by:
dump in interface Dumpable
Parameters:
ps - stream to dump state to


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