public interface NodeTypeRegistry
NodeTypeRegistry
...Modifier and Type | Method and Description |
---|---|
void |
addListener(NodeTypeRegistryListener listener)
Add a
NodeTypeRegistryListener |
QNodeTypeDefinition |
getNodeTypeDefinition(Name nodeTypeName)
Returns the node type definition of the node type with the given name.
|
Name[] |
getRegisteredNodeTypes()
Returns the names of all registered node types.
|
boolean |
isRegistered(Name ntName) |
void |
registerNodeTypes(Collection<QNodeTypeDefinition> ntDefs,
boolean allowUpdate)
Registers the specified node type definitions.
|
void |
removeListener(NodeTypeRegistryListener listener)
Remove a
NodeTypeRegistryListener |
void |
unregisterNodeTypes(Collection<Name> nodeTypeNames)
Unregisters a collection of node types.
|
QNodeTypeDefinition getNodeTypeDefinition(Name nodeTypeName) throws NoSuchNodeTypeException
nodeTypeName
- name of node type whose definition should be returned.NoSuchNodeTypeException
- if a node type with the given name
does not existvoid addListener(NodeTypeRegistryListener listener)
NodeTypeRegistryListener
listener
- the new listener to be informed on (un)registration
of node typesvoid removeListener(NodeTypeRegistryListener listener)
NodeTypeRegistryListener
listener
- an existing listenerboolean isRegistered(Name ntName)
ntName
- Name[] getRegisteredNodeTypes() throws RepositoryException
RepositoryException
void registerNodeTypes(Collection<QNodeTypeDefinition> ntDefs, boolean allowUpdate) throws NodeTypeExistsException, InvalidNodeTypeDefinitionException, RepositoryException
allowUpdate
is true
existing node types will be updated, otherwise
an NodeTypeExistsException
is thrown.ntDefs
- allowUpdate
- NodeTypeExistsException
InvalidNodeTypeDefinitionException
RepositoryException
void unregisterNodeTypes(Collection<Name> nodeTypeNames) throws NoSuchNodeTypeException, RepositoryException
nodeTypeNames
- a collection of Name
objects denoting the
node types to be unregisteredNoSuchNodeTypeException
- if any of the specified names does not
denote a registered node type.RepositoryException
- if another error occursCopyright © 2004–2023 The Apache Software Foundation. All rights reserved.