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 called

Object getValue()

and this function is defined in the expression property. You have to overwrite the function getValue() to begin and to end your expression, but you are free to add your own functions to the script.

Author:
Thomas Morgner
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
    default constructor, create a new BeanShellExpression.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated.
     
    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

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RhinoExpression

      public RhinoExpression()
      Deprecated.
      default constructor, create a new BeanShellExpression.
  • Method Details

    • 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 interface org.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.