|
||||||||||
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 NodeTypeDef s 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)
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 RepositoryException
NodeTypeRegistry
getRegisteredNodeTypes
in interface NodeTypeRegistry
RepositoryException
NodeTypeRegistry.getRegisteredNodeTypes()
public boolean isRegistered(Name nodeTypeName)
isRegistered
in interface NodeTypeRegistry
NodeTypeRegistry.isRegistered(Name)
public EffectiveNodeType registerNodeType(QNodeTypeDefinition ntDef) throws InvalidNodeTypeDefException, RepositoryException
NodeTypeRegistry
NodeTypeDef
and returns
a registered EffectiveNodeType
instance.
The validation includes the following checks:
registerNodeType
in interface NodeTypeRegistry
ntDef
- the definition of the new node type
EffectiveNodeType
instance
InvalidNodeTypeDefException
RepositoryException
NodeTypeRegistry.registerNodeType(QNodeTypeDefinition)
public void registerNodeTypes(Collection ntDefs) throws InvalidNodeTypeDefException, RepositoryException
NodeTypeRegistry
NodeTypeRegistry.registerNodeType(QNodeTypeDefinition)
except
that a collection of NodeTypeDef
s 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 NodeTypeRegistry
ntDefs
- a collection of NodeTypeDefs
- Throws:
InvalidNodeTypeDefException
RepositoryException
- See Also:
NodeTypeRegistry.registerNodeTypes(Collection)
public void unregisterNodeType(Name nodeTypeName) throws NoSuchNodeTypeException, RepositoryException
unregisterNodeType
in interface NodeTypeRegistry
NoSuchNodeTypeException
RepositoryException
NodeTypeRegistry.unregisterNodeType(Name)
public void unregisterNodeTypes(Collection nodeTypeNames) throws NoSuchNodeTypeException, RepositoryException
NodeTypeRegistry
NodeTypeRegistry.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 NodeTypeRegistry
nodeTypeNames
- 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 NodeTypeRegistry
NoSuchNodeTypeException
InvalidNodeTypeDefException
RepositoryException
NodeTypeRegistry.reregisterNodeType(QNodeTypeDefinition)
public QNodeTypeDefinition getNodeTypeDefinition(Name nodeTypeName) throws NoSuchNodeTypeException
NodeTypeRegistry
getNodeTypeDefinition
in interface NodeTypeRegistry
nodeTypeName
- 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
EffectiveNodeTypeProvider
EffectiveNodeType
from the given qualified
NodeType
name.
getEffectiveNodeType
in interface EffectiveNodeTypeProvider
NoSuchNodeTypeException
EffectiveNodeTypeProvider.getEffectiveNodeType(Name)
public EffectiveNodeType getEffectiveNodeType(Name[] ntNames) throws ConstraintViolationException, NoSuchNodeTypeException
EffectiveNodeTypeProvider
EffectiveNodeType
from the given qualified
NodeType
names.
getEffectiveNodeType
in interface EffectiveNodeTypeProvider
ConstraintViolationException
NoSuchNodeTypeException
EffectiveNodeTypeProvider.getEffectiveNodeType(Name[])
public EffectiveNodeType getEffectiveNodeType(Name[] ntNames, Map ntdMap) throws ConstraintViolationException, NoSuchNodeTypeException
getEffectiveNodeType
in interface EffectiveNodeTypeProvider
ConstraintViolationException
NoSuchNodeTypeException
EffectiveNodeTypeProvider.getEffectiveNodeType(Name[], Map)
public EffectiveNodeType getEffectiveNodeType(QNodeTypeDefinition ntd, Map ntdMap) throws ConstraintViolationException, NoSuchNodeTypeException
EffectiveNodeTypeProvider
getEffectiveNodeType
in interface EffectiveNodeTypeProvider
ConstraintViolationException
NoSuchNodeTypeException
EffectiveNodeTypeProvider.getEffectiveNodeType(QNodeTypeDefinition, Map)
public void dump(PrintStream ps)
dump
in interface Dumpable
ps
- stream to dump state to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |