org.apache.jackrabbit.spi.commons.nodetype
Class NodeTypeDefinitionFactory

java.lang.Object
  extended by org.apache.jackrabbit.spi.commons.nodetype.NodeTypeDefinitionFactory

public class NodeTypeDefinitionFactory
extends Object

NodeTypeDefinitionFactory can be used to convert the internal SPI node type definitions to JCR NodeTypeDefinitions.


Constructor Summary
NodeTypeDefinitionFactory(Session session)
          Creates a new node type definition factory that operates on the given sesion to create the templates.
 
Method Summary
 List<NodeTypeDefinition> create(Collection<QNodeTypeDefinition> defs)
          Create a list of JCR node type definitions from a collection of QNodeTypeDefinition.
 NodeDefinition create(QNodeDefinition qNd)
          Create a new JCR node definition from the given QNodeDefinition.
 NodeTypeDefinition create(QNodeTypeDefinition qNtd)
          Create a new JCR node type definition from the given QNodeTypeDefinition.
 PropertyDefinition create(QPropertyDefinition qPd)
          Create a new JCR property definition from the given QPropertyDefinition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeTypeDefinitionFactory

public NodeTypeDefinitionFactory(Session session)
                          throws RepositoryException
Creates a new node type definition factory that operates on the given sesion to create the templates.

Parameters:
session - repository session.
Throws:
RepositoryException - if an error occurs.
Method Detail

create

public List<NodeTypeDefinition> create(Collection<QNodeTypeDefinition> defs)
                                throws RepositoryException
Create a list of JCR node type definitions from a collection of QNodeTypeDefinition.

Parameters:
defs - the SPI node type definitions.
Returns:
the JCR node type definitions.
Throws:
RepositoryException - if an error occurs.

create

public NodeTypeDefinition create(QNodeTypeDefinition qNtd)
                          throws RepositoryException
Create a new JCR node type definition from the given QNodeTypeDefinition.

Parameters:
qNtd - A SPI node type definition.
Returns:
the corresponding JCR node type definition.
Throws:
RepositoryException - if an error occurs.

create

public NodeDefinition create(QNodeDefinition qNd)
                      throws RepositoryException
Create a new JCR node definition from the given QNodeDefinition.

Parameters:
qNd - A node definition.
Returns:
The corresponding JCR node definition.
Throws:
RepositoryException - if an error occurs.

create

public PropertyDefinition create(QPropertyDefinition qPd)
                          throws RepositoryException
Create a new JCR property definition from the given QPropertyDefinition.

Parameters:
qPd - A SPI property definition.
Returns:
the corresponding JCR property definition.
Throws:
RepositoryException - if an error occurs.


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