Package org.apache.juddi.error

Examples of org.apache.juddi.error.ValueNotAllowedException


      return;
   
    // If contacts do exist, at least one contact is required
    List<org.uddi.api_v3.Contact> contactList = contacts.getContact();
    if (contactList == null || contactList.size() == 0)
      throw new ValueNotAllowedException(new ErrorMessage("errors.contacts.NoInput"));
   
    for (org.uddi.api_v3.Contact contact : contactList) {
      validateContact(contact);
    }
   
View Full Code Here


  }

  public void validateContact(org.uddi.api_v3.Contact contact) throws DispositionReportFaultMessage {
    // A supplied contact can't be null
    if (contact == null)
      throw new ValueNotAllowedException(new ErrorMessage("errors.contact.NullInput"));
   
    // At least one personName is required
    List<org.uddi.api_v3.PersonName> pnameList = contact.getPersonName();
    if (pnameList == null || pnameList.size() == 0)
      throw new ValueNotAllowedException(new ErrorMessage("errors.contact.NoPersonName"));
   
    List<org.uddi.api_v3.Address> addressList = contact.getAddress();
    if (addressList != null) {
      for (org.uddi.api_v3.Address address : addressList) {
        if (address != null) {
          if (address.getAddressLine() == null || address.getAddressLine().size() == 0)
            throw new ValueNotAllowedException(new ErrorMessage("errors.contact.NoAddressLine"));
        }
      }
    }
  }
View Full Code Here

      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

   
    // If category bag does exist, it must have at least one element
    List<KeyedReference> elems = categories.getKeyedReference();
    List<KeyedReferenceGroup> groups = categories.getKeyedReferenceGroup();
    if (groups.size() == 0 && elems.size() == 0)
      throw new ValueNotAllowedException(new ErrorMessage("errors.categorybag.NoInput"));
   
    for (Object elem : elems) {
      if (elem instanceof org.uddi.api_v3.KeyedReference) {
        validateKeyedReference((KeyedReference) elem);
      }
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.getTModelKey() == null || krg.getTModelKey().length() == 0)
      throw new ValueNotAllowedException(new ErrorMessage("errors.keyedreference.NoTModelKey"));
  }
View Full Code Here

      throw new ValueNotAllowedException(new ErrorMessage("errors.keyedreference.NoTModelKey"));
  }
 
  public void validateKeyedReference(KeyedReference kr) throws DispositionReportFaultMessage {
    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"));
     
    // Per section 6.2.2.1 of the specification, no publishers (except the root) are allowed to use the node categorization tmodelKey
    if (Constants.NODE_CATEGORY_TMODEL.equalsIgnoreCase(kr.getTModelKey())) {
      if (!Constants.ROOT_PUBLISHER.equals(publisher.getAuthorizedName()))
        throw new ValueNotAllowedException(new ErrorMessage("errors.keyedreference.NodeCategoryTModel", Constants.NODE_CATEGORY_TMODEL));
    }
  }
View Full Code Here

      return;
   
    // If tmodelInstDetails does exist, it must have at least one element
    List<org.uddi.api_v3.TModelInstanceInfo> tmodelInstInfoList = tmodelInstDetails.getTModelInstanceInfo();
    if (tmodelInstInfoList == null || tmodelInstInfoList.size() == 0)
      throw new ValueNotAllowedException(new ErrorMessage("errors.tmodelinstdetails.NoInput"));
   
    for (org.uddi.api_v3.TModelInstanceInfo tmodelInstInfo : tmodelInstInfoList) {
      validateTModelInstanceInfo(tmodelInstInfo);
    }
  }
View Full Code Here

  }

  public void validateTModelInstanceInfo(org.uddi.api_v3.TModelInstanceInfo tmodelInstInfo) throws DispositionReportFaultMessage {
    // tModel Instance Info can't be null
    if (tmodelInstInfo == null)
      throw new ValueNotAllowedException(new ErrorMessage("errors.tmodelinstinfo.NullInput"));
   
    // TModel key is required
    if (tmodelInstInfo.getTModelKey() == null || tmodelInstInfo.getTModelKey().length() == 0)
      throw new ValueNotAllowedException(new ErrorMessage("errors.tmodelinstinfo.NoTModelKey"));
   
    validateInstanceDetails(tmodelInstInfo.getInstanceDetails());
   
  }
View Full Code Here

      return;
   
    // At least one OverviewDoc or instanceParms must be supplied
    List<OverviewDoc> elems = instDetails.getOverviewDoc();
    if (instDetails.getInstanceParms() == null && elems.size() == 0)
      throw new ValueNotAllowedException(new ErrorMessage("errors.instdetails.NoOverviewOrParms"));
   
  }
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.