Package org.hdiv.exception

Examples of org.hdiv.exception.HDIVException


      this.cipher.init(Cipher.DECRYPT_MODE, key.getKey(), this.ivSpec);
      this.encryptMode = false;

    } catch (InvalidKeyException e) {
      String errorMessage = HDIVUtil.getMessage("cipher.init.decrypt", e.getMessage());
      throw new HDIVException(errorMessage, e);
    } catch (InvalidAlgorithmParameterException e) {
      String errorMessage = HDIVUtil.getMessage("cipher.init.decrypt", e.getMessage());
      throw new HDIVException(errorMessage, e);
    }
  }
View Full Code Here


    try {
      return cipher.doFinal(data);

    } catch (IllegalBlockSizeException e) {
      String errorMessage = HDIVUtil.getMessage("cipher.encrypt", e.getMessage());
      throw new HDIVException(errorMessage, e);
    } catch (BadPaddingException e) {
      String errorMessage = HDIVUtil.getMessage("cipher.encrypt", e.getMessage());
      throw new HDIVException(errorMessage, e);
    }

  }
View Full Code Here

    try {
      return cipher.doFinal(data);

    } catch (IllegalBlockSizeException e) {
      String errorMessage = HDIVUtil.getMessage("cipher.decrypt", e.getMessage());
      throw new HDIVException(errorMessage, e);
    } catch (BadPaddingException e) {
      String errorMessage = HDIVUtil.getMessage("cipher.decrypt", e.getMessage());
      throw new HDIVException(errorMessage, e);
    }
  }
View Full Code Here

   */
  public static String getRequestURI(HttpServletRequest request) {

    String requestURI = (String) request.getAttribute(REQUESTURI_REQUEST_KEY);
    if (requestURI == null) {
      throw new HDIVException("RequestURI has not been initialized in request.");
    }
    return requestURI;
  }
View Full Code Here

   * @return IApplication object
   */
  public static IApplication getApplication(ServletContext servletContext) {
    IApplication app = (IApplication) servletContext.getAttribute(APPLICATION_SERVLETCONTEXT_KEY);
    if (app == null) {
      throw new HDIVException("IApplication has not been initialized in servlet context");
    }
    return app;
  }
View Full Code Here

   */
  public static HDIVConfig getHDIVConfig(ServletContext servletContext) {

    HDIVConfig hdivConfig = (HDIVConfig) servletContext.getAttribute(HDIVCONFIG_SERVLETCONTEXT_KEY);
    if (hdivConfig == null) {
      throw new HDIVException("HDIVConfig has not been initialized in servlet context");
    }

    return hdivConfig;
  }
View Full Code Here

   */
  public static LinkUrlProcessor getLinkUrlProcessor(ServletContext servletContext) {
    LinkUrlProcessor urlProcessor = (LinkUrlProcessor) servletContext
        .getAttribute(LINKURLPROCESSOR_SERVLETCONTEXT_KEY);
    if (urlProcessor == null) {
      throw new HDIVException("LinkUrlProcessor has not been initialized in servlet context");
    }
    return urlProcessor;
  }
View Full Code Here

   */
  public static FormUrlProcessor getFormUrlProcessor(ServletContext servletContext) {
    FormUrlProcessor urlProcessor = (FormUrlProcessor) servletContext
        .getAttribute(FORMURLPROCESSOR_SERVLETCONTEXT_KEY);
    if (urlProcessor == null) {
      throw new HDIVException("FormUrlProcessor has not been initialized in servlet context");
    }
    return urlProcessor;
  }
View Full Code Here

   * @return {@link HttpServletRequest} instance
   */
  public static HttpServletRequest getHttpServletRequest() {
    HttpServletRequest request = (HttpServletRequest) httpRequest.get();
    if (request == null) {
      throw new HDIVException("Request has not been initialized in threadlocal");
    }
    return request;
  }
View Full Code Here

   * @return {@link MessageSource} instance
   */
  public static MessageSource getMessageSource(ServletContext servletContext) {
    MessageSource msgSource = (MessageSource) servletContext.getAttribute(MESSAGESOURCE_SERVLETCONTEXT_KEY);
    if (msgSource == null) {
      throw new HDIVException("MessageSource has not been initialized in servlet context");
    }
    return msgSource;
  }
View Full Code Here

TOP

Related Classes of org.hdiv.exception.HDIVException

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.