Package org.hdiv.exception

Examples of org.hdiv.exception.HDIVException


  @PostConstruct
  public void performVersionChecks() {
    if (SpringVersion.getVersion().compareTo(MIN_SPRING_VERSION) < 0) {
      // Spring version is lower than '4.0.0.RELEASE'
      throw new HDIVException("HDIV JavaConfig feature require Spring version equal or greater than "
          + MIN_SPRING_VERSION + ". Use XML configuration instead of JavaConfig or update Spring version.");
    }
  }
View Full Code Here


      InputStream is = classLoader.getResourceAsStream(filePath);
      SAXParserFactory spf = SAXParserFactory.newInstance();
      SAXParser sp = spf.newSAXParser();
      sp.parse(is, this);
    } catch (ParserConfigurationException e) {
      throw new HDIVException(e.getMessage(), e);
    } catch (SAXException e) {
      throw new HDIVException(e.getMessage(), e);
    } catch (IOException e) {
      throw new HDIVException(e.getMessage(), e);
    }
  }
View Full Code Here

      composer.init();
      dataComposer = composer;

    } else {
      String errorMessage = HDIVUtil.getMessage("strategy.error", this.config.getStrategy().toString());
      throw new HDIVException(errorMessage);
    }

    this.initDataComposer(dataComposer, request);

    return dataComposer;
View Full Code Here

  public String beginRequest(String method, String action) {

    try {
      action = URLDecoder.decode(action, Constants.ENCODING_UTF_8);
    } catch (UnsupportedEncodingException e) {
      throw new HDIVException(Constants.ENCODING_UTF_8 + " enconding not supported.", e);
    } catch (IllegalArgumentException e) {
    }

    // Create new IState
    IState state = new State(this.requestCounter);
View Full Code Here

    HttpSession session = this.getHttpSession();

    PageIdGenerator pageIdGenerator = (PageIdGenerator) session.getAttribute(this.pageIdGeneratorName);
    if (pageIdGenerator == null) {
      throw new HDIVException("session.nopageidgenerator");
    }

    int id = pageIdGenerator.getNextPageId();
   
    // PageId must be greater than 0
    if(id <= 0){
      throw new HDIVException("Incorrect PageId generated [" + id + "]. PageId must be greater than 0.");
    }
   
    session.setAttribute(this.pageIdGeneratorName, pageIdGenerator);

    return id;
View Full Code Here

      HttpSession session = getHttpSession();
      return this.getPageFromSession(session, pageId);

    } catch (IllegalStateException e) {
      throw new HDIVException(HDIVErrorCodes.PAGE_ID_INCORRECT, e);
    }
  }
View Full Code Here

    try {
      IPage currentPage = this.getPage(pageId);
      return currentPage.getState(stateId);

    } catch (Exception e) {
      throw new HDIVException(HDIVErrorCodes.PAGE_ID_INCORRECT, e);
    }
  }
View Full Code Here

    try {
      IPage currentPage = this.getPage(pageId);
      return currentPage.getStateHash(stateId);

    } catch (Exception e) {
      throw new HDIVException(HDIVErrorCodes.PAGE_ID_INCORRECT, e);
    }
  }
View Full Code Here

   */
  public ICipherHTTP getEncryptCipher() {
    ICipherHTTP cipher = this.beanFactory.getBean(ICipherHTTP.class);
    if (cipher == null) {
      String errorMessage = HDIVUtil.getMessage("encrypt.message");
      throw new HDIVException(errorMessage);
    }
    return cipher;

  }
View Full Code Here

   */
  public ICipherHTTP getDecryptCipher() {
    ICipherHTTP cipher = this.beanFactory.getBean(ICipherHTTP.class);
    if (cipher == null) {
      String errorMessage = HDIVUtil.getMessage("decrypt.message");
      throw new HDIVException(errorMessage);
    }
    return cipher;

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