JcrNodeType typeName = findTypeInMapOrList(typeNameToCheck, pendingTypes); if (typeName == null) continue;
JcrNodeType typeName = findTypeInMapOrList(typeNameToCheck, pendingTypes); if (typeName == null) continue;
JcrNodeType supertype = findTypeInMapOrList(supertypeName, pendingTypes); if (supertype == null) { throw new InvalidNodeTypeDefinitionException(JcrI18n.invalidSupertypeName.text(supertypeNameStr, nodeTypeName)); Name nodeName = nameFactory.create(nodeTypeName); if (!JcrNtLexicon.BASE.equals(nodeName)) { JcrNodeType ntBase = findTypeInMapOrList(JcrNtLexicon.BASE, pendingTypes); assert ntBase != null; supertypes.add(0, ntBase);
JcrNodeType typeName = findTypeInMapOrList(typeNameToCheck, pendingTypes); if (typeName == null) continue;
JcrNodeType supertype = findTypeInMapOrList(supertypeName, pendingTypes); if (supertype == null) { throw new InvalidNodeTypeDefinitionException(JcrI18n.invalidSupertypeName.text(supertypeNameStr, nodeTypeName)); Name nodeName = nameFactory.create(nodeTypeName); if (!JcrNtLexicon.BASE.equals(nodeName)) { JcrNodeType ntBase = findTypeInMapOrList(JcrNtLexicon.BASE, pendingTypes); assert ntBase != null; supertypes.add(0, ntBase);
JcrNodeType typeName = findTypeInMapOrList(typeNameToCheck, pendingTypes); if (typeName == null) continue;
private void validateTypes( List<JcrNodeType> typesPendingRegistration ) throws RepositoryException { NodeTypes nodeTypes = this.nodeTypesCache; for (JcrNodeType nodeType : typesPendingRegistration) { for (JcrNodeDefinition nodeDef : nodeType.getDeclaredChildNodeDefinitions()) { Name[] requiredPrimaryTypeNames = nodeDef.requiredPrimaryTypeNames(); for (Name primaryTypeName : requiredPrimaryTypeNames) { JcrNodeType requiredPrimaryType = nodeTypes.findTypeInMapOrList(primaryTypeName, typesPendingRegistration); if (requiredPrimaryType == null) { String msg = JcrI18n.invalidPrimaryTypeName.text(primaryTypeName, nodeType.getName()); throw new RepositoryException(msg); } } } if (nodeType.isMixin()) { for (NodeType superType : nodeType.getSupertypes()) { if (!superType.isMixin()) { String msg = JcrI18n.invalidMixinSupertype.text(nodeType.getName(), superType.getName()); throw new RepositoryException(msg); } } } } }
private void validateTypes( List<JcrNodeType> typesPendingRegistration ) throws RepositoryException { NodeTypes nodeTypes = this.nodeTypesCache; for (JcrNodeType nodeType : typesPendingRegistration) { for (JcrNodeDefinition nodeDef : nodeType.getDeclaredChildNodeDefinitions()) { Name[] requiredPrimaryTypeNames = nodeDef.requiredPrimaryTypeNames(); for (Name primaryTypeName : requiredPrimaryTypeNames) { JcrNodeType requiredPrimaryType = nodeTypes.findTypeInMapOrList(primaryTypeName, typesPendingRegistration); if (requiredPrimaryType == null) { String msg = JcrI18n.invalidPrimaryTypeName.text(primaryTypeName, nodeType.getName()); throw new RepositoryException(msg); } } } if (nodeType.isMixin()) { for (NodeType superType : nodeType.getSupertypes()) { if (!superType.isMixin()) { String msg = JcrI18n.invalidMixinSupertype.text(nodeType.getName(), superType.getName()); throw new RepositoryException(msg); } } } } }
NodeType requiredPrimaryTypeFromAncestor = findTypeInMapOrList(requiredPrimaryTypeName, pendingTypes); JcrNodeType childNodePrimaryType = findTypeInMapOrList(name, pendingTypes);
NodeType requiredPrimaryTypeFromAncestor = findTypeInMapOrList(requiredPrimaryTypeName, pendingTypes); JcrNodeType childNodePrimaryType = findTypeInMapOrList(name, pendingTypes);