Package javax.jcr.nodetype

Examples of javax.jcr.nodetype.NoSuchNodeTypeException


        session.getValidator().checkModify(this, options, permissions);

        // check if mixin is assigned
        final NodeState state = data.getNodeState();
        if (!state.getMixinTypeNames().contains(mixinName)) {
            throw new NoSuchNodeTypeException();
        }

        NodeTypeManagerImpl ntMgr = session.getNodeTypeManager();
        NodeTypeRegistry ntReg = ntMgr.getNodeTypeRegistry();
View Full Code Here


      NodeTypeData type = session.getWorkspace().getNodeTypesHolder().getNodeType(name);

      // Mixin or not
      if (type == null || !type.isMixin())
      {
         throw new NoSuchNodeTypeException("Nodetype " + mixinName + " not found or not mixin type.");
      }

      // Validate
      if (session.getWorkspace().getNodeTypesHolder()
         .isNodeType(type.getName(), nodeData().getPrimaryTypeName(), nodeData().getMixinTypeNames()))
View Full Code Here

         session.getWorkspace().getNodeTypesHolder()
            .getNodeType(locationFactory.parseJCRName(mixinName).getInternalName());

      if (type == null)
      {
         throw new NoSuchNodeTypeException("Nodetype not found (mixin) " + mixinName);
      }

      if (session.getWorkspace().getNodeTypesHolder()
         .isNodeType(type.getName(), nodeData().getPrimaryTypeName(), nodeData().getMixinTypeNames()))
      {
View Full Code Here

      }

      // no mixin found
      if (removedName == null)
      {
         throw new NoSuchNodeTypeException("No mixin type found " + mixinName + " for node " + getPath());
      }

      // A ConstraintViolationException will be thrown either
      // immediately or on save if the removal of a mixin is not
      // allowed. Implementations are free to enforce any policy
View Full Code Here

      // Check if nodeType exists and not mixin
      NodeTypeDataManager nodeTypeDataManager = session.getWorkspace().getNodeTypesHolder();
      NodeTypeData nodeType = nodeTypeDataManager.getNodeType(primaryTypeName);
      if (nodeType == null)
      {
         throw new NoSuchNodeTypeException("Nodetype not found "
            + sysLocFactory.createJCRName(primaryTypeName).getAsString());
      }

      if (nodeType.isMixin())
      {
View Full Code Here

         return null;
      }
      //Searching nodeType root
      ItemData nodeType = dataManager.getItemData(nodeTypeStorageRoot, new QPathEntry(nodeTypeName, 1), ItemType.NODE);
      if (nodeType == null)
         throw new NoSuchNodeTypeException("Node type definition " + nodeTypeName.getAsString() + "not found");
      if (!nodeType.isNode())
         throw new RepositoryException("Unexpected property found " + nodeType.getQPath().getAsString()
            + ". Should be node.");

      NodeData nodeTypeRoot = (NodeData)nodeType;
View Full Code Here

   {

      final NodeTypeData nodeType = this.nodeTypeRepository.getNodeType(nodeTypeName);
      if (nodeType == null)
      {
         throw new NoSuchNodeTypeException(nodeTypeName.getAsString());
      }
      // check build in
      if (this.buildInNodeTypesNames.contains(nodeTypeName))
      {
         throw new RepositoryException(nodeTypeName.toString() + ": can't unregister built-in node type.");
View Full Code Here

      NodeTypeData type = session.getWorkspace().getNodeTypesHolder().getNodeType(name);

      // Mixin or not
      if (type == null || !type.isMixin())
      {
         throw new NoSuchNodeTypeException("Nodetype " + mixinName + " not found or not mixin type.");
      }

      // Validate
      if (session.getWorkspace().getNodeTypesHolder().isNodeType(type.getName(), nodeData().getPrimaryTypeName(),
         nodeData().getMixinTypeNames()))
View Full Code Here

         session.getWorkspace().getNodeTypesHolder().getNodeType(
            locationFactory.parseJCRName(mixinName).getInternalName());

      if (type == null)
      {
         throw new NoSuchNodeTypeException("Nodetype not found (mixin) " + mixinName);
      }

      if (session.getWorkspace().getNodeTypesHolder().isNodeType(type.getName(), nodeData().getPrimaryTypeName(),
         nodeData().getMixinTypeNames()))
      {
View Full Code Here

      }

      // no mixin found
      if (removedName == null)
      {
         throw new NoSuchNodeTypeException("No mixin type found " + mixinName + " for node " + getPath());
      }

      // A ConstraintViolationException will be thrown either
      // immediately or on save if the removal of a mixin is not
      // allowed. Implementations are free to enforce any policy
View Full Code Here

TOP

Related Classes of javax.jcr.nodetype.NoSuchNodeTypeException

Copyright © 2018 www.massapicom. 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.