Class NodeTypeDefinitionFactory
java.lang.Object
org.apache.jackrabbit.spi.commons.nodetype.NodeTypeDefinitionFactory
NodeTypeDefinitionFactory can be used to convert the internal
SPI node type definitions to JCR NodeTypeDefinitions.-
Constructor Summary
ConstructorsConstructorDescriptionNodeTypeDefinitionFactory(Session session) Creates a new node type definition factory that operates on the given session to create the templates. -
Method Summary
Modifier and TypeMethodDescriptioncreate(Collection<QNodeTypeDefinition> defs) Create a list ofJCR node type definitionsfrom a collection ofQNodeTypeDefinition.create(QNodeDefinition qNd) Create a new JCR node definition from the givenQNodeDefinition.create(QNodeTypeDefinition qNtd) Create a new JCR node type definition from the givenQNodeTypeDefinition.Create a new JCR property definition from the givenQPropertyDefinition.
-
Constructor Details
-
NodeTypeDefinitionFactory
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 Details
-
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
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
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
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.
-