Interface NodeTypeRegistry
-
- All Known Implementing Classes:
NodeTypeRegistryImpl
public interface NodeTypeRegistryNodeTypeRegistry...
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddListener(NodeTypeRegistryListener listener)Add aNodeTypeRegistryListenerorg.apache.jackrabbit.spi.QNodeTypeDefinitiongetNodeTypeDefinition(org.apache.jackrabbit.spi.Name nodeTypeName)Returns the node type definition of the node type with the given name.org.apache.jackrabbit.spi.Name[]getRegisteredNodeTypes()Returns the names of all registered node types.booleanisRegistered(org.apache.jackrabbit.spi.Name ntName)voidregisterNodeTypes(Collection<org.apache.jackrabbit.spi.QNodeTypeDefinition> ntDefs, boolean allowUpdate)Registers the specified node type definitions.voidremoveListener(NodeTypeRegistryListener listener)Remove aNodeTypeRegistryListenervoidunregisterNodeTypes(Collection<org.apache.jackrabbit.spi.Name> nodeTypeNames)Unregisters a collection of node types.
-
-
-
Method Detail
-
getNodeTypeDefinition
org.apache.jackrabbit.spi.QNodeTypeDefinition getNodeTypeDefinition(org.apache.jackrabbit.spi.Name nodeTypeName) throws NoSuchNodeTypeExceptionReturns the node type definition of the node type with the given name.- Parameters:
nodeTypeName- name of node type whose definition should be returned.- Returns:
- the node type definition of the node type with the given name.
- Throws:
NoSuchNodeTypeException- if a node type with the given name does not exist
-
addListener
void addListener(NodeTypeRegistryListener listener)
Add aNodeTypeRegistryListener- Parameters:
listener- the new listener to be informed on (un)registration of node types
-
removeListener
void removeListener(NodeTypeRegistryListener listener)
Remove aNodeTypeRegistryListener- Parameters:
listener- an existing listener
-
isRegistered
boolean isRegistered(org.apache.jackrabbit.spi.Name ntName)
- Parameters:
ntName-- Returns:
-
getRegisteredNodeTypes
org.apache.jackrabbit.spi.Name[] getRegisteredNodeTypes() throws RepositoryExceptionReturns the names of all registered node types. That includes primary and mixin node types.- Returns:
- the names of all registered node types.
- Throws:
RepositoryException
-
registerNodeTypes
void registerNodeTypes(Collection<org.apache.jackrabbit.spi.QNodeTypeDefinition> ntDefs, boolean allowUpdate) throws NodeTypeExistsException, InvalidNodeTypeDefinitionException, RepositoryException
Registers the specified node type definitions. IfallowUpdateistrueexisting node types will be updated, otherwise anNodeTypeExistsExceptionis thrown.- Parameters:
ntDefs-allowUpdate-- Throws:
NodeTypeExistsExceptionInvalidNodeTypeDefinitionExceptionRepositoryException
-
unregisterNodeTypes
void unregisterNodeTypes(Collection<org.apache.jackrabbit.spi.Name> nodeTypeNames) throws NoSuchNodeTypeException, RepositoryException
Unregisters a collection of node types.- Parameters:
nodeTypeNames- a collection ofNameobjects denoting the node types to be unregistered- Throws:
NoSuchNodeTypeException- if any of the specified names does not denote a registered node type.RepositoryException- if another error occurs
-
-