Examples of UserMismatchException


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
       
        // First test to see if this is a Key Generator tModel. The keyGenerator suffix appearing in the key is the indicator, since this is not
View Full Code Here

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

    Object toObj = em.find(org.apache.juddi.model.BusinessEntity.class, pubAssertion.getToKey());
    if (toObj == null)
      throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.BusinessNotFound", toKey));
   
    if (!publisher.isOwner((UddiEntity)fromObj) && !publisher.isOwner((UddiEntity)toObj))
      throw new UserMismatchException(new ErrorMessage("errors.pubassertion.UserMismatch", fromKey + " & " + toKey));
     
  }
View Full Code Here

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

    List<String> entityKeyList = body.getPublisherId();
    if (entityKeyList == null || entityKeyList.size() == 0)
      throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NoKeys"));
   
    if (!((Publisher)publisher).isAdmin())
      throw new UserMismatchException(new ErrorMessage("errors.deletepublisher.AdminReqd"));

    HashSet<String> dupCheck = new HashSet<String>();
    for (String entityKey : entityKeyList) {
      boolean inserted = dupCheck.add(entityKey);
      if (!inserted)
View Full Code Here

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

    List<org.apache.juddi.api_v3.Publisher> entityList = body.getPublisher();
    if (entityList == null || entityList.size() == 0)
      throw new ValueNotAllowedException(new ErrorMessage("errors.savepublisher.NoInput"));
   
    if (!((Publisher)publisher).isAdmin())
      throw new UserMismatchException(new ErrorMessage("errors.savepublisher.AdminReqd"));
   
    for (org.apache.juddi.api_v3.Publisher entity : entityList) {
      validatePublisher(em, entity);
    }
  }
View Full Code Here

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

    List<String> entityKeyList = body.getTModelKey();
    if (entityKeyList == null || entityKeyList.size() == 0)
      throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NoKeys"));
   
    if (!((Publisher)publisher).isAdmin())
      throw new UserMismatchException(new ErrorMessage("errors.AdminReqd"));

    HashSet<String> dupCheck = new HashSet<String>();
    for (String entityKey : entityKeyList) {
      boolean inserted = dupCheck.add(entityKey);
      if (!inserted)
        throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.DuplicateKey", entityKey));
     
      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.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

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

      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

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

       
        // 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

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

      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

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));
     
      i++;
    }
  }
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.