public class NodeTypeStorageImpl extends Object implements NodeTypeStorage
NodeTypeStorage
keeps a map of the registered QNodeTypeDefinition
in memory.Constructor and Description |
---|
NodeTypeStorageImpl() |
Modifier and Type | Method and Description |
---|---|
Iterator<QNodeTypeDefinition> |
getAllDefinitions()
Returns an Iterator over all node type definitions registered.
|
Iterator<QNodeTypeDefinition> |
getDefinitions(Name[] nodeTypeNames)
This implementation returns an iterator over all registered
QNodeTypeDefinition s if
nodeTypeNames is null . |
void |
registerNodeTypes(QNodeTypeDefinition[] nodeTypeDefs,
boolean allowUpdate)
Add all
QNodeTypeDefinition s provided to the store. |
void |
unregisterNodeTypes(Name[] nodeTypeNames)
Remove all
QNodeTypeDefinition s provided from the store. |
public Iterator<QNodeTypeDefinition> getAllDefinitions() throws RepositoryException
NodeTypeStorage
getAllDefinitions
in interface NodeTypeStorage
RepositoryException
public Iterator<QNodeTypeDefinition> getDefinitions(Name[] nodeTypeNames) throws NoSuchNodeTypeException, RepositoryException
QNodeTypeDefinition
s if
nodeTypeNames
is null
.
Returns the QNodeTypeDefinition
s for the given node type
names. The implementation is free to return additional definitions e.g.
dependencies.getDefinitions
in interface NodeTypeStorage
NoSuchNodeTypeException
RepositoryException
public void registerNodeTypes(QNodeTypeDefinition[] nodeTypeDefs, boolean allowUpdate) throws RepositoryException
NodeTypeStorage
QNodeTypeDefinition
s provided to the store. If allowUpdate
is true
previously registered node QNodeTypeDefinitions will be overwritten.registerNodeTypes
in interface NodeTypeStorage
nodeTypeDefs
- QNodeTypeDefinitions to add to the storeallowUpdate
- Whether to overwrite existing QNodeTypeDefinitionsRepositoryException
NodeTypeExistsException
- If allowUpdate
is true
and a QNodeTypeDefinitions
of that name already exists. In this case, none of the provided QNodeTypeDefinitions is registered.public void unregisterNodeTypes(Name[] nodeTypeNames) throws NoSuchNodeTypeException, RepositoryException
NodeTypeStorage
QNodeTypeDefinition
s provided from the store.unregisterNodeTypes
in interface NodeTypeStorage
nodeTypeNames
- QNodeTypeDefinitions to remove from the storeNoSuchNodeTypeException
- If any of the QNodeTypeDefinitions does not exist. In this case
none of the provided is unregistered.RepositoryException
Copyright © 2004–2023 The Apache Software Foundation. All rights reserved.