Package org.apache.juddi.error

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


        // check to make sure that 'authorizedName' controls the
        // business entity that this binding belongs to. If not
        // then throw a UserMismatchException.
        if (!dataStore.isBindingPublisher(bindingKey,publisherID))
          throw new UserMismatchException(bindingKey);
      }

      // delete the BindingTemplates
      for (int i=0; i<bindingKeyVector.size(); i++)
      {
View Full Code Here

          throw new InvalidKeyPassedException(businessKey);

        // check to make sure that 'authorizedName' controls this
        // business entity. If not then throw a UserMismatchException.
        if (!dataStore.isBusinessPublisher(businessKey,publisherID))
          throw new UserMismatchException(businessKey);
      }

      // delete the BusinessEntities
      for (int i=0; i<businessKeyVector.size(); i++)
      {
View Full Code Here

          throw new InvalidKeyPassedException(tModelKey);

        // check to make sure that 'authorizedName' controls this
        // TModel. If not then throw a UserMismatchException.
        if (!dataStore.isTModelPublisher(tModelKey,publisherID))
          throw new UserMismatchException("publisher="+publisherID+" tModelKey="+tModelKey);

        // TModel exists and we control it so let's delete it.
        dataStore.deleteTModel(tModelKey);
      }
View Full Code Here

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

        // Make sure publisher owns this entity.
        if (!publisher.getAuthorizedName().equals(((org.apache.juddi.model.Subscription)obj).getAuthorizedName()))
          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

      if (obj == null)
        throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.SubscriptionNotFound", entityKey));
     
      // Make sure publisher owns this entity.
      if (!publisher.getAuthorizedName().equals(((org.apache.juddi.model.Subscription)obj).getAuthorizedName()))
        throw new UserMismatchException(new ErrorMessage("errors.usermismatch.InvalidOwner", entityKey));
     
    }
  }
View Full Code Here

       
        // According to spec, it's ok if a key doesn't match any known entities, it will just be ignored.  However, the publisher must own
        // the entity in order to discard the associated token.
        if (uddiEntity != null) {
          if (!publisher.isOwner(uddiEntity))
            throw new UserMismatchException(new ErrorMessage("errors.usermismatch.InvalidOwner", key));
         
        }
      }
   
    }
View Full Code Here

      if (!(uddiEntity instanceof org.apache.juddi.model.BusinessEntity) &&
        !(uddiEntity instanceof org.apache.juddi.model.Tmodel))
        throw new InvalidKeyPassedException(new ErrorMessage("errors.gettransfertoken.InvalidEntity", key));
     
      if (!publisher.isOwner(uddiEntity))
        throw new UserMismatchException(new ErrorMessage("errors.usermismatch.InvalidOwner", key));
     
      // Creating parameters for key-checking query
      DynamicQuery.Parameter param = new DynamicQuery.Parameter("UPPER(ttk.entityKey)",
                                    key.toUpperCase(),
                                    DynamicQuery.PREDICATE_EQUALS);
View Full Code Here

      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

      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

TOP

Related Classes of org.apache.juddi.error.UserMismatchException

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.