Class NodeTypeManagerImpl
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.nodetype.AbstractNodeTypeManager
-
- org.apache.jackrabbit.jcr2spi.nodetype.NodeTypeManagerImpl
-
- All Implemented Interfaces:
NodeTypeManager
,NodeTypeDefinitionProvider
,NodeTypeRegistryListener
public class NodeTypeManagerImpl extends AbstractNodeTypeManager implements NodeTypeDefinitionProvider, NodeTypeRegistryListener
ANodeTypeManagerImpl
implements a session dependant NodeTypeManager.
-
-
Constructor Summary
Constructors Constructor Description NodeTypeManagerImpl(NodeTypeRegistry ntReg, ManagerProvider mgrProvider)
Creates a newNodeTypeManagerImpl
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeTypeIterator
getAllNodeTypes()
NodeTypeIterator
getMixinNodeTypes()
NamePathResolver
getNamePathResolver()
Returns the NamePathResolver used to validate JCR names.NodeDefinition
getNodeDefinition(QNodeDefinition def)
Retrieve theNodeDefinition
for the givenQNodeDefinition
.NodeType
getNodeType(String nodeTypeName)
NodeTypeImpl
getNodeType(Name name)
Return the node type with the specifiedntName
.QNodeTypeDefinition
getNodeTypeDefinition(Name ntName)
NodeTypeIterator
getPrimaryNodeTypes()
PropertyDefinition
getPropertyDefinition(QPropertyDefinition def)
Retrieve thePropertyDefinition
for the givenQPropertyDefinition
.boolean
hasNodeType(String name)
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.NodeTypeIterator
registerNodeTypes(NodeTypeDefinition[] ntds, boolean allowUpdate)
String
toString()
Returns the the state of this instance in a human readable format.void
unregisterNodeTypes(String[] names)
-
Methods inherited from class org.apache.jackrabbit.spi.commons.nodetype.AbstractNodeTypeManager
createNodeDefinitionTemplate, createNodeTypeTemplate, createNodeTypeTemplate, createPropertyDefinitionTemplate, registerNodeType, unregisterNodeType
-
-
-
-
Constructor Detail
-
NodeTypeManagerImpl
public NodeTypeManagerImpl(NodeTypeRegistry ntReg, ManagerProvider mgrProvider) throws RepositoryException
Creates a newNodeTypeManagerImpl
instance.- Parameters:
ntReg
- node type registrymgrProvider
- the manager provider- Throws:
RepositoryException
- If an error occurs.
-
-
Method Detail
-
getNodeType
public NodeTypeImpl getNodeType(Name name) throws NoSuchNodeTypeException
Description copied from class:AbstractNodeTypeManager
Return the node type with the specifiedntName
.- Specified by:
getNodeType
in classAbstractNodeTypeManager
- Parameters:
name
- Name of the node type to be returned.- Returns:
- the node type with the specified
ntName
. - Throws:
NoSuchNodeTypeException
- If no such node type exists.- See Also:
AbstractNodeTypeManager.getNodeType(org.apache.jackrabbit.spi.Name)
-
getNamePathResolver
public NamePathResolver getNamePathResolver()
Description copied from class:AbstractNodeTypeManager
Returns the NamePathResolver used to validate JCR names.- Specified by:
getNamePathResolver
in classAbstractNodeTypeManager
- 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.
- See Also:
AbstractNodeTypeManager.getNamePathResolver()
-
hasNodeType
public boolean hasNodeType(Name nodeTypeName)
- Parameters:
nodeTypeName
-- Returns:
-
getNodeDefinition
public NodeDefinition getNodeDefinition(QNodeDefinition def)
Retrieve theNodeDefinition
for the givenQNodeDefinition
.- Specified by:
getNodeDefinition
in classAbstractNodeTypeManager
- Parameters:
def
-- Returns:
-
getPropertyDefinition
public PropertyDefinition getPropertyDefinition(QPropertyDefinition def)
Retrieve thePropertyDefinition
for the givenQPropertyDefinition
.- Specified by:
getPropertyDefinition
in classAbstractNodeTypeManager
- Parameters:
def
-- Returns:
-
getNodeTypeDefinition
public QNodeTypeDefinition getNodeTypeDefinition(Name ntName) throws NoSuchNodeTypeException, RepositoryException
- Specified by:
getNodeTypeDefinition
in interfaceNodeTypeDefinitionProvider
- Throws:
NoSuchNodeTypeException
RepositoryException
- See Also:
NodeTypeDefinitionProvider.getNodeTypeDefinition(org.apache.jackrabbit.spi.Name)
-
nodeTypeRegistered
public void nodeTypeRegistered(Name ntName)
Called when a node type has been registered.- Specified by:
nodeTypeRegistered
in interfaceNodeTypeRegistryListener
- 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 interfaceNodeTypeRegistryListener
- 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 interfaceNodeTypeRegistryListener
- Parameters:
ntName
- name of the node type that has been unregistered
-
getAllNodeTypes
public NodeTypeIterator getAllNodeTypes() throws RepositoryException
- Specified by:
getAllNodeTypes
in interfaceNodeTypeManager
- Throws:
RepositoryException
-
getPrimaryNodeTypes
public NodeTypeIterator getPrimaryNodeTypes() throws RepositoryException
- Specified by:
getPrimaryNodeTypes
in interfaceNodeTypeManager
- Throws:
RepositoryException
-
getMixinNodeTypes
public NodeTypeIterator getMixinNodeTypes() throws RepositoryException
- Specified by:
getMixinNodeTypes
in interfaceNodeTypeManager
- Throws:
RepositoryException
-
getNodeType
public NodeType getNodeType(String nodeTypeName) throws NoSuchNodeTypeException
- Specified by:
getNodeType
in interfaceNodeTypeManager
- Throws:
NoSuchNodeTypeException
-
hasNodeType
public boolean hasNodeType(String name) throws RepositoryException
- Specified by:
hasNodeType
in interfaceNodeTypeManager
- Throws:
RepositoryException
- See Also:
NodeTypeManager.hasNodeType(String)
-
registerNodeTypes
public NodeTypeIterator registerNodeTypes(NodeTypeDefinition[] ntds, boolean allowUpdate) throws RepositoryException
- Specified by:
registerNodeTypes
in interfaceNodeTypeManager
- Throws:
RepositoryException
- See Also:
NodeTypeManager.registerNodeTypes(javax.jcr.nodetype.NodeTypeDefinition[], boolean)
-
unregisterNodeTypes
public void unregisterNodeTypes(String[] names) throws RepositoryException
- Specified by:
unregisterNodeTypes
in interfaceNodeTypeManager
- Throws:
RepositoryException
- See Also:
NodeTypeManager.unregisterNodeTypes(String[])
-
-