Class 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:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      RhinoExpression()
      Deprecated.
      default constructor, create a new BeanShellExpression.
    • Constructor Detail

      • RhinoExpression

        public RhinoExpression()
        Deprecated.
        default constructor, create a new BeanShellExpression.
    • 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 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.