|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface NodeTypeManager
Allows for the retrieval and (in implementations that support it) the
registration of node types. Accessed via Workspace.getNodeTypeManager().
| Method Summary | |
|---|---|
NodeDefinitionTemplate |
createNodeDefinitionTemplate()
Returns an empty NodeDefinitionTemplate which can then be
used to create a child node definition and attached to a
NodeTypeTemplate. |
NodeTypeTemplate |
createNodeTypeTemplate()
Returns an empty NodeTypeTemplate which can then be used to
define a node type and passed to NodeTypeManager.registerNodeType. |
NodeTypeTemplate |
createNodeTypeTemplate(NodeTypeDefinition ntd)
Returns a NodeTypeTemplate holding the specified node type
definition. |
PropertyDefinitionTemplate |
createPropertyDefinitionTemplate()
Returns an empty PropertyDefinitionTemplate which can then
be used to create a property definition and attached to a
NodeTypeTemplate. |
NodeTypeIterator |
getAllNodeTypes()
Returns an iterator over all available node types (primary and mixin). |
NodeTypeIterator |
getMixinNodeTypes()
Returns an iterator over all available mixin node types. |
NodeType |
getNodeType(java.lang.String nodeTypeName)
Returns the named node type. |
NodeTypeIterator |
getPrimaryNodeTypes()
Returns an iterator over all available primary node types. |
boolean |
hasNodeType(java.lang.String name)
Returns true if a node type with the specified name is
registered. |
NodeType |
registerNodeType(NodeTypeDefinition ntd,
boolean allowUpdate)
Registers a new node type or updates an existing node type using the specified definition and returns the resulting NodeType
object. |
NodeTypeIterator |
registerNodeTypes(NodeTypeDefinition[] ntds,
boolean allowUpdate)
Registers or updates the specified array of NodeTypeDefinition
objects. |
void |
unregisterNodeType(java.lang.String name)
Unregisters the specified node type. |
void |
unregisterNodeTypes(java.lang.String[] names)
Unregisters the specified set of node types. |
| Method Detail |
|---|
NodeType getNodeType(java.lang.String nodeTypeName)
throws NoSuchNodeTypeException,
RepositoryException
nodeTypeName - the name of an existing node type.
NodeType object.
NoSuchNodeTypeException - if no node type by the given name
exists.
RepositoryException - if another error occurs.
boolean hasNodeType(java.lang.String name)
throws RepositoryException
true if a node type with the specified name is
registered. Returns false otherwise.
name - a String.
boolean
RepositoryException - if an error occurs.
NodeTypeIterator getAllNodeTypes()
throws RepositoryException
NodeTypeIterator.
RepositoryException - if an error occurs.
NodeTypeIterator getPrimaryNodeTypes()
throws RepositoryException
NodeTypeIterator.
RepositoryException - if an error occurs.
NodeTypeIterator getMixinNodeTypes()
throws RepositoryException
NodeTypeIterator.
RepositoryException - if an error occurs.
NodeTypeTemplate createNodeTypeTemplate()
throws UnsupportedRepositoryOperationException,
RepositoryException
NodeTypeTemplate which can then be used to
define a node type and passed to NodeTypeManager.registerNodeType.
NodeTypeTemplate.
UnsupportedRepositoryOperationException - if this implementation
does not support node type registration.
RepositoryException - if another error occurs.
NodeTypeTemplate createNodeTypeTemplate(NodeTypeDefinition ntd)
throws UnsupportedRepositoryOperationException,
RepositoryException
NodeTypeTemplate holding the specified node type
definition. This template can then be altered and passed to
NodeTypeManager.registerNodeType.
ntd - a NodeTypeDefinition.
NodeTypeTemplate.
UnsupportedRepositoryOperationException - if this implementation
does not support node type registration.
RepositoryException - if another error occurs.
NodeDefinitionTemplate createNodeDefinitionTemplate()
throws UnsupportedRepositoryOperationException,
RepositoryException
NodeDefinitionTemplate which can then be
used to create a child node definition and attached to a
NodeTypeTemplate.
NodeDefinitionTemplate.
UnsupportedRepositoryOperationException - if this implementation
does not support node type registration.
RepositoryException - if another error occurs.
PropertyDefinitionTemplate createPropertyDefinitionTemplate()
throws UnsupportedRepositoryOperationException,
RepositoryException
PropertyDefinitionTemplate which can then
be used to create a property definition and attached to a
NodeTypeTemplate.
PropertyDefinitionTemplate.
UnsupportedRepositoryOperationException - if this implementation
does not support node type registration.
RepositoryException - if another error occurs.
NodeType registerNodeType(NodeTypeDefinition ntd,
boolean allowUpdate)
throws InvalidNodeTypeDefinitionException,
NodeTypeExistsException,
UnsupportedRepositoryOperationException,
RepositoryException
NodeType
object.
Typically, the object passed to this method will be a
NodeTypeTemplate (a subclass of NodeTypeDefinition)
acquired from NodeTypeManager.createNodeTypeTemplate and
then filled-in with definition information.
ntd - an NodeTypeDefinition.allowUpdate - a boolean
InvalidNodeTypeDefinitionException - if the
NodeTypeDefinition is invalid.
NodeTypeExistsException - if allowUpdate is
false and the NodeTypeDefinition specifies a
node type name that is already registered.
UnsupportedRepositoryOperationException - if this implementation
does not support node type registration.
RepositoryException - if another error occurs.
NodeTypeIterator registerNodeTypes(NodeTypeDefinition[] ntds,
boolean allowUpdate)
throws InvalidNodeTypeDefinitionException,
NodeTypeExistsException,
UnsupportedRepositoryOperationException,
RepositoryException
NodeTypeDefinition
objects. This method is used to register or update a set of node types
with mutual dependencies. Returns an iterator over the resulting
NodeType objects.
The effect of the method is "all or nothing"; if an error occurs, no node types are registered or updated.
ntds - a collection of NodeTypeDefinitionsallowUpdate - a boolean
InvalidNodeTypeDefinitionException - if a NodeTypeDefinition
within the Collection is invalid or if the
Collection contains an object of a type other than
NodeTypeDefinition.
NodeTypeExistsException - if allowUpdate is
false and a NodeTypeDefinition within the
Collection specifies a node type name that is already
registered.
UnsupportedRepositoryOperationException - if this implementation
does not support node type registration.
RepositoryException - if another error occurs.
void unregisterNodeType(java.lang.String name)
throws UnsupportedRepositoryOperationException,
NoSuchNodeTypeException,
RepositoryException
name - a String.
UnsupportedRepositoryOperationException - if this implementation
does not support node type registration.
NoSuchNodeTypeException - if no registered node type exists with
the specified name.
RepositoryException - if another error occurs.
void unregisterNodeTypes(java.lang.String[] names)
throws UnsupportedRepositoryOperationException,
NoSuchNodeTypeException,
RepositoryException
names - a String array
UnsupportedRepositoryOperationException - if this implementation
does not support node type registration.
NoSuchNodeTypeException - if one of the names listed is not a
registered node type.
RepositoryException - if another error occurs.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||