Class NodeTypeDefinitionFactory
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.nodetype.NodeTypeDefinitionFactory
-
public class NodeTypeDefinitionFactory extends Object
NodeTypeDefinitionFactorycan be used to convert the internal SPI node type definitions to JCRNodeTypeDefinitions.
-
-
Constructor Summary
Constructors Constructor Description NodeTypeDefinitionFactory(Session session)Creates a new node type definition factory that operates on the given session to create the templates.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<NodeTypeDefinition>create(Collection<QNodeTypeDefinition> defs)Create a list ofJCR node type definitionsfrom a collection ofQNodeTypeDefinition.NodeDefinitioncreate(QNodeDefinition qNd)Create a new JCR node definition from the givenQNodeDefinition.NodeTypeDefinitioncreate(QNodeTypeDefinition qNtd)Create a new JCR node type definition from the givenQNodeTypeDefinition.PropertyDefinitioncreate(QPropertyDefinition qPd)Create a new JCR property definition from the givenQPropertyDefinition.
-
-
-
Constructor Detail
-
NodeTypeDefinitionFactory
public NodeTypeDefinitionFactory(Session session) throws RepositoryException
Creates a new node type definition factory that operates on the given session 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 ofJCR node type definitionsfrom a collection ofQNodeTypeDefinition.- 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 givenQNodeTypeDefinition.- 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 givenQNodeDefinition.- 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 givenQPropertyDefinition.- Parameters:
qPd- A SPI property definition.- Returns:
- the corresponding JCR property definition.
- Throws:
RepositoryException- if an error occurs.
-
-