public final class CndImporter
extends java.lang.Object
CompactNodeTypeDefReader,
TemplateBuilderFactory| Modifier and Type | Method and Description |
|---|---|
static NodeType[] |
registerNodeTypes(java.io.Reader cnd,
Session session)
Shortcut for
|
static NodeType[] |
registerNodeTypes(java.io.Reader cnd,
Session session,
boolean reregisterExisting)
Shortcut for
|
static NodeType[] |
registerNodeTypes(java.io.Reader cnd,
java.lang.String systemId,
NodeTypeManager nodeTypeManager,
NamespaceRegistry namespaceRegistry,
ValueFactory valueFactory,
boolean reregisterExisting)
Registers nodetypes in
cnd format. |
public static NodeType[] registerNodeTypes(java.io.Reader cnd, Session session) throws InvalidNodeTypeDefinitionException, NodeTypeExistsException, UnsupportedRepositoryOperationException, ParseException, RepositoryException, java.io.IOException
registerNodeTypes(cnd, "cnd input stream", wsp.getNodeTypeManager(),
wsp.getNamespaceRegistry(), session.getValueFactory(), false);
where wsp is the workspace of the session passed.cnd - session - the session to use for registering the node typesInvalidNodeTypeDefinitionExceptionNodeTypeExistsExceptionUnsupportedRepositoryOperationExceptionParseExceptionRepositoryExceptionjava.io.IOExceptionregisterNodeTypes(Reader, String, NodeTypeManager, NamespaceRegistry, ValueFactory, boolean)public static NodeType[] registerNodeTypes(java.io.Reader cnd, Session session, boolean reregisterExisting) throws InvalidNodeTypeDefinitionException, NodeTypeExistsException, UnsupportedRepositoryOperationException, ParseException, RepositoryException, java.io.IOException
registerNodeTypes(cnd, "cnd input stream", wsp.getNodeTypeManager(),
wsp.getNamespaceRegistry(), session.getValueFactory(), reregisterExisting);
where wsp is the workspace of the session passed.cnd - session - the session to use for registering the node typesreregisterExisting - true if existing node types should be re-registered
with those present in the cnd. false otherwise.InvalidNodeTypeDefinitionExceptionNodeTypeExistsExceptionUnsupportedRepositoryOperationExceptionParseExceptionRepositoryExceptionjava.io.IOExceptionregisterNodeTypes(Reader, String, NodeTypeManager, NamespaceRegistry, ValueFactory, boolean)public static NodeType[] registerNodeTypes(java.io.Reader cnd, java.lang.String systemId, NodeTypeManager nodeTypeManager, NamespaceRegistry namespaceRegistry, ValueFactory valueFactory, boolean reregisterExisting) throws ParseException, InvalidNodeTypeDefinitionException, NodeTypeExistsException, UnsupportedRepositoryOperationException, RepositoryException, java.io.IOException
cnd format.cnd - a reader to the cnd. The reader is closed on return.systemId - a informative id of the given cnd input.nodeTypeManager - the NodeTypeManager used for creating and registering the
NodeTypeTemplates, NodeDefinitionTemplates and PropertyDefinitionTemplates
defined in the cnd.namespaceRegistry - the NamespaceRegistry used for registering namespaces defined in
the cnd.valueFactory - the ValueFactory used to create
default value(s).reregisterExisting - true if existing node types should be re-registered
with those present in the cnd. false otherwise.ParseException - if the cnd cannot be parsedInvalidNodeTypeDefinitionException - if a NodeTypeDefinition is invalid.NodeTypeExistsException - if reregisterExisting is false and a
NodeTypeDefinition specifies a node type name that is already registered.UnsupportedRepositoryOperationException - if the NodeTypeManager does not
support node type registration.java.io.IOException - if closing the cnd reader failsRepositoryException - if another error occurs.Copyright © 2010 - 2023 Adobe. All Rights Reserved