public class TemplateBuilderFactory extends DefinitionBuilderFactory<javax.jcr.nodetype.NodeTypeTemplate,javax.jcr.NamespaceRegistry>
DefinitionBuilderFactory
can be used with
the CompactNodeTypeDefReader
to produce node type definitions of type
NodeTypeTemplate
and a namespace map of type NamespaceRegistry
.
It uses TemplateBuilderFactory.NodeTypeTemplateBuilder
for building node type definitions,
TemplateBuilderFactory.PropertyDefinitionTemplateBuilder
for building property definitions, and
TemplateBuilderFactory.NodeDefinitionTemplateBuilder
for building node definitions.Modifier and Type | Class and Description |
---|---|
class |
TemplateBuilderFactory.NodeDefinitionTemplateBuilder |
class |
TemplateBuilderFactory.NodeTypeTemplateBuilder |
class |
TemplateBuilderFactory.PropertyDefinitionTemplateBuilder |
DefinitionBuilderFactory.AbstractItemDefinitionBuilder<T>, DefinitionBuilderFactory.AbstractNodeDefinitionBuilder<T>, DefinitionBuilderFactory.AbstractNodeTypeDefinitionBuilder<T>, DefinitionBuilderFactory.AbstractPropertyDefinitionBuilder<T>
Constructor and Description |
---|
TemplateBuilderFactory(javax.jcr.nodetype.NodeTypeManager nodeTypeManager,
javax.jcr.ValueFactory valueFactory,
javax.jcr.NamespaceRegistry namespaceRegistry) |
TemplateBuilderFactory(javax.jcr.Session session)
Creates a new
TemplateBuilderFactory for the specified
Session . |
Modifier and Type | Method and Description |
---|---|
javax.jcr.NamespaceRegistry |
getNamespaceMapping() |
DefinitionBuilderFactory.AbstractNodeTypeDefinitionBuilder<javax.jcr.nodetype.NodeTypeTemplate> |
newNodeTypeDefinitionBuilder()
Create a new instance of a
DefinitionBuilderFactory.AbstractNodeTypeDefinitionBuilder |
void |
setNamespace(String prefix,
String uri)
Add a mapping to the namespace map
|
void |
setNamespaceMapping(javax.jcr.NamespaceRegistry namespaceRegistry)
Set the namespace mapping to use for the node type definition being built
|
public TemplateBuilderFactory(javax.jcr.nodetype.NodeTypeManager nodeTypeManager, javax.jcr.ValueFactory valueFactory, javax.jcr.NamespaceRegistry namespaceRegistry)
public TemplateBuilderFactory(javax.jcr.Session session) throws javax.jcr.RepositoryException
TemplateBuilderFactory
for the specified
Session
. This is equivalent to
TemplateBuilderFactory(NodeTypeManager, ValueFactory, NamespaceRegistry)
where all parameters are obtained from the given session object and
the workspace associated with it.session
- The repository session.javax.jcr.RepositoryException
- If an error occurs.public DefinitionBuilderFactory.AbstractNodeTypeDefinitionBuilder<javax.jcr.nodetype.NodeTypeTemplate> newNodeTypeDefinitionBuilder() throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
DefinitionBuilderFactory
DefinitionBuilderFactory.AbstractNodeTypeDefinitionBuilder
newNodeTypeDefinitionBuilder
in class DefinitionBuilderFactory<javax.jcr.nodetype.NodeTypeTemplate,javax.jcr.NamespaceRegistry>
javax.jcr.RepositoryException
javax.jcr.UnsupportedRepositoryOperationException
public void setNamespaceMapping(javax.jcr.NamespaceRegistry namespaceRegistry)
DefinitionBuilderFactory
setNamespaceMapping
in class DefinitionBuilderFactory<javax.jcr.nodetype.NodeTypeTemplate,javax.jcr.NamespaceRegistry>
public javax.jcr.NamespaceRegistry getNamespaceMapping()
getNamespaceMapping
in class DefinitionBuilderFactory<javax.jcr.nodetype.NodeTypeTemplate,javax.jcr.NamespaceRegistry>
public void setNamespace(String prefix, String uri)
DefinitionBuilderFactory
setNamespace
in class DefinitionBuilderFactory<javax.jcr.nodetype.NodeTypeTemplate,javax.jcr.NamespaceRegistry>
Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.