Copyright© 2008-2022 Sitevision AB, all rights reserved.
public interface NodeTypeManager
Workspace.getNodeTypeManager()
.Modifier and Type | Method and Description |
---|---|
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(String nodeTypeName)
Returns the named node type.
|
NodeTypeIterator |
getPrimaryNodeTypes()
Returns an iterator over all available primary node types.
|
boolean |
hasNodeType(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(String name)
Unregisters the specified node type.
|
void |
unregisterNodeTypes(String[] names)
Unregisters the specified set of node types.
|
NodeType getNodeType(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(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
.
Sitevision note: Unsupported operation
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
.
Sitevision note: Unsupported operation
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
.
Sitevision note: Unsupported operation
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
.
Sitevision note: Unsupported operation
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.
Sitevision note: Unsupported operation
ntd
- an NodeTypeDefinition
.allowUpdate
- a booleanInvalidNodeTypeDefinitionException
- 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.
Sitevision note: Unsupported operation
ntds
- a collection of NodeTypeDefinition
sallowUpdate
- a booleanInvalidNodeTypeDefinitionException
- 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(String name) throws UnsupportedRepositoryOperationException, NoSuchNodeTypeException, RepositoryException
Sitevision note: Unsupported operation
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(String[] names) throws UnsupportedRepositoryOperationException, NoSuchNodeTypeException, RepositoryException
Sitevision note: Unsupported operation
names
- a String
arrayUnsupportedRepositoryOperationException
- 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.Sitevision - Portal and Content Management Made Easy
Sitevision is an advanced Java enterprise portal product and a portlet container (JSR 286) that implements Java Content Repository (JSR 283).
Copyright© 2008-2022 Sitevision AB, all rights reserved.