org.modeshape.jcr.api.nodetype
Interface NodeTypeManager

All Superinterfaces:
NodeTypeManager

public interface NodeTypeManager
extends NodeTypeManager

An extension of JCR 2.0's NodeTypeManager interface, with methods to support registering node type definitions from CND files.


Method Summary
 void registerNodeTypes(File file, boolean allowUpdate)
          Read the supplied file containing node type definitions in the standard JCR 2.0 Compact Node Definition (CND) format, and register the node types with this repository.
 void registerNodeTypes(InputStream stream, boolean allowUpdate)
          Read the supplied stream containing node type definitions in the standard JCR 2.0 Compact Node Definition (CND) format, and register the node types with this repository.
 void registerNodeTypes(URL url, boolean allowUpdate)
          Read the supplied stream containing node type definitions in the standard JCR 2.0 Compact Node Definition (CND) format, and register the node types with this repository.
 
Methods inherited from interface javax.jcr.nodetype.NodeTypeManager
createNodeDefinitionTemplate, createNodeTypeTemplate, createNodeTypeTemplate, createPropertyDefinitionTemplate, getAllNodeTypes, getMixinNodeTypes, getNodeType, getPrimaryNodeTypes, hasNodeType, registerNodeType, registerNodeTypes, unregisterNodeType, unregisterNodeTypes
 

Method Detail

registerNodeTypes

void registerNodeTypes(InputStream stream,
                       boolean allowUpdate)
                       throws IOException,
                              InvalidNodeTypeDefinitionException,
                              NodeTypeExistsException,
                              UnsupportedRepositoryOperationException,
                              RepositoryException
Read the supplied stream containing node type definitions in the standard JCR 2.0 Compact Node Definition (CND) format, and register the node types with this repository.

Parameters:
stream - the stream containing the node type definitions in CND format
allowUpdate - a boolean stating whether existing node type definitions should be modified/updated
Throws:
IOException - if there is a problem reading from the supplied stream
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.

registerNodeTypes

void registerNodeTypes(File file,
                       boolean allowUpdate)
                       throws IOException,
                              RepositoryException
Read the supplied file containing node type definitions in the standard JCR 2.0 Compact Node Definition (CND) format, and register the node types with this repository.

Parameters:
file - the file containing the node types
allowUpdate - a boolean stating whether existing node type definitions should be modified/updated
Throws:
IOException - if there is a problem reading from the supplied stream
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.

registerNodeTypes

void registerNodeTypes(URL url,
                       boolean allowUpdate)
                       throws IOException,
                              RepositoryException
Read the supplied stream containing node type definitions in the standard JCR 2.0 Compact Node Definition (CND) format, and register the node types with this repository.

Parameters:
url - the URL that can be resolved to the file containing the node type definitions in CND format
allowUpdate - a boolean stating whether existing node type definitions should be modified/updated
Throws:
IOException - if there is a problem reading from the supplied stream
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.


Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.