public class TemplateBuilderFactory extends DefinitionBuilderFactory<NodeTypeTemplate,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(NodeTypeManager nodeTypeManager,
ValueFactory valueFactory,
NamespaceRegistry namespaceRegistry) |
TemplateBuilderFactory(Session session)
Creates a new
TemplateBuilderFactory for the specified
Session . |
Modifier and Type | Method and Description |
---|---|
NamespaceRegistry |
getNamespaceMapping() |
DefinitionBuilderFactory.AbstractNodeTypeDefinitionBuilder<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(NamespaceRegistry namespaceRegistry)
Set the namespace mapping to use for the node type definition being built
|
public TemplateBuilderFactory(NodeTypeManager nodeTypeManager, ValueFactory valueFactory, NamespaceRegistry namespaceRegistry)
public TemplateBuilderFactory(Session session) throws 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.RepositoryException
- If an error occurs.public DefinitionBuilderFactory.AbstractNodeTypeDefinitionBuilder<NodeTypeTemplate> newNodeTypeDefinitionBuilder() throws UnsupportedRepositoryOperationException, RepositoryException
DefinitionBuilderFactory
DefinitionBuilderFactory.AbstractNodeTypeDefinitionBuilder
newNodeTypeDefinitionBuilder
in class DefinitionBuilderFactory<NodeTypeTemplate,NamespaceRegistry>
RepositoryException
UnsupportedRepositoryOperationException
public void setNamespaceMapping(NamespaceRegistry namespaceRegistry)
DefinitionBuilderFactory
setNamespaceMapping
in class DefinitionBuilderFactory<NodeTypeTemplate,NamespaceRegistry>
public NamespaceRegistry getNamespaceMapping()
getNamespaceMapping
in class DefinitionBuilderFactory<NodeTypeTemplate,NamespaceRegistry>
public void setNamespace(String prefix, String uri)
DefinitionBuilderFactory
setNamespace
in class DefinitionBuilderFactory<NodeTypeTemplate,NamespaceRegistry>
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.