Interface NodeTypeStorage
-
- All Known Implementing Classes:
NodeTypeStorageImpl
public interface NodeTypeStorage
NodeTypeStorage
provides means for storingQNodeTypeDefinition
s.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Iterator<QNodeTypeDefinition>
getAllDefinitions()
Returns an Iterator over all node type definitions registered.Iterator<QNodeTypeDefinition>
getDefinitions(Name[] nodeTypeNames)
Returns theQNodeTypeDefinition
s for the given node type names.void
registerNodeTypes(QNodeTypeDefinition[] nodeTypeDefs, boolean allowUpdate)
Add allQNodeTypeDefinition
s provided to the store.void
unregisterNodeTypes(Name[] nodeTypeNames)
Remove allQNodeTypeDefinition
s provided from the store.
-
-
-
Method Detail
-
getAllDefinitions
Iterator<QNodeTypeDefinition> getAllDefinitions() throws RepositoryException
Returns an Iterator over all node type definitions registered.- Returns:
- Throws:
RepositoryException
-
getDefinitions
Iterator<QNodeTypeDefinition> getDefinitions(Name[] nodeTypeNames) throws NoSuchNodeTypeException, RepositoryException
Returns theQNodeTypeDefinition
s for the given node type names. The implementation is free to return additional definitions e.g. dependencies.- Parameters:
nodeTypeNames
-- Returns:
- Throws:
NoSuchNodeTypeException
RepositoryException
-
registerNodeTypes
void registerNodeTypes(QNodeTypeDefinition[] nodeTypeDefs, boolean allowUpdate) throws RepositoryException, NodeTypeExistsException
Add allQNodeTypeDefinition
s provided to the store. IfallowUpdate
istrue
previously registered node QNodeTypeDefinitions will be overwritten.- Parameters:
nodeTypeDefs
- QNodeTypeDefinitions to add to the storeallowUpdate
- Whether to overwrite existing QNodeTypeDefinitions- Throws:
RepositoryException
NodeTypeExistsException
- IfallowUpdate
istrue
and a QNodeTypeDefinitions of that name already exists. In this case, none of the provided QNodeTypeDefinitions is registered.
-
unregisterNodeTypes
void unregisterNodeTypes(Name[] nodeTypeNames) throws NoSuchNodeTypeException, RepositoryException
Remove allQNodeTypeDefinition
s provided from the store.- Parameters:
nodeTypeNames
- QNodeTypeDefinitions to remove from the store- Throws:
RepositoryException
NoSuchNodeTypeException
- If any of the QNodeTypeDefinitions does not exist. In this case none of the provided is unregistered.
-
-