Class NodeTypeStorageImpl
java.lang.Object
org.apache.jackrabbit.spi.commons.nodetype.NodeTypeStorageImpl
- All Implemented Interfaces:
NodeTypeStorage
This implementation of
NodeTypeStorage keeps a map of the registered QNodeTypeDefinition
in memory.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns an Iterator over all node type definitions registered.getDefinitions(Name[] nodeTypeNames) This implementation returns an iterator over all registeredQNodeTypeDefinitions ifnodeTypeNamesisnull.voidregisterNodeTypes(QNodeTypeDefinition[] nodeTypeDefs, boolean allowUpdate) Add allQNodeTypeDefinitions provided to the store.voidunregisterNodeTypes(Name[] nodeTypeNames) Remove allQNodeTypeDefinitions provided from the store.
-
Constructor Details
-
NodeTypeStorageImpl
public NodeTypeStorageImpl()
-
-
Method Details
-
getAllDefinitions
Description copied from interface:NodeTypeStorageReturns an Iterator over all node type definitions registered.- Specified by:
getAllDefinitionsin interfaceNodeTypeStorage- Returns:
- Throws:
RepositoryException
-
getDefinitions
public Iterator<QNodeTypeDefinition> getDefinitions(Name[] nodeTypeNames) throws NoSuchNodeTypeException, RepositoryException This implementation returns an iterator over all registeredQNodeTypeDefinitions ifnodeTypeNamesisnull. Returns theQNodeTypeDefinitions for the given node type names. The implementation is free to return additional definitions e.g. dependencies.- Specified by:
getDefinitionsin interfaceNodeTypeStorage- Parameters:
nodeTypeNames-- Returns:
- Throws:
NoSuchNodeTypeExceptionRepositoryException
-
registerNodeTypes
public void registerNodeTypes(QNodeTypeDefinition[] nodeTypeDefs, boolean allowUpdate) throws RepositoryException Description copied from interface:NodeTypeStorageAdd allQNodeTypeDefinitions provided to the store. IfallowUpdateistruepreviously registered node QNodeTypeDefinitions will be overwritten.- Specified by:
registerNodeTypesin interfaceNodeTypeStorage- Parameters:
nodeTypeDefs- QNodeTypeDefinitions to add to the storeallowUpdate- Whether to overwrite existing QNodeTypeDefinitions- Throws:
RepositoryException
-
unregisterNodeTypes
public void unregisterNodeTypes(Name[] nodeTypeNames) throws NoSuchNodeTypeException, RepositoryException Description copied from interface:NodeTypeStorageRemove allQNodeTypeDefinitions provided from the store.- Specified by:
unregisterNodeTypesin interfaceNodeTypeStorage- Parameters:
nodeTypeNames- QNodeTypeDefinitions to remove from the store- Throws:
NoSuchNodeTypeException- If any of the QNodeTypeDefinitions does not exist. In this case none of the provided is unregistered.RepositoryException
-