Package net.sf.chellow.monad

Examples of net.sf.chellow.monad.InternalException


      properties.setProperty(name, value);
      StringWriter sw = new StringWriter();
      properties.store(sw, null);
      setState(sw.toString());
    } catch (IOException e) {
      throw new InternalException(e);
    }
  }
View Full Code Here


  public String getStateProperty(String name) throws HttpException {
    Properties properties = new Properties();
    try {
      properties.load(new StringReader(getState()));
    } catch (IOException e) {
      throw new InternalException(e);
    }
    return properties.getProperty(name);
  }
View Full Code Here

  public String getProperty(String name) throws HttpException {
    Properties properties = new Properties();
    try {
      properties.load(new StringReader(getProperties()));
    } catch (IOException e) {
      throw new InternalException(e);
    }
    return properties.getProperty(name);
  }
View Full Code Here

  @Override
  public URI getViewUri() throws HttpException {
    try {
      return new URI("/reports/115/output/?hhdc-contract-id=" + getId());
    } catch (URISyntaxException e) {
      throw new InternalException(e);
    }
  }
View Full Code Here

  }

  public EmailAddress(String label, String emailAddress)
      throws HttpException {
    if (emailAddress == null) {
      throw new InternalException(
          "Email address argument must not be null.");
    }
    super.setAddress(emailAddress);
    try {
      validate();
View Full Code Here

          .setEntity("dno", dno).setEntity("profileClass",
              profileClass).setBoolean("isSubstation",
              isSubstation).setBoolean("isImport", isImport)
          .setEntity("voltageLevel", voltageLevel).list();
    } catch (HibernateException e) {
      throw new InternalException(e);
    }
  }
View Full Code Here

          .createQuery(
              "from Llf llf where llf.dno = :dno and llf.profileClass = :profileClass order by llf.code.string")
          .setEntity("dno", dno).setEntity("profileClass",
              profileClass).list();
    } catch (HibernateException e) {
      throw new InternalException(e);
    }
  }
View Full Code Here

      BigDecimal net, BigDecimal vat, BigDecimal gross, BillType type,
      String breakdown) throws HttpException {
    setReference(reference);
    setAccount(account);
    if (issueDate == null) {
      throw new InternalException("The issue date may not be null.");
    }
    setIssueDate(issueDate);
    if (startDate.getDate().after(finishDate.getDate())) {
      throw new UserException("The bill start date " + startDate
          + " can't be after the finish date " + finishDate + ".");
    }
    setStartDate(startDate);
    setFinishDate(finishDate);
    if (kwh == null) {
      throw new InternalException("kwh can't be null.");
    }
    setKwh(kwh);
    setNet(net);
    setVat(vat);
    setGross(gross);
    if (type == null) {
      throw new InternalException("Type can't be null.");
    }
    setType(type);
    setBreakdown(breakdown);
  }
View Full Code Here

 
  public URI toUri() throws InternalException {
    try {
      return new URI(toString());
    } catch (URISyntaxException e) {
      throw new InternalException(e);
    }
  }
View Full Code Here

  }

  public void update(String name, Source source, GeneratorType generatorType,
      GspGroup gspGroup) throws HttpException {
    if (name == null) {
      throw new InternalException("The supply name " + "cannot be null.");
    }
    name = name.trim();
    if (name.length() == 0) {
      throw new UserException("The supply name can't be blank.");
    }
View Full Code Here

TOP

Related Classes of net.sf.chellow.monad.InternalException

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.