public class NodeTypeRegistryImpl extends Object implements NodeTypeRegistry, EffectiveNodeTypeProvider
NodeTypeRegistry ...| Modifier and Type | Method and Description |
|---|---|
void |
addListener(NodeTypeRegistryListener listener)
Add a
NodeTypeRegistryListener |
static NodeTypeRegistryImpl |
create(NodeTypeStorage storage,
NamespaceRegistry nsRegistry)
Create a new
NodeTypeRegistry |
void |
dispose()
Clears all caches.
|
EffectiveNodeType |
getEffectiveNodeType(Name ntName)
Build the
EffectiveNodeType from the given
NodeType name. |
EffectiveNodeType |
getEffectiveNodeType(Name[] ntNames)
Build the
EffectiveNodeType from the given array of
NodeType names. |
EffectiveNodeType |
getEffectiveNodeType(Name[] ntNames,
Map<Name,QNodeTypeDefinition> ntdMap) |
EffectiveNodeType |
getEffectiveNodeType(QNodeTypeDefinition ntd,
Map<Name,QNodeTypeDefinition> ntdMap)
Builds an effective node type representation from the given node type
definition.
|
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 nodeTypeName) |
void |
registerNodeTypes(Collection<QNodeTypeDefinition> ntDefs,
boolean allowUpdate)
Registers the specified node type definitions.
|
void |
removeListener(NodeTypeRegistryListener listener)
Remove a
NodeTypeRegistryListener |
String |
toString()
Returns the the state of this instance in a human readable format.
|
void |
unregisterNodeTypes(Collection<Name> nodeTypeNames)
Unregisters a collection of node types.
|
public static NodeTypeRegistryImpl create(NodeTypeStorage storage, NamespaceRegistry nsRegistry)
NodeTypeRegistrystorage - nsRegistry - NodeTypeRegistry objectpublic void dispose()
public void addListener(NodeTypeRegistryListener listener)
NodeTypeRegistryNodeTypeRegistryListeneraddListener in interface NodeTypeRegistrylistener - the new listener to be informed on (un)registration
of node typesNodeTypeRegistry.addListener(NodeTypeRegistryListener)public void removeListener(NodeTypeRegistryListener listener)
NodeTypeRegistryNodeTypeRegistryListenerremoveListener in interface NodeTypeRegistrylistener - an existing listenerNodeTypeRegistry.removeListener(NodeTypeRegistryListener)public Name[] getRegisteredNodeTypes() throws RepositoryException
NodeTypeRegistrygetRegisteredNodeTypes in interface NodeTypeRegistryRepositoryExceptionNodeTypeRegistry.getRegisteredNodeTypes()public boolean isRegistered(Name nodeTypeName)
isRegistered in interface NodeTypeRegistryNodeTypeRegistry.isRegistered(Name)public void registerNodeTypes(Collection<QNodeTypeDefinition> ntDefs, boolean allowUpdate) throws NodeTypeExistsException, InvalidNodeTypeDefinitionException, RepositoryException
NodeTypeRegistryallowUpdate
is true existing node types will be updated, otherwise
an NodeTypeExistsException is thrown.registerNodeTypes in interface NodeTypeRegistryNodeTypeExistsExceptionInvalidNodeTypeDefinitionExceptionRepositoryExceptionNodeTypeRegistry.registerNodeTypes(Collection, boolean)public void unregisterNodeTypes(Collection<Name> nodeTypeNames) throws NoSuchNodeTypeException, RepositoryException
NodeTypeRegistryunregisterNodeTypes in interface NodeTypeRegistrynodeTypeNames - 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 occursNodeTypeRegistry.unregisterNodeTypes(Collection)public QNodeTypeDefinition getNodeTypeDefinition(Name nodeTypeName) throws NoSuchNodeTypeException
NodeTypeRegistrygetNodeTypeDefinition in interface NodeTypeRegistrynodeTypeName - name of node type whose definition should be returned.NoSuchNodeTypeException - if a node type with the given name
does not existNodeTypeRegistry.getNodeTypeDefinition(Name)public EffectiveNodeType getEffectiveNodeType(Name ntName) throws NoSuchNodeTypeException
EffectiveNodeTypeProviderEffectiveNodeType from the given
NodeType name.getEffectiveNodeType in interface EffectiveNodeTypeProviderNoSuchNodeTypeExceptionEffectiveNodeTypeProvider.getEffectiveNodeType(Name)public EffectiveNodeType getEffectiveNodeType(Name[] ntNames) throws ConstraintViolationException, NoSuchNodeTypeException
EffectiveNodeTypeProviderEffectiveNodeType from the given array of
NodeType names.getEffectiveNodeType in interface EffectiveNodeTypeProviderConstraintViolationExceptionNoSuchNodeTypeExceptionEffectiveNodeTypeProvider.getEffectiveNodeType(Name[])public EffectiveNodeType getEffectiveNodeType(Name[] ntNames, Map<Name,QNodeTypeDefinition> ntdMap) throws ConstraintViolationException, NoSuchNodeTypeException
getEffectiveNodeType in interface EffectiveNodeTypeProviderConstraintViolationExceptionNoSuchNodeTypeExceptionEffectiveNodeTypeProvider.getEffectiveNodeType(Name[], Map)public EffectiveNodeType getEffectiveNodeType(QNodeTypeDefinition ntd, Map<Name,QNodeTypeDefinition> ntdMap) throws ConstraintViolationException, NoSuchNodeTypeException
EffectiveNodeTypeProvidergetEffectiveNodeType in interface EffectiveNodeTypeProviderConstraintViolationExceptionNoSuchNodeTypeExceptionEffectiveNodeTypeProvider.getEffectiveNodeType(QNodeTypeDefinition, Map)Copyright © 2004–2022 The Apache Software Foundation. All rights reserved.