|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.jcr2spi.nodetype.NodeTypeRegistryImpl
public class NodeTypeRegistryImpl
A NodeTypeRegistry ...
| Method Summary | |
|---|---|
void |
addListener(NodeTypeRegistryListener listener)
Add a NodeTypeRegistryListener |
static NodeTypeRegistryImpl |
create(NodeTypeStorage storage,
NamespaceRegistry nsRegistry)
Create a new NodeTypeRegistry |
void |
dispose()
Clears all caches. |
void |
dump(PrintStream ps)
Dumps the state of this instance in a human readable format for diagnostic purposes. |
EffectiveNodeType |
getEffectiveNodeType(Name ntName)
Build the EffectiveNodeType from the given qualified
NodeType name. |
EffectiveNodeType |
getEffectiveNodeType(Name[] ntNames)
Build the EffectiveNodeType from the given qualified
NodeType names. |
EffectiveNodeType |
getEffectiveNodeType(Name[] ntNames,
Map ntdMap)
|
EffectiveNodeType |
getEffectiveNodeType(QNodeTypeDefinition ntd,
Map 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)
|
EffectiveNodeType |
registerNodeType(QNodeTypeDefinition ntDef)
Validates the NodeTypeDef and returns
a registered EffectiveNodeType instance. |
void |
registerNodeTypes(Collection ntDefs)
Same as except
that a collection of NodeTypeDefs is registered instead of
just one. |
void |
removeListener(NodeTypeRegistryListener listener)
Remove a NodeTypeRegistryListener |
EffectiveNodeType |
reregisterNodeType(QNodeTypeDefinition ntd)
|
void |
unregisterNodeType(Name nodeTypeName)
|
void |
unregisterNodeTypes(Collection nodeTypeNames)
Same as except
that a set of node types is unregistered instead of just one. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static NodeTypeRegistryImpl create(NodeTypeStorage storage,
NamespaceRegistry nsRegistry)
NodeTypeRegistry
- Parameters:
storage - nsRegistry -
- Returns:
NodeTypeRegistry object
public void dispose()
public void addListener(NodeTypeRegistryListener listener)
NodeTypeRegistryNodeTypeRegistryListener
addListener in interface NodeTypeRegistrylistener - the new listener to be informed on (un)registration
of node typesNodeTypeRegistry.addListener(NodeTypeRegistryListener)public void removeListener(NodeTypeRegistryListener listener)
NodeTypeRegistryNodeTypeRegistryListener
removeListener in interface NodeTypeRegistrylistener - an existing listenerNodeTypeRegistry.removeListener(NodeTypeRegistryListener)
public Name[] getRegisteredNodeTypes()
throws RepositoryException
NodeTypeRegistry
getRegisteredNodeTypes in interface NodeTypeRegistryRepositoryExceptionNodeTypeRegistry.getRegisteredNodeTypes()public boolean isRegistered(Name nodeTypeName)
isRegistered in interface NodeTypeRegistryNodeTypeRegistry.isRegistered(Name)
public EffectiveNodeType registerNodeType(QNodeTypeDefinition ntDef)
throws InvalidNodeTypeDefException,
RepositoryException
NodeTypeRegistryNodeTypeDef and returns
a registered EffectiveNodeType instance.
The validation includes the following checks:
registerNodeType in interface NodeTypeRegistryntDef - the definition of the new node type
EffectiveNodeType instance
InvalidNodeTypeDefException
RepositoryExceptionNodeTypeRegistry.registerNodeType(QNodeTypeDefinition)
public void registerNodeTypes(Collection ntDefs)
throws InvalidNodeTypeDefException,
RepositoryException
NodeTypeRegistryNodeTypeRegistry.registerNodeType(QNodeTypeDefinition) except
that a collection of NodeTypeDefs is registered instead of
just one.
This method can be used to register a set of node types that have
dependencies on each other.
Note that in the case an exception is thrown, some node types might have
been nevertheless successfully registered.
registerNodeTypes in interface NodeTypeRegistryntDefs - a collection of NodeTypeDefs
- Throws:
InvalidNodeTypeDefException
RepositoryException- See Also:
NodeTypeRegistry.registerNodeTypes(Collection)
public void unregisterNodeType(Name nodeTypeName)
throws NoSuchNodeTypeException,
RepositoryException
unregisterNodeType in interface NodeTypeRegistryNoSuchNodeTypeException
RepositoryExceptionNodeTypeRegistry.unregisterNodeType(Name)
public void unregisterNodeTypes(Collection nodeTypeNames)
throws NoSuchNodeTypeException,
RepositoryException
NodeTypeRegistryNodeTypeRegistry.unregisterNodeType(Name) except
that a set of node types is unregistered instead of just one.
This method can be used to unregister a set of node types that depend on
each other.
unregisterNodeTypes in interface NodeTypeRegistrynodeTypeNames - a collection of Name objects denoting the
node types to be unregistered
NoSuchNodeTypeException - if any of the specified names does not
denote a registered node type.
RepositoryException - if another error occursNodeTypeRegistry.unregisterNodeTypes(Collection)
public EffectiveNodeType reregisterNodeType(QNodeTypeDefinition ntd)
throws NoSuchNodeTypeException,
InvalidNodeTypeDefException,
RepositoryException
reregisterNodeType in interface NodeTypeRegistryNoSuchNodeTypeException
InvalidNodeTypeDefException
RepositoryExceptionNodeTypeRegistry.reregisterNodeType(QNodeTypeDefinition)
public QNodeTypeDefinition getNodeTypeDefinition(Name nodeTypeName)
throws NoSuchNodeTypeException
NodeTypeRegistry
getNodeTypeDefinition 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 qualified
NodeType name.
getEffectiveNodeType in interface EffectiveNodeTypeProviderNoSuchNodeTypeExceptionEffectiveNodeTypeProvider.getEffectiveNodeType(Name)
public EffectiveNodeType getEffectiveNodeType(Name[] ntNames)
throws ConstraintViolationException,
NoSuchNodeTypeException
EffectiveNodeTypeProviderEffectiveNodeType from the given qualified
NodeType names.
getEffectiveNodeType in interface EffectiveNodeTypeProviderConstraintViolationException
NoSuchNodeTypeExceptionEffectiveNodeTypeProvider.getEffectiveNodeType(Name[])
public EffectiveNodeType getEffectiveNodeType(Name[] ntNames,
Map ntdMap)
throws ConstraintViolationException,
NoSuchNodeTypeException
getEffectiveNodeType in interface EffectiveNodeTypeProviderConstraintViolationException
NoSuchNodeTypeExceptionEffectiveNodeTypeProvider.getEffectiveNodeType(Name[], Map)
public EffectiveNodeType getEffectiveNodeType(QNodeTypeDefinition ntd,
Map ntdMap)
throws ConstraintViolationException,
NoSuchNodeTypeException
EffectiveNodeTypeProvider
getEffectiveNodeType in interface EffectiveNodeTypeProviderConstraintViolationException
NoSuchNodeTypeExceptionEffectiveNodeTypeProvider.getEffectiveNodeType(QNodeTypeDefinition, Map)public void dump(PrintStream ps)
dump in interface Dumpableps - stream to dump state to
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||