Examples of UserMismatchException


Examples of org.apache.juddi.error.UserMismatchException

          throw new InvalidKeyPassedException("businessKey="+businessKey);

        // Confirm that 'publisherID' controls the BusinessEntity that this
        // BusinessService belongs to.  If not then throw a UserMismatchException.
        if (!dataStore.isBusinessPublisher(businessKey,publisherID))
          throw new UserMismatchException("businessKey="+serviceKey);

        // If a ServiceKey was specified then make sure it's a valid one.
        if (((serviceKey != null) && (serviceKey.length() > 0)) && (!dataStore.isValidServiceKey(serviceKey)))
          throw new InvalidKeyPassedException("serviceKey="+serviceKey);
View Full Code Here

Examples of org.apache.juddi.error.UserMismatchException

              "businessKey="+businessKey);

        // Confirm that 'publisherID' controls the BusinessEntity that this
        // BusinessService belongs to.  If not then throw a UserMismatchException.
        if (!dataStore.isBusinessPublisher(businessKey,publisherID))
          throw new UserMismatchException("save_service: "+
              "userID="+publisherID+", "+
              "businessKey="+serviceKey);

        // If a ServiceKey was specified then make sure it's a valid one.
        if (((serviceKey != null) && (serviceKey.length() > 0)) && (!dataStore.isValidServiceKey(serviceKey)))
View Full Code Here

Examples of org.apache.juddi.error.UserMismatchException

          throw new InvalidKeyPassedException("save_tModel: "+
              "tModelKey="+tModelKey);

        // If a TModelKey was specified then make sure 'publisherID' controls it.
        if (((tModelKey != null) && (tModelKey.length() > 0)) && !dataStore.isTModelPublisher(tModelKey,publisherID))
          throw new UserMismatchException("save_tModel: "+
              "userID="+publisherID+", "+
              "tModelKey="+tModelKey);

        // Normally, a valid tModelKey MUST be specified for the keyedReference
        // to be valid. However, in the case of a keyedReference that is used in
View Full Code Here

Examples of org.apache.juddi.v3.error.UserMismatchException

      Object obj = em.find(org.apache.juddi.model.BusinessEntity.class, entityKey);
      if (obj == null)
        throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.BusinessNotFound", entityKey));
     
      if (!publisher.isOwner((UddiEntity)obj))
        throw new UserMismatchException(new ErrorMessage("errors.usermismatch.InvalidOwner", entityKey));
     
    }
  }
View Full Code Here

Examples of org.apache.juddi.v3.error.UserMismatchException

      Object obj = em.find(org.apache.juddi.model.BusinessService.class, entityKey);
      if (obj == null)
        throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.ServiceNotFound", entityKey));
     
      if (!publisher.isOwner((UddiEntity)obj))
        throw new UserMismatchException(new ErrorMessage("errors.usermismatch.InvalidOwner", entityKey));
     
    }
  }
View Full Code Here

Examples of org.apache.juddi.v3.error.UserMismatchException

      Object obj = em.find(org.apache.juddi.model.BindingTemplate.class, entityKey);
      if (obj == null)
        throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.BindingTemplateNotFound", entityKey));
     
      if (!publisher.isOwner((UddiEntity)obj))
        throw new UserMismatchException(new ErrorMessage("errors.usermismatch.InvalidOwner", entityKey));

    }
  }
View Full Code Here

Examples of org.apache.juddi.v3.error.UserMismatchException

      Object obj = em.find(org.apache.juddi.model.Tmodel.class, entityKey);
      if (obj == null)
        throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.TModelNotFound", entityKey));
     
      if (!publisher.isOwner((UddiEntity)obj))
        throw new UserMismatchException(new ErrorMessage("errors.usermismatch.InvalidOwner", entityKey));
     
    }
  }
View Full Code Here

