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)
NodeTypeRegistry
storage
- nsRegistry
- NodeTypeRegistry
objectpublic void dispose()
public void addListener(NodeTypeRegistryListener listener)
NodeTypeRegistry
NodeTypeRegistryListener
addListener
in interface NodeTypeRegistry
listener
- the new listener to be informed on (un)registration
of node typesNodeTypeRegistry.addListener(NodeTypeRegistryListener)
public void removeListener(NodeTypeRegistryListener listener)
NodeTypeRegistry
NodeTypeRegistryListener
removeListener
in interface NodeTypeRegistry
listener
- an existing listenerNodeTypeRegistry.removeListener(NodeTypeRegistryListener)
public Name[] getRegisteredNodeTypes() throws javax.jcr.RepositoryException
NodeTypeRegistry
getRegisteredNodeTypes
in interface NodeTypeRegistry
javax.jcr.RepositoryException
NodeTypeRegistry.getRegisteredNodeTypes()
public boolean isRegistered(Name nodeTypeName)
isRegistered
in interface NodeTypeRegistry
NodeTypeRegistry.isRegistered(Name)
public void registerNodeTypes(Collection<QNodeTypeDefinition> ntDefs, boolean allowUpdate) throws javax.jcr.nodetype.NodeTypeExistsException, javax.jcr.nodetype.InvalidNodeTypeDefinitionException, javax.jcr.RepositoryException
NodeTypeRegistry
allowUpdate
is true
existing node types will be updated, otherwise
an NodeTypeExistsException
is thrown.registerNodeTypes
in interface NodeTypeRegistry
javax.jcr.nodetype.NodeTypeExistsException
javax.jcr.nodetype.InvalidNodeTypeDefinitionException
javax.jcr.RepositoryException
NodeTypeRegistry.registerNodeTypes(Collection, boolean)
public void unregisterNodeTypes(Collection<Name> nodeTypeNames) throws javax.jcr.nodetype.NoSuchNodeTypeException, javax.jcr.RepositoryException
NodeTypeRegistry
unregisterNodeTypes
in interface NodeTypeRegistry
nodeTypeNames
- 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
NodeTypeRegistry
getNodeTypeDefinition
in interface NodeTypeRegistry
nodeTypeName
- 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
EffectiveNodeTypeProvider
EffectiveNodeType
from the given
NodeType
name.getEffectiveNodeType
in interface EffectiveNodeTypeProvider
javax.jcr.nodetype.NoSuchNodeTypeException
EffectiveNodeTypeProvider.getEffectiveNodeType(Name)
public EffectiveNodeType getEffectiveNodeType(Name[] ntNames) throws javax.jcr.nodetype.ConstraintViolationException, javax.jcr.nodetype.NoSuchNodeTypeException
EffectiveNodeTypeProvider
EffectiveNodeType
from the given array of
NodeType
names.getEffectiveNodeType
in interface EffectiveNodeTypeProvider
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.nodetype.NoSuchNodeTypeException
EffectiveNodeTypeProvider.getEffectiveNodeType(Name[])
public EffectiveNodeType getEffectiveNodeType(Name[] ntNames, Map<Name,QNodeTypeDefinition> ntdMap) throws javax.jcr.nodetype.ConstraintViolationException, javax.jcr.nodetype.NoSuchNodeTypeException
getEffectiveNodeType
in interface EffectiveNodeTypeProvider
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.nodetype.NoSuchNodeTypeException
EffectiveNodeTypeProvider.getEffectiveNodeType(Name[], Map)
public EffectiveNodeType getEffectiveNodeType(QNodeTypeDefinition ntd, Map<Name,QNodeTypeDefinition> ntdMap) throws javax.jcr.nodetype.ConstraintViolationException, javax.jcr.nodetype.NoSuchNodeTypeException
EffectiveNodeTypeProvider
getEffectiveNodeType
in interface EffectiveNodeTypeProvider
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.nodetype.NoSuchNodeTypeException
EffectiveNodeTypeProvider.getEffectiveNodeType(QNodeTypeDefinition, Map)
Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.