Package org.apache.juddi.v3.error

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


    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

                        if (obj == null) {
                                throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.BusinessNotFound", entityKey));
                        }

                        if (!publisher.isOwner((UddiEntity) obj)&& !((Publisher) publisher).isAdmin() ) {
                                throw new UserMismatchException(new ErrorMessage("errors.usermismatch.InvalidOwner", entityKey));
                        }

                        i++;
                }
        }
View Full Code Here

                                nodeID.equals(((UddiEntity) obj).getNodeId())){
                           accessCheck=true;
                        }
               
                        if (!accessCheck ) {
                                throw new UserMismatchException(new ErrorMessage("errors.usermismatch.InvalidOwner", entityKey));
                        }

        }
View Full Code Here

                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));
                }

                try {
                        validateKeyedReference(pubAssertion.getKeyedReference(), AppConfig.getConfiguration(), false);
                } catch (ConfigurationException ce) {
View Full Code Here

                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) {
                        validateKeyLength(entityKey);
View Full Code Here

                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", publisher.getAuthorizedName()));
                }

                for (org.apache.juddi.api_v3.Publisher entity : entityList) {
                        validatePublisher(em, entity);
                }
View Full Code Here

                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) {
                        validateKeyLength(entityKey);
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));
     
      i++;
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.juddi.v3.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.