Examples of NodeTypeExistsException


Examples of javax.jcr.nodetype.NodeTypeExistsException

            throws RepositoryException {
        List<QNodeTypeDefinition> defs = new ArrayList<QNodeTypeDefinition>(ntds.length);
        for (NodeTypeDefinition definition : ntds) {
            QNodeTypeDefinition qdef = new QNodeTypeDefinitionImpl(definition, getNamePathResolver(), mgrProvider.getQValueFactory());
            if (!allowUpdate && hasNodeType(qdef.getName())) {
                throw new NodeTypeExistsException("NodeType " + definition.getName() + " already exists.");
            }
            defs.add(qdef);
        }

        getNodeTypeRegistry().registerNodeTypes(defs, allowUpdate);
View Full Code Here

Examples of javax.jcr.nodetype.NodeTypeExistsException

            NodeTypeDef def = toNodeTypeDef(definition);
            if (ntReg.isRegistered(def.getName())) {
              if (allowUpdate) {
                  modifiedDefs.add(def);
              } else {
                  throw new NodeTypeExistsException(definition.getName());
              }
            } else {
                addedDefs.add(def);
            }
        }
View Full Code Here

Examples of javax.jcr.nodetype.NodeTypeExistsException

        Tree type = parent.getChild(oakName);
        if (!type.exists()) {
            type = parent.addChild(oakName);
            type.setProperty(JCR_PRIMARYTYPE, NT_NODETYPE, Type.NAME);
        } else if (!allowUpdate) {
            throw new NodeTypeExistsException(
                    "Node type " + getName() + " already exists");
        }

        type.setProperty(JCR_NODETYPENAME, oakName, Type.NAME);
View Full Code Here

Examples of javax.jcr.nodetype.NodeTypeExistsException

        Tree type = parent.getChild(oakName);
        if (type != null) {
            if (allowUpdate) {
                type.remove();
            } else {
                throw new NodeTypeExistsException(
                        "Node type " + getName() + " already exists");
            }
        }
        type = parent.addChild(oakName);
View Full Code Here

Examples of org.apache.jackrabbit.api.jsr283.nodetype.NodeTypeExistsException

            NodeTypeDef def = toNodeTypeDef(definition);
            if (ntReg.isRegistered(def.getName())) {
              if (allowUpdate) {
                  modifiedDefs.add(def);
              } else {
                  throw new NodeTypeExistsException(definition.getName());
              }
            } else {
                addedDefs.add(def);
            }
        }
View Full Code Here

Examples of org.apache.jackrabbit.api.jsr283.nodetype.NodeTypeExistsException

            NodeTypeDef def = toNodeTypeDef(definition);
            if (ntReg.isRegistered(def.getName())) {
              if (allowUpdate) {
                  modifiedDefs.add(def);
              } else {
                  throw new NodeTypeExistsException(definition.getName());
              }
            } else {
                addedDefs.add(def);
            }
        }
View Full Code Here

Examples of org.apache.jackrabbit.api.jsr283.nodetype.NodeTypeExistsException

            NodeTypeDef def = toNodeTypeDef(definition);
            if (ntReg.isRegistered(def.getName())) {
              if (allowUpdate) {
                  modifiedDefs.add(def);
              } else {
                  throw new NodeTypeExistsException(definition.getName());
              }
            } else {
                addedDefs.add(def);
            }
        }
View Full Code Here

Examples of org.apache.jackrabbit.core.nodetype.jsr283.NodeTypeExistsException

            NodeTypeDef def = toNodeTypeDef(definition);
            if (ntReg.isRegistered(def.getName())) {
              if (allowUpdate) {
                  modifiedDefs.add(def);
              } else {
                  throw new NodeTypeExistsException(definition.getName());
              }
            } else {
                addedDefs.add(def);
            }
        }
View Full Code Here

Examples of org.jboss.dna.jcr.nodetype.NodeTypeExistsException

                if (internalName == null || internalName.getLocalName().length() == 0) {
                    throw new InvalidNodeTypeDefinitionException(JcrI18n.invalidNodeTypeName.text());
                }

                if (nodeTypes.containsKey(internalName)) {
                    throw new NodeTypeExistsException(internalName,
                                                      JcrI18n.nodeTypeAlreadyExists.text(internalName.getString(namespaces)));
                }

                List<JcrNodeType> supertypes = supertypesFor(nodeTypeNode, typesPendingRegistration);
                // No need to re-parse the supertypes
View Full Code Here

Examples of org.jboss.dna.jcr.nodetype.NodeTypeExistsException

                if (internalName == null || internalName.getLocalName().length() == 0) {
                    throw new InvalidNodeTypeDefinitionException(JcrI18n.invalidNodeTypeName.text());
                }

                if (nodeTypes.containsKey(internalName)) {
                    throw new NodeTypeExistsException(internalName,
                                                      JcrI18n.nodeTypeAlreadyExists.text(internalName.getString(namespaces)));
                }

                List<JcrNodeType> supertypes = supertypesFor(nodeTypeNode, typesPendingRegistration);
                // No need to re-parse the supertypes
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.