public class JavaScriptCompiledEvaluator extends JREvaluator implements JasperReportsContextAware
JavaScriptClassCompiler
.Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
EXPRESSION_ID_VAR |
EXCEPTION_MESSAGE_KEY_RESOURCE_NOT_FOUND, PROPERTY_IGNORE_NPE
Constructor and Description |
---|
JavaScriptCompiledEvaluator(JasperReportsContext jasperReportsContext,
java.lang.String unitName,
JavaScriptCompiledData compiledData)
Create a JavaScript expression evaluator.
|
Modifier and Type | Method and Description |
---|---|
protected void |
customizedInit(java.util.Map<java.lang.String,JRFillParameter> parametersMap,
java.util.Map<java.lang.String,JRFillField> fieldsMap,
java.util.Map<java.lang.String,JRFillVariable> variablesMap)
Initializes the parameters, fields and variables of the evaluator.
|
protected java.lang.Object |
evaluate(int id)
Evaluates an expression using current fields and variables values.
|
protected java.lang.Object |
evaluateEstimated(int id)
Evaluates an expression using estimated variables values.
|
protected java.lang.Object |
evaluateExpression(int expressionIndex) |
protected java.lang.Object |
evaluateOld(int id)
Evaluates an expression using old fields and variables values.
|
protected JavaScriptCompiledData.ExpressionIndexes |
getExpression(int id) |
protected static JavaScriptClassLoader |
getScriptClassLoader(java.lang.String unitName) |
void |
setJasperReportsContext(JasperReportsContext context) |
evaluate, evaluateEstimated, evaluateOld, getFunctionSupport, handleMissingResource, init, msg, msg, msg, msg, str
protected static final java.lang.String EXPRESSION_ID_VAR
public JavaScriptCompiledEvaluator(JasperReportsContext jasperReportsContext, java.lang.String unitName, JavaScriptCompiledData compiledData)
jasperReportsContext
- unitName
- compiledData
- the report compile dataprotected static JavaScriptClassLoader getScriptClassLoader(java.lang.String unitName)
public void setJasperReportsContext(JasperReportsContext context)
setJasperReportsContext
in interface JasperReportsContextAware
protected void customizedInit(java.util.Map<java.lang.String,JRFillParameter> parametersMap, java.util.Map<java.lang.String,JRFillField> fieldsMap, java.util.Map<java.lang.String,JRFillVariable> variablesMap) throws JRException
JREvaluator
customizedInit
in class JREvaluator
parametersMap
- the parameters indexed by namefieldsMap
- the fields indexed by namevariablesMap
- the variables indexed by nameJRException
protected java.lang.Object evaluate(int id) throws java.lang.Throwable
JREvaluator
evaluate
in class JREvaluator
id
- the expression idjava.lang.Throwable
JRExpression.EVALUATION_DEFAULT
,
JRFillVariable.getValue()
,
JRFillField.getValue()
protected java.lang.Object evaluateEstimated(int id) throws java.lang.Throwable
JREvaluator
evaluateEstimated
in class JREvaluator
id
- the expression idjava.lang.Throwable
JRExpression.EVALUATION_ESTIMATED
,
JRFillVariable.getEstimatedValue()
protected java.lang.Object evaluateOld(int id) throws java.lang.Throwable
JREvaluator
evaluateOld
in class JREvaluator
id
- the expression idjava.lang.Throwable
JRExpression.EVALUATION_OLD
,
JRFillVariable.getOldValue()
,
JRFillField.getOldValue()
protected JavaScriptCompiledData.ExpressionIndexes getExpression(int id)
protected java.lang.Object evaluateExpression(int expressionIndex)
© 2001-2014 TIBCO Software Inc. www.jaspersoft.com