Examples of org.apache.juddi.v3.error.UserMismatchException

      if (obj != null) {
        entityExists = true;

        // Make sure publisher owns this entity.
        if (!publisher.isOwner((UddiEntity)obj))
          throw new UserMismatchException(new ErrorMessage("errors.usermismatch.InvalidOwner", entityKey));
      }
      else {
        // Inside this block, we have a key proposed by the publisher on a new entity

        // Validate key and then check to see that the proposed key is valid for this publisher
View Full Code Here

Examples of org.apache.juddi.v3.error.UserMismatchException

          if (!parentKey.equalsIgnoreCase(bs.getBusinessEntity().getEntityKey()))
            throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.businessservice.ParentMismatch", parentKey + ", " + bs.getBusinessEntity().getEntityKey()));
         
          // Make sure publisher owns this entity.
          if (!publisher.isOwner((UddiEntity)obj))
            throw new UserMismatchException(new ErrorMessage("errors.usermismatch.InvalidOwner", entityKey));
         
        }
        else {
          // Inside this block, we have a key proposed by the publisher on a new entity

          // Validate key and then check to see that the proposed key is valid for this publisher
          ValidateUDDIKey.validateUDDIv3Key(entityKey);
          if (!publisher.isValidPublisherKey(em, entityKey))
            throw new KeyUnavailableException(new ErrorMessage("errors.keyunavailable.BadPartition", entityKey));

        }
       
      }
     
      // Parent key must be passed if this is a new entity
      if (!entityExists) {
        if (parentKey == null || parentKey.length() == 0)
          throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.ParentBusinessNotFound", parentKey));
      }

      // If parent key IS passed, whether new entity or not, it must be valid.  Additionally, the current publisher must be the owner of the parent.  Note that
      // if a parent ENTITY was passed in, then we don't need to check for any of this since this is part of a higher call.
      if (parentKey != null) {
        if (parent == null) {
          Object parentTemp = em.find(org.apache.juddi.model.BusinessEntity.class, parentKey);
          if (parentTemp == null)
            throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.ParentBusinessNotFound", parentKey));

          // Make sure publisher owns this parent entity.
          if (!publisher.isOwner((UddiEntity)parentTemp))
            throw new UserMismatchException(new ErrorMessage("errors.usermismatch.InvalidOwnerParent", parentKey));
        }
      }

      if (!entityExists) {
        // Check to make sure key isn't used by another entity.
View Full Code Here

Examples of org.apache.juddi.v3.error.UserMismatchException

        if (!parentKey.equalsIgnoreCase(bt.getBusinessService().getEntityKey()))
          throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.bindingtemplate.ParentMismatch", parentKey + ", " + bt.getBusinessService().getEntityKey()));
       
        // Make sure publisher owns this entity.
        if (!publisher.isOwner((UddiEntity)obj))
          throw new UserMismatchException(new ErrorMessage("errors.usermismatch.InvalidOwner", entityKey));

      }
      else {
        // Inside this block, we have a key proposed by the publisher on a new entity

        // Validate key and then check to see that the proposed key is valid for this publisher
        ValidateUDDIKey.validateUDDIv3Key(entityKey);
        if (!publisher.isValidPublisherKey(em, entityKey))
          throw new KeyUnavailableException(new ErrorMessage("errors.keyunavailable.BadPartition", entityKey));

      }
     
    }
   
    // Parent key must be passed if this is a new entity
    if (!entityExists) {
      if (parentKey == null || parentKey.length() == 0)
        throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.ParentServiceNotFound", parentKey));
    }

    // If parent key IS passed, whether new entity or not, it must be valid.  Additionally, the current publisher must be the owner of the parent.  Note that
    // if a parent ENTITY was passed in, then we don't need to check for any of this since this is part of a higher call.
    if (parentKey != null) {
      if (parent == null) {
        Object parentTemp = em.find(org.apache.juddi.model.BusinessService.class, parentKey);
        if (parentTemp == null)
          throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.ParentBusinessNotFound", parentKey));

        // Make sure publisher owns this parent entity.
        if (!publisher.isOwner((UddiEntity)parentTemp))
          throw new UserMismatchException(new ErrorMessage("errors.usermismatch.InvalidOwnerParent", parentKey));

      }
    }

    if (!entityExists) {
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.