| |
|
| javax.jcr.nodetype.NodeTypeManager
NodeTypeManager | public interface NodeTypeManager (Code) | | Allows for the retrieval and (in implementations that support it)
the registration of node types. Accessed via
Workspace.getNodeTypeManager .
|
hasNodeType | public boolean hasNodeType(String name) throws RepositoryException(Code) | | Returns true if a node type with the specified name is
registered. Returns false otherwise.
Parameters: name - a String . a boolean throws: RepositoryException - if an error occurs. since: JCR 2.0 |
registerNodeType | public NodeType registerNodeType(NodeTypeDefinition ntd, boolean allowUpdate) throws InvalidNodeTypeDefinitionException, NodeTypeExistsException, UnsupportedRepositoryOperationException, RepositoryException(Code) | | Registers a new node type or updates an existing node type using the
specified definition and returns the resulting 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.
Throws an InvalidNodeTypeDefinitionException if the
NodeTypeDefinition is invalid.
Throws a NodeTypeExistsException if allowUpdate
is false and the NodeTypeDefinition specifies a
node type name that is already registered.
Throws an UnsupportedRepositoryOperationException if this
implementation does not support node type registration.
Parameters: ntd - an NodeTypeDefinition . Parameters: allowUpdate - a boolean the registered node type throws: InvalidNodeTypeDefinitionException - if theNodeTypeDefinition is invalid. throws: NodeTypeExistsException - if allowUpdate isfalse and the NodeTypeDefinition specifies anode type name that is already registered. throws: UnsupportedRepositoryOperationException - if this implementationdoes not support node type registration. throws: RepositoryException - if another error occurs. since: JCR 2.0 |
registerNodeTypes | public NodeTypeIterator registerNodeTypes(Collection definitions, boolean allowUpdate) throws InvalidNodeTypeDefinitionException, NodeTypeExistsException, UnsupportedRepositoryOperationException, RepositoryException(Code) | | Registers or updates the specified Collection of
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.
Throws an InvalidNodeTypeDefinitionException if a
NodeTypeDefinition within the Collection is
invalid or if the Collection contains an object of a type
other than NodeTypeDefinition .
Throws a NodeTypeExistsException if allowUpdate
is false and a NodeTypeDefinition within the
Collection specifies a node type name that is already
registered.
Throws an UnsupportedRepositoryOperationException if this
implementation does not support node type registration.
Parameters: definitions - a collection of NodeTypeDefinition s Parameters: allowUpdate - a boolean the registered node types. throws: InvalidNodeTypeDefinitionException - if aNodeTypeDefinition within the Collection isinvalid or if the Collection contains an object of a typeother than NodeTypeDefinition . throws: NodeTypeExistsException - if allowUpdate isfalse and a NodeTypeDefinition within theCollection specifies a node type name that is alreadyregistered. throws: UnsupportedRepositoryOperationException - if this implementationdoes not support node type registration. throws: RepositoryException - if another error occurs. since: JCR 2.0 |
|
|
|