Package org.apache.juddi.error

Examples of org.apache.juddi.error.ValueNotAllowedException


      return;

    // If discUrls does exist, it must have at least one element
    List<org.uddi.api_v3.DiscoveryURL> discUrlList = discUrls.getDiscoveryURL();
    if (discUrlList == null || discUrlList.size() == 0)
      throw new ValueNotAllowedException(new ErrorMessage("errors.discurls.NoInput"));
 
View Full Code Here


      return;
   
    // If category bag does exist, it must have at least one element
    List<KeyedReference> elems = categories.getKeyedReference();
    if (elems == null || elems.size() == 0)
      throw new ValueNotAllowedException(new ErrorMessage("errors.categorybag.NoInput"));
   
    for (KeyedReference elem : elems) {
      validateKeyedReference(elem);
    }
    List<KeyedReferenceGroup> krgs = categories.getKeyedReferenceGroup();
View Full Code Here

      return;
   
    // If category bag does exist, it must have at least one element
    List<org.uddi.api_v3.KeyedReference> keyedRefList = identifiers.getKeyedReference();
    if (keyedRefList == null || keyedRefList.size() == 0)
      throw new ValueNotAllowedException(new ErrorMessage("errors.identifierbag.NoInput"));
   
    for (org.uddi.api_v3.KeyedReference keyedRef : keyedRefList) {
      validateKeyedReference(keyedRef);
    }
  }
View Full Code Here

 
  public void validateKeyedReferenceGroup (KeyedReferenceGroup krg) throws DispositionReportFaultMessage {
    // Keyed reference groups must contain a tModelKey
    if (krg instanceof org.uddi.api_v3.KeyedReferenceGroup) {
      if (krg.getTModelKey() == null || krg.getTModelKey().length() == 0)
        throw new ValueNotAllowedException(new ErrorMessage("errors.keyedreference.NoTModelKey"));
    }
  }
View Full Code Here

    }
  }
 
  public void validateKeyedReference(KeyedReference kr) throws DispositionReportFaultMessage {
    if (kr == null)
      throw new ValueNotAllowedException(new ErrorMessage("errors.keyedreference.NullInput"));
   
    // Keyed references must contain a tModelKey and keyValue
    if (kr instanceof org.uddi.api_v3.KeyedReference) {
      if (kr.getTModelKey() == null || kr.getTModelKey().length() == 0)
        throw new ValueNotAllowedException(new ErrorMessage("errors.keyedreference.NoTModelKey"));
     
      if (kr.getKeyValue() == null || kr.getKeyValue().length() == 0)
        throw new ValueNotAllowedException(new ErrorMessage("errors.keyedreference.NoKeyValue"));     
    }
  }
View Full Code Here

    if (findQualifiers == null)
      return;
   
    List<String> fqList = findQualifiers.getFindQualifier();
    if (fqList == null || fqList.size() == 0)
      throw new ValueNotAllowedException(new ErrorMessage("errors.findqualifiers.NoInput"));
   
   
    Hashtable<String, String> fqTable = new Hashtable<String, String>();
    for (String fq : fqList) {
      String result = fqTable.put(fq.toUpperCase(), fq.toUpperCase());
      if (result != null)
        throw new ValueNotAllowedException(new ErrorMessage("errors.findqualifiers.DuplicateValue", result));
     
      // Invalid combo: andAllKeys, orAllKeys, and orLikeKeys
      if (fq.equalsIgnoreCase(FindQualifiers.AND_ALL_KEYS) || fq.equalsIgnoreCase(FindQualifiers.AND_ALL_KEYS_TMODEL)) {
        if (fqTable.get(FindQualifiers.OR_ALL_KEYS.toUpperCase()) != null || fqTable.get(FindQualifiers.OR_ALL_KEYS_TMODEL.toUpperCase()) != null)
          throw new InvalidCombinationException(new ErrorMessage("errors.findqualifiers.InvalidCombo", fq + " & " + FindQualifiers.OR_ALL_KEYS));
View Full Code Here

      throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
   
    // No null or empty list
    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) {
View Full Code Here

  public void validatePublisher(EntityManager em, org.apache.juddi.api_v3.Publisher publisher) throws DispositionReportFaultMessage {

    // No null input
    if (publisher == null)
      throw new ValueNotAllowedException(new ErrorMessage("errors.publisher.NullInput"));
   
    String authorizedName = publisher.getAuthorizedName();
    if (authorizedName == null || authorizedName.length() == 0)
      throw new ValueNotAllowedException(new ErrorMessage("errors.publisher.NoAuthorizedName"));
 
    String publisherName = publisher.getPublisherName();
    if (publisherName == null || publisherName.length() == 0)
      throw new ValueNotAllowedException(new ErrorMessage("errors.publisher.NoPublisherName"));

  }
View Full Code Here

TOP

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

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.