Class RhinoExpression
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.function.AbstractExpression
-
- org.pentaho.reporting.engine.classic.extensions.modules.rhino.RhinoExpression
-
- All Implemented Interfaces:
Serializable
,Cloneable
,org.pentaho.reporting.engine.classic.core.function.Expression
public class RhinoExpression extends org.pentaho.reporting.engine.classic.core.function.AbstractExpression implements Serializable
Deprecated.Use BSHExpression instead.An expression that uses the Rhino scripting framework to perform a scripted calculation. The expression itself is contained in a function calledObject getValue()
and this function is defined in theexpression
property. You have to overwrite the functiongetValue()
to begin and to end your expression, but you are free to add your own functions to the script.- Author:
- Thomas Morgner
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RhinoExpression()
Deprecated.default constructor, create a new BeanShellExpression.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getExpression()
Deprecated.Object
getValue()
Deprecated.Evaluates the defined expression.protected org.pentaho.reporting.engine.classic.core.states.LegacyDataRowWrapper
initializeScope(org.mozilla.javascript.Scriptable scope)
Deprecated.void
setExpression(String expression)
Deprecated.-
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractExpression
clone, getDataRow, getDependencyLevel, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setActive, setDependencyLevel, setName, setPreserve, setRuntime
-
-
-
-
Method Detail
-
initializeScope
protected org.pentaho.reporting.engine.classic.core.states.LegacyDataRowWrapper initializeScope(org.mozilla.javascript.Scriptable scope)
Deprecated.
-
getValue
public Object getValue()
Deprecated.Evaluates the defined expression. If an exception or an evaluation error occures, the evaluation returns null and the error is logged. The current datarow and a copy of the expressions properties are set to script-internal variables. Changes to the properties will not alter the expressions original properties and will be lost when the evaluation is finished. Expressions do not maintain a state and no assumptions about the order of evaluation can be made.- Specified by:
getValue
in interfaceorg.pentaho.reporting.engine.classic.core.function.Expression
- Returns:
- the evaluated value or null.
-
getExpression
public String getExpression()
Deprecated.
-
setExpression
public void setExpression(String expression)
Deprecated.
-
-