Package org.apache.juddi.v3.error

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


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

    }
    if (body.getFromKey() != null && body.getFromKey().length() > 0) {
      fromKeyExists = true;
      if (businessKeyExists)
        throw new FatalErrorException(new ErrorMessage("errors.findrelatedbusiness.MultipleInput"));
     
    }
    if (body.getToKey() != null && body.getToKey().length() > 0) {
      if (businessKeyExists || fromKeyExists)
        throw new FatalErrorException(new ErrorMessage("errors.findrelatedbusiness.MultipleInput"));
    }
   
    KeyedReference keyedRef = body.getKeyedReference();
    if (keyedRef != null) {
      if (keyedRef.getTModelKey() == null || keyedRef.getTModelKey().length() == 0 ||
View Full Code Here

   
    try {
      tx.begin();
      boolean seedAlways = config.getBoolean("juddi.seed.always", false);
      if (!seedAlways && alreadyInstalled(config))
        new FatalErrorException(new ErrorMessage("errors.install.AlreadyInstalled"));
     
      String rootPublisherStr = config.getString(Property.JUDDI_ROOT_PUBLISHER);
      String fileRootTModelKeygen = rootPublisherStr + FILE_TMODELKEYGEN;
      TModel rootTModelKeyGen = (TModel)buildInstallEntity(fileRootTModelKeygen, "org.uddi.api_v3", config);
      String fileRootBusinessEntity = rootPublisherStr + FILE_BUSINESSENTITY;
View Full Code Here

      keysOwned.setFromKey(modelPublisherAssertion.getBusinessEntityByFromKey().getEntityKey());
   
    if (Collections.binarySearch((List<String>)businessKeys, modelPublisherAssertion.getBusinessEntityByToKey().getEntityKey()) >= 0)
      keysOwned.setToKey(modelPublisherAssertion.getBusinessEntityByToKey().getEntityKey());
    if (keysOwned.getFromKey() == null && keysOwned.getToKey() == null) {
      throw new FatalErrorException(new ErrorMessage("errors.invalidKey.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

  public void validateDeleteBusiness(EntityManager em, DeleteBusiness 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.getBusinessKey();
    if (entityKeyList == null || entityKeyList.size() == 0)
      throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NoKeys"));
View Full Code Here

  public void validateDeleteService(EntityManager em, DeleteService 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.getServiceKey();
    if (entityKeyList == null || entityKeyList.size() == 0)
      throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NoKeys"));
View Full Code Here

  public void validateDeleteBinding(EntityManager em, DeleteBinding 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.getBindingKey();
    if (entityKeyList == null || entityKeyList.size() == 0)
      throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NoKeys"));
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.