Package org.apache.juddi.error

Examples of org.apache.juddi.error.FatalErrorException


  public void validateSavePublisher(EntityManager em, SavePublisher body) throws DispositionReportFaultMessage {

    // No null input
    if (body == null)
      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"));
View Full Code Here


 
  public void validateAdminDeleteTModel(EntityManager em, DeleteTModel 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

        transferExpirationDays = AppConfig.getConfiguration().getInt(Property.JUDDI_TRANSFER_EXPIRATION_DAYS);
        // For output
        nodeID.value = AppConfig.getConfiguration().getString(Property.JUDDI_NODE_ID);
      }
      catch(ConfigurationException ce)
      { throw new FatalErrorException(new ErrorMessage("errors.configuration.Retrieval"));}
 
      String transferKey = TRANSFER_TOKEN_PREFIX + UUID.randomUUID();
      org.apache.juddi.model.TransferToken transferToken = new org.apache.juddi.model.TransferToken();
      transferToken.setTransferToken(transferKey);
      // For output
      opaqueToken.value = transferKey.getBytes();
     
      GregorianCalendar gc = new GregorianCalendar();
      gc.add(GregorianCalendar.DAY_OF_MONTH, transferExpirationDays);
     
      transferToken.setExpirationDate(gc.getTime());
 
      try {
        DatatypeFactory df = DatatypeFactory.newInstance();
        // For output
        expirationTime.value = df.newXMLGregorianCalendar(gc);
      }
      catch(DatatypeConfigurationException ce)
      { throw new FatalErrorException(new ErrorMessage("errors.Unspecified"));}
 
      List<String> keyList = keyBag.getKey();
      for (String key : keyList) {
        TransferTokenKey tokenKey = new TransferTokenKey(transferToken, key);
        transferToken.getTransferKeys().add(tokenKey);
View Full Code Here

  public String generate() throws DispositionReportFaultMessage {
    String rootPartition = "";
    try
    { rootPartition = AppConfig.getConfiguration().getString(Property.JUDDI_ROOT_PARTITION); }
    catch(ConfigurationException ce)
    { throw new FatalErrorException(new ErrorMessage("errors.configuration.Retrieval", Property.JUDDI_ROOT_PARTITION));}
   
    return rootPartition + PARTITION_SEPARATOR + UUID.randomUUID();
  }
View Full Code Here

    try {
      Cryptor cryptor = (Cryptor) CryptorFactory.getCryptor();
      return cryptor.encrypt(str);
    } catch (InvalidKeyException e) {
      logger.error("Invalid Key Exception in crypting the password", e);
      throw new FatalErrorException(new ErrorMessage(
          "errors.auth.cryptor.InvalidKey", e.getMessage()));
    } catch (NoSuchPaddingException e) {
      logger.error("Padding Exception in crypting the password", e);
      throw new FatalErrorException(new ErrorMessage(
          "errors.auth.cryptor.Padding", e.getMessage()));
    } catch (NoSuchAlgorithmException e) {
      logger.error("Algorithm Exception in crypting the password", e);
      throw new FatalErrorException(new ErrorMessage(
          "errors.auth.cryptor.Algorithm", e.getMessage()));
    } catch (InvalidAlgorithmParameterException e) {
      logger.error("Algorithm parameter Exception in crypting the password",
          e);
      throw new FatalErrorException(new ErrorMessage(
          "errors.auth.cryptor.AlgorithmParam", e.getMessage()));
    } catch (IllegalBlockSizeException e) {
      logger.error("Block size Exception in crypting the password", e);
      throw new FatalErrorException(new ErrorMessage(
          "errors.auth.cryptor.BlockSize", e.getMessage()));
    } catch (BadPaddingException e) {
      logger.error("Bad Padding Exception in crypting the password", e);
      throw new FatalErrorException(new ErrorMessage(
          "errors.auth.cryptor.BadPadding", e.getMessage()));
    }
  }
View Full Code Here

     
      DatatypeFactory df = DatatypeFactory.newInstance();
      result = df.newXMLGregorianCalendar(gc);
    }
    catch(DatatypeConfigurationException ce) {
      throw new FatalErrorException(new ErrorMessage("errors.Unspecified"));
    }
   
    return result;
  }
View Full Code Here

     
      DatatypeFactory df = DatatypeFactory.newInstance();
      result = df.newDuration(duration);
    }
    catch(DatatypeConfigurationException ce) {
      throw new FatalErrorException(new ErrorMessage("errors.Unspecified"));
    }

    return result;
  }
View Full Code Here

    UddiEntityPublisher uddiPublisher = null;
    try {
      tx.begin();
 
      if (alreadyInstalled(em))
        new FatalErrorException(new ErrorMessage("errors.install.AlreadyInstalled"));
     
      TModel rootTModelKeyGen = (TModel)buildInstallEntity(FILE_ROOT_TMODELKEYGEN, "org.uddi.api_v3", config);
      org.uddi.api_v3.BusinessEntity rootBusinessEntity = (org.uddi.api_v3.BusinessEntity)buildInstallEntity(FILE_ROOT_BUSINESSENTITY, "org.uddi.api_v3",config);
     
      String rootPartition = getRootPartition(rootTModelKeyGen);
View Full Code Here

  public void validateGetBusinessDetail(GetBusinessDetail 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 validateGetServiceDetail(GetServiceDetail 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

TOP

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