Package org.apache.juddi.v3.error

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


 
  public void validateGetTModelDetail(GetTModelDetail body) throws DispositionReportFaultMessage {

    // No null input
    if (body == null)
      throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
   
    // No null or empty list
    List<String> entityKeyList = body.getTModelKey();
    if (entityKeyList == null || entityKeyList.size() == 0)
      throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NoKeys"));
View Full Code Here


  public void validateGetOperationalInfo(GetOperationalInfo body) throws DispositionReportFaultMessage {

    // No null input
    if (body == null)
      throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
   
    // No null or empty list
    List<String> entityKeyList = body.getEntityKey();
    if (entityKeyList == null || entityKeyList.size() == 0)
      throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NoKeys"));
View Full Code Here

 
 
  public void validateFindBusiness(FindBusiness body) throws DispositionReportFaultMessage  {
    // No null input
    if (body == null)
      throw new FatalErrorException(new ErrorMessage("errors.NullInput"));

    if (body.getCategoryBag() == null && body.getFindTModel() == null && body.getTModelBag() == null && body.getName().size() == 0 &&
      body.getIdentifierBag() == null && body.getDiscoveryURLs() == null && body.getFindRelatedBusinesses() == null)
      throw new FatalErrorException(new ErrorMessage("errors.findbusiness.NoInput"));

    validateNames(body.getName());
    validateFindQualifiers(body.getFindQualifiers());
    validateTModelBag(body.getTModelBag());
    validateFindTModel(body.getFindTModel(), true);
View Full Code Here

  }
 
  public void validateFindService(FindService body) throws DispositionReportFaultMessage  {
    // No null input
    if (body == null)
      throw new FatalErrorException(new ErrorMessage("errors.NullInput"));

    if (body.getCategoryBag() == null && body.getFindTModel() == null && body.getTModelBag() == null && body.getName().size() == 0)
      throw new FatalErrorException(new ErrorMessage("errors.findservice.NoInput"));

    validateNames(body.getName());
    validateFindQualifiers(body.getFindQualifiers());
    validateTModelBag(body.getTModelBag());
    validateFindTModel(body.getFindTModel(), true);
View Full Code Here

  }
 
  public void validateFindBinding(FindBinding body) throws DispositionReportFaultMessage  {
    // No null input
    if (body == null)
      throw new FatalErrorException(new ErrorMessage("errors.NullInput"));

    if (body.getCategoryBag() == null && body.getFindTModel() == null && body.getTModelBag() == null)
      throw new FatalErrorException(new ErrorMessage("errors.findbinding.NoInput"));
   
    validateFindQualifiers(body.getFindQualifiers());
    validateTModelBag(body.getTModelBag());
    validateFindTModel(body.getFindTModel(), true);
    validateCategoryBag(body.getCategoryBag());
View Full Code Here

    if (body == null) {
      // When FindTModel objects are embedded in other find calls, null is allowed.
      if (nullAllowed)
        return;
      else
        throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
    }

    if (body.getCategoryBag() == null && body.getIdentifierBag() == null && body.getName() == null)
      throw new FatalErrorException(new ErrorMessage("errors.findtmodel.NoInput"));

    validateFindQualifiers(body.getFindQualifiers());
    validateIdentifierBag(body.getIdentifierBag());
    validateCategoryBag(body.getCategoryBag());
  }
View Full Code Here

    if (body == null) {
      // When FindRelatedBusinesses objects are embedded in other find calls, null is allowed.
      if (nullAllowed)
        return;
      else
        throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
    }

    if ((body.getBusinessKey() == null  || body.getBusinessKey().length() == 0 ) &&
      (body.getFromKey() == null || body.getFromKey().length() == 0) &&
      (body.getToKey() == null || body.getToKey().length() == 0))
      throw new FatalErrorException(new ErrorMessage("errors.findrelatedbusiness.NoInput"));
   
    boolean businessKeyExists = false;
    boolean fromKeyExists = false;
    if (body.getBusinessKey() != null && body.getBusinessKey().length() > 0) {
      businessKeyExists = true;
     
      // Per section 4.4: keys must be case-folded
      body.setBusinessKey(body.getBusinessKey().toLowerCase());
    }
    if (body.getFromKey() != null && body.getFromKey().length() > 0) {
      fromKeyExists = true;
      if (businessKeyExists)
        throw new FatalErrorException(new ErrorMessage("errors.findrelatedbusiness.MultipleInput"));

      // Per section 4.4: keys must be case-folded
      body.setFromKey(body.getFromKey().toLowerCase());
    }
    if (body.getToKey() != null && body.getToKey().length() > 0) {
      if (businessKeyExists || fromKeyExists)
        throw new FatalErrorException(new ErrorMessage("errors.findrelatedbusiness.MultipleInput"));

      // Per section 4.4: keys must be case-folded
      body.setToKey(body.getToKey().toLowerCase());
    }
   
View Full Code Here

      keysOwned.setFromKey(modelPublisherAssertion.getBusinessEntityByFromKey().getEntityKey());
   
    if (Collections.binarySearch(businessKeyList, modelPublisherAssertion.getBusinessEntityByToKey().getEntityKey()) >= 0)
      keysOwned.setToKey(modelPublisherAssertion.getBusinessEntityByToKey().getEntityKey());
    if (keysOwned.getFromKey() == null && keysOwned.getToKey() == null) {
      throw new FatalErrorException(new ErrorMessage("errors.invalidKey.KeysOwned"));
    }
    apiAssertionStatusItem.setKeysOwned(keysOwned);
  }
View Full Code Here

      SubscriptionFilter existingFilter = (SubscriptionFilter)JAXBMarshaller.unmarshallFromString(modelSubscription.getSubscriptionFilter(), JAXBMarshaller.PACKAGE_SUBSCRIPTION);
      apiSubscription.setSubscriptionFilter(existingFilter);
    }
    catch (JAXBException e) {
      logger.error("JAXB Exception while marshalling subscription filter", e);
      throw new FatalErrorException(new ErrorMessage("errors.Unspecified"));
    }
  }
View Full Code Here

      logger.debug("marshalled subscription filter:  " + rawFilter);
      modelSubscription.setSubscriptionFilter(rawFilter);

    } catch (JAXBException e) {
      logger.error("JAXBException while marshalling subscription filter", e);
      throw new FatalErrorException(new ErrorMessage("errors.Unspecified"));
    }
   
  }
View Full Code Here

TOP

Related Classes of org.apache.juddi.v3.error.FatalErrorException

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.