Package org.apache.juddi.v3.error

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


      UddiEntityPublisher rootPublisher, String rootPartition, Configuration config)
  throws DispositionReportFaultMessage {

    // A supplied businessService can't be null
    if (bindingTemplate == null)
      throw new ValueNotAllowedException(new ErrorMessage("errors.bindingtemplate.NullInput"));
 
    // A service key doesn't have to be provided, but if it is, it should match the parent service's key
    String parentKey = bindingTemplate.getServiceKey();
    if (parentKey != null && parentKey.length()> 0) {
      if (!parentKey.equalsIgnoreCase(parent.getServiceKey()))
View Full Code Here


    validateUDDIv3Key(key.substring(0, key.lastIndexOf(KeyGenerator.PARTITION_SEPARATOR)));
  }
 
  public static void validateUDDIv3KeyGeneratorTModel(org.uddi.api_v3.TModel tModel) throws DispositionReportFaultMessage {
    if (tModel == null)
      throw new ValueNotAllowedException(new ErrorMessage("errors.tmodel.NullInput"));
   
    validateUDDIv3KeyGeneratorKey(tModel.getTModelKey());

    // A key generator key should have exactly one category and it's key value should be 'keyGenerator'
    org.uddi.api_v3.CategoryBag categories = tModel.getCategoryBag();
    if (categories != null) {
      List<org.uddi.api_v3.KeyedReference> elems = categories.getKeyedReference();
      if (elems != null && elems.size() == 1) {
        org.uddi.api_v3.KeyedReference elem = elems.get(0);
        if (elem != null) {
          if (elem != null && elem instanceof org.uddi.api_v3.KeyedReference) {
            String keyedValue = ((org.uddi.api_v3.KeyedReference)elem).getKeyValue();
            if (keyedValue != null) {
              if (keyedValue.equalsIgnoreCase(KeyGenerator.KEYGENERATOR_SUFFIX))
                return;
            }
          }
        }
      }
    }

    throw new ValueNotAllowedException(new ErrorMessage("errors.tmodel.keygenerator.BadCategory"));
  }
View Full Code Here

    // tmodelBag is optional
    if (tmodelBag == null)
      return;
   
    if (tmodelBag.getTModelKey() == null || tmodelBag.getTModelKey().size() == 0)
      throw new ValueNotAllowedException(new ErrorMessage("errors.tmodelbag.NoInput"));
   
    List<String> keyList = tmodelBag.getTModelKey();
    int i = 0;
    for (String key : keyList) {
      // Per section 4.4: keys must be case-folded
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> krgs = categories.getKeyedReferenceGroup();
    if ((elems == null || elems.size() == 0) && (krgs == null || krgs.size() == 0))
      throw new ValueNotAllowedException(new ErrorMessage("errors.categorybag.NoInput"));
   
    for (KeyedReference elem : elems) {
      validateKeyedReference(elem);
    }
    for (KeyedReferenceGroup elem : krgs) {
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"));
   
    // Per section 4.4: keys must be case-folded
    krg.setTModelKey(krg.getTModelKey().toLowerCase());
   
    List<KeyedReference> keyedRefs = krg.getKeyedReference();
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"));
     
      // Per section 4.4: keys must be case-folded
      kr.setTModelKey(kr.getTModelKey().toLowerCase());
     
      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.uddi.api_v3.BusinessEntity> entityList = body.getBusinessEntity();
    if (entityList == null || entityList.size() == 0)
      throw new ValueNotAllowedException(new ErrorMessage("errors.savebusiness.NoInput"));
   
    for (org.uddi.api_v3.BusinessEntity entity : entityList) {
      validateBusinessEntity(em, entity, config);
    }
  }
View Full Code Here

TOP

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