|
||||||||||
| 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,
javax.jcr.NamespaceRegistry nsRegistry)
Create a new NodeTypeRegistry |
void |
dispose()
Clears all caches. |
void |
dump(java.io.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,
java.util.Map ntdMap)
|
EffectiveNodeType |
getEffectiveNodeType(QNodeTypeDefinition ntd,
java.util.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(java.util.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(java.util.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,
javax.jcr.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 javax.jcr.RepositoryException
NodeTypeRegistry
getRegisteredNodeTypes in interface NodeTypeRegistryjavax.jcr.RepositoryExceptionNodeTypeRegistry.getRegisteredNodeTypes()public boolean isRegistered(Name nodeTypeName)
isRegistered in interface NodeTypeRegistryNodeTypeRegistry.isRegistered(Name)
public EffectiveNodeType registerNodeType(QNodeTypeDefinition ntDef)
throws InvalidNodeTypeDefException,
javax.jcr.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
javax.jcr.RepositoryExceptionNodeTypeRegistry.registerNodeType(QNodeTypeDefinition)
public void registerNodeTypes(java.util.Collection ntDefs)
throws InvalidNodeTypeDefException,
javax.jcr.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
javax.jcr.RepositoryException- See Also:
NodeTypeRegistry.registerNodeTypes(Collection)
public void unregisterNodeType(Name nodeTypeName)
throws javax.jcr.nodetype.NoSuchNodeTypeException,
javax.jcr.RepositoryException
unregisterNodeType in interface NodeTypeRegistryjavax.jcr.nodetype.NoSuchNodeTypeException
javax.jcr.RepositoryExceptionNodeTypeRegistry.unregisterNodeType(Name)
public void unregisterNodeTypes(java.util.Collection nodeTypeNames)
throws javax.jcr.nodetype.NoSuchNodeTypeException,
javax.jcr.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
javax.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 EffectiveNodeType reregisterNodeType(QNodeTypeDefinition ntd)
throws javax.jcr.nodetype.NoSuchNodeTypeException,
InvalidNodeTypeDefException,
javax.jcr.RepositoryException
reregisterNodeType in interface NodeTypeRegistryjavax.jcr.nodetype.NoSuchNodeTypeException
InvalidNodeTypeDefException
javax.jcr.RepositoryExceptionNodeTypeRegistry.reregisterNodeType(QNodeTypeDefinition)
public QNodeTypeDefinition getNodeTypeDefinition(Name nodeTypeName)
throws javax.jcr.nodetype.NoSuchNodeTypeException
NodeTypeRegistry
getNodeTypeDefinition 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 qualified
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 qualified
NodeType names.
getEffectiveNodeType in interface EffectiveNodeTypeProviderjavax.jcr.nodetype.ConstraintViolationException
javax.jcr.nodetype.NoSuchNodeTypeExceptionEffectiveNodeTypeProvider.getEffectiveNodeType(Name[])
public EffectiveNodeType getEffectiveNodeType(Name[] ntNames,
java.util.Map ntdMap)
throws javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.nodetype.NoSuchNodeTypeException
getEffectiveNodeType in interface EffectiveNodeTypeProviderjavax.jcr.nodetype.ConstraintViolationException
javax.jcr.nodetype.NoSuchNodeTypeExceptionEffectiveNodeTypeProvider.getEffectiveNodeType(Name[], Map)
public EffectiveNodeType getEffectiveNodeType(QNodeTypeDefinition ntd,
java.util.Map ntdMap)
throws javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.nodetype.NoSuchNodeTypeException
EffectiveNodeTypeProvider
getEffectiveNodeType in interface EffectiveNodeTypeProviderjavax.jcr.nodetype.ConstraintViolationException
javax.jcr.nodetype.NoSuchNodeTypeExceptionEffectiveNodeTypeProvider.getEffectiveNodeType(QNodeTypeDefinition, Map)public void dump(java.io.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 | |||||||||