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,
javax.jcr.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, javax.jcr.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 javax.jcr.RepositoryException
NodeTypeRegistrygetRegisteredNodeTypes in interface NodeTypeRegistryjavax.jcr.RepositoryExceptionNodeTypeRegistry.getRegisteredNodeTypes()public boolean isRegistered(Name nodeTypeName)
isRegistered in interface NodeTypeRegistryNodeTypeRegistry.isRegistered(Name)public void registerNodeTypes(Collection<QNodeTypeDefinition> ntDefs, boolean allowUpdate) throws javax.jcr.nodetype.NodeTypeExistsException, javax.jcr.nodetype.InvalidNodeTypeDefinitionException, javax.jcr.RepositoryException
NodeTypeRegistryallowUpdate
is true existing node types will be updated, otherwise
an NodeTypeExistsException is thrown.registerNodeTypes in interface NodeTypeRegistryjavax.jcr.nodetype.NodeTypeExistsExceptionjavax.jcr.nodetype.InvalidNodeTypeDefinitionExceptionjavax.jcr.RepositoryExceptionNodeTypeRegistry.registerNodeTypes(Collection, boolean)public void unregisterNodeTypes(Collection<Name> nodeTypeNames) throws javax.jcr.nodetype.NoSuchNodeTypeException, javax.jcr.RepositoryException
NodeTypeRegistryunregisterNodeTypes in interface NodeTypeRegistrynodeTypeNames - a collection of Name objects denoting the
node types to be unregisteredjavax.jcr.nodetype.NoSuchNodeTypeException - if any of the specified names does not
denote a registered node type.javax.jcr.RepositoryException - if another error occursNodeTypeRegistry.unregisterNodeTypes(Collection)public QNodeTypeDefinition getNodeTypeDefinition(Name nodeTypeName) throws javax.jcr.nodetype.NoSuchNodeTypeException
NodeTypeRegistrygetNodeTypeDefinition in interface NodeTypeRegistrynodeTypeName - name of node type whose definition should be returned.javax.jcr.nodetype.NoSuchNodeTypeException - if a node type with the given name
does not existNodeTypeRegistry.getNodeTypeDefinition(Name)public EffectiveNodeType getEffectiveNodeType(Name ntName) throws javax.jcr.nodetype.NoSuchNodeTypeException
EffectiveNodeTypeProviderEffectiveNodeType from the given
NodeType name.getEffectiveNodeType in interface EffectiveNodeTypeProviderjavax.jcr.nodetype.NoSuchNodeTypeExceptionEffectiveNodeTypeProvider.getEffectiveNodeType(Name)public EffectiveNodeType getEffectiveNodeType(Name[] ntNames) throws javax.jcr.nodetype.ConstraintViolationException, javax.jcr.nodetype.NoSuchNodeTypeException
EffectiveNodeTypeProviderEffectiveNodeType from the given array of
NodeType names.getEffectiveNodeType in interface EffectiveNodeTypeProviderjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.nodetype.NoSuchNodeTypeExceptionEffectiveNodeTypeProvider.getEffectiveNodeType(Name[])public EffectiveNodeType getEffectiveNodeType(Name[] ntNames, Map<Name,QNodeTypeDefinition> ntdMap) throws javax.jcr.nodetype.ConstraintViolationException, javax.jcr.nodetype.NoSuchNodeTypeException
getEffectiveNodeType in interface EffectiveNodeTypeProviderjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.nodetype.NoSuchNodeTypeExceptionEffectiveNodeTypeProvider.getEffectiveNodeType(Name[], Map)public EffectiveNodeType getEffectiveNodeType(QNodeTypeDefinition ntd, Map<Name,QNodeTypeDefinition> ntdMap) throws javax.jcr.nodetype.ConstraintViolationException, javax.jcr.nodetype.NoSuchNodeTypeException
EffectiveNodeTypeProvidergetEffectiveNodeType in interface EffectiveNodeTypeProviderjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.nodetype.NoSuchNodeTypeExceptionEffectiveNodeTypeProvider.getEffectiveNodeType(QNodeTypeDefinition, Map)Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.