@Override public NodeDefinitionTemplate createNodeDefinitionTemplate() { return new NodeDefinitionTemplateImpl(getNamePathMapper()); }
@Override public NodeTypeTemplate createNodeTypeTemplate(NodeTypeDefinition ntd) throws ConstraintViolationException { return new NodeTypeTemplateImpl(getNamePathMapper(), ntd); }
@Override public NodeTypeTemplate createNodeTypeTemplate(NodeTypeDefinition ntd) throws ConstraintViolationException { return new NodeTypeTemplateImpl(getNamePathMapper(), ntd); }
@Override public NodeTypeTemplate createNodeTypeTemplate(NodeTypeDefinition ntd) throws ConstraintViolationException { return new NodeTypeTemplateImpl(getNamePathMapper(), ntd); }
@Override public NodeTypeTemplate createNodeTypeTemplate() { return new NodeTypeTemplateImpl(getNamePathMapper()); }
@Override public PropertyDefinitionTemplate createPropertyDefinitionTemplate() { return new PropertyDefinitionTemplateImpl(getNamePathMapper()); }
@Override public NodeTypeTemplate createNodeTypeTemplate() { return new NodeTypeTemplateImpl(getNamePathMapper()); }
@Override public PropertyDefinitionTemplate createPropertyDefinitionTemplate() { return new PropertyDefinitionTemplateImpl(getNamePathMapper()); }
@Override public NodeTypeTemplate createNodeTypeTemplate() { return new NodeTypeTemplateImpl(getNamePathMapper()); }
@Override public NodeDefinitionTemplate createNodeDefinitionTemplate() { return new NodeDefinitionTemplateImpl(getNamePathMapper()); }
@Override public NodeDefinitionTemplate createNodeDefinitionTemplate() { return new NodeDefinitionTemplateImpl(getNamePathMapper()); }
@Override public PropertyDefinitionTemplate createPropertyDefinitionTemplate() { return new PropertyDefinitionTemplateImpl(getNamePathMapper()); }
@Override public final NodeTypeIterator registerNodeTypes( NodeTypeDefinition[] ntds, boolean allowUpdate) throws RepositoryException { Root root = getWriteRoot(); try { Tree tree = getOrCreateNodeTypes(root); for (NodeTypeDefinition ntd : ntds) { NodeTypeTemplateImpl template; if (ntd instanceof NodeTypeTemplateImpl) { template = (NodeTypeTemplateImpl) ntd; } else { // some external template implementation, copy before proceeding template = new NodeTypeTemplateImpl(getNamePathMapper(), ntd); } template.writeTo(tree, allowUpdate); } root.commit(); refresh(); List<NodeType> types = new ArrayList<NodeType>(ntds.length); for (NodeTypeDefinition ntd : ntds) { types.add(getNodeType(ntd.getName())); } return new NodeTypeIteratorAdapter(types); } catch (CommitFailedException e) { String message = "Failed to register node types."; throw e.asRepositoryException(message); } }
@Override public final NodeTypeIterator registerNodeTypes( NodeTypeDefinition[] ntds, boolean allowUpdate) throws RepositoryException { Root root = getWriteRoot(); try { Tree tree = getOrCreateNodeTypes(root); for (NodeTypeDefinition ntd : ntds) { NodeTypeTemplateImpl template; if (ntd instanceof NodeTypeTemplateImpl) { template = (NodeTypeTemplateImpl) ntd; } else { // some external template implementation, copy before proceeding template = new NodeTypeTemplateImpl(getNamePathMapper(), ntd); } template.writeTo(tree, allowUpdate); } root.commit(); refresh(); List<NodeType> types = new ArrayList<NodeType>(ntds.length); for (NodeTypeDefinition ntd : ntds) { types.add(getNodeType(ntd.getName())); } return new NodeTypeIteratorAdapter(types); } catch (CommitFailedException e) { String message = "Failed to register node types."; throw e.asRepositoryException(message); } }
@Override public final NodeTypeIterator registerNodeTypes( NodeTypeDefinition[] ntds, boolean allowUpdate) throws RepositoryException { Root root = getWriteRoot(); try { Tree tree = getOrCreateNodeTypes(root); for (NodeTypeDefinition ntd : ntds) { NodeTypeTemplateImpl template; if (ntd instanceof NodeTypeTemplateImpl) { template = (NodeTypeTemplateImpl) ntd; } else { // some external template implementation, copy before proceeding template = new NodeTypeTemplateImpl(getNamePathMapper(), ntd); } template.writeTo(tree, allowUpdate); } root.commit(); refresh(); List<NodeType> types = new ArrayList<NodeType>(ntds.length); for (NodeTypeDefinition ntd : ntds) { types.add(getNodeType(ntd.getName())); } return new NodeTypeIteratorAdapter(types); } catch (CommitFailedException e) { String message = "Failed to register node types."; throw e.asRepositoryException(message); } }