org.apache.jackrabbit.ocm.nodemanagement
Interface NodeTypeManager

All Known Implementing Classes:
NodeTypeManagerImpl

public interface NodeTypeManager

This interface defines the API for JCR Node Type Management implementations. It does not contain any JCR vendor specific methods. Classes that implement this interface are used to create custom node types in a JCR repository. Each JCR repository has its own way of doing this as it is not defined by the JSR-170 spec. The default implementation of jcr-nodemanagement is Jackrabbit. In order to create JCR custom node types you need to provide an established session to a JCR repository. The user that is logged into has to have the necessary permissions to create nodes (user has to have "superuser" rights). The JCR Node Type Management tools are an extension to the jcr-mapping tools. NodeTypeManager implementations depend on the jcr-mapping xml file and the object model defined by jcr-mapping.

Author:
Oliver Kiessler

Method Summary
 void createNamespace(javax.jcr.Session session, String namespace, String namespaceUri)
          Creates a new namespace in the repository.
 void createNodeTypes(javax.jcr.Session session, ClassDescriptor[] classDescriptors)
          This method creates JCR node types based on ClassDescriptor objects which are created by a jcr-mapping Mapper implementation.
 void createNodeTypes(javax.jcr.Session session, MappingDescriptor mappingDescriptor)
          This method creates JCR node types based on the MappingDescriptor object which is created by a jcr-mapping Mapper implementation.
 void createSingleNodeType(javax.jcr.Session session, ClassDescriptor classDescriptor)
          This method creates a single JCR node type identified by its ClassDescriptor read from the jcr mapping file.
 

Method Detail

createNamespace

void createNamespace(javax.jcr.Session session,
                     String namespace,
                     String namespaceUri)
                     throws NamespaceCreationException
Creates a new namespace in the repository.

Parameters:
namespace - Namespace
namespaceUri - Full namespace URI
Throws:
NamespaceCreationException

createNodeTypes

void createNodeTypes(javax.jcr.Session session,
                     MappingDescriptor mappingDescriptor)
                     throws NodeTypeCreationException
This method creates JCR node types based on the MappingDescriptor object which is created by a jcr-mapping Mapper implementation. A Mapper reads one to many jcr mapping XML File.

Parameters:
session - Repository session
mappingDescriptor - Mapping descriptor object created by jcr-mapping
Throws:
NodeTypeCreationException - NodeTypeCreationException

createNodeTypes

void createNodeTypes(javax.jcr.Session session,
                     ClassDescriptor[] classDescriptors)
                     throws NodeTypeCreationException
This method creates JCR node types based on ClassDescriptor objects which are created by a jcr-mapping Mapper implementation. A Mapper reads one to many jcr mapping XML File.

Parameters:
session - Repository session
classDescriptors - Array of ClassDescriptor objects created by jcr-mapping
Throws:
NodeTypeCreationException - NodeTypeCreationException

createSingleNodeType

void createSingleNodeType(javax.jcr.Session session,
                          ClassDescriptor classDescriptor)
                          throws NodeTypeCreationException
This method creates a single JCR node type identified by its ClassDescriptor read from the jcr mapping file.

Parameters:
session - Repository session
classDescriptor - ClassDescriptor object created by jcr-mapping
Throws:
NodeTypeCreationException - NodeTypeCreationException


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.