Examples of GroovyExecutor


Examples of org.projectforge.scripting.GroovyExecutor

      return;
    }
    amount = BigDecimal.ZERO;
    final Map<String, Object> vars = new HashMap<String, Object>();
    BusinessAssessment.putBusinessAssessmentRows(vars, businessAssessment);
    final GroovyResult result = new GroovyExecutor().execute(groovyScript, vars);
    final Object rval = result.getResult();
    if (rval instanceof BigDecimal) {
      amount = (BigDecimal)rval;
    } else if (rval instanceof Number) {
      amount = new BigDecimal(String.valueOf(rval)).setScale(getScale(), RoundingMode.HALF_UP);
View Full Code Here

Examples of org.projectforge.scripting.GroovyExecutor

    if (valueScript == null && StringUtils.isBlank(this.valueConfig) == false) {
      String scr = this.valueConfig.trim();
      if (scr.startsWith("=") == true) {
        scr = "return " + scr.substring(1);
      }
      this.valueScript = new GroovyExecutor().compileGroovy(scr, false);
    }
    return valueScript;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.