Class Evaluator

  • All Implemented Interfaces:
    OBProvidable, OBSingleton

    public class Evaluator
    extends Object
    implements OBSingleton
    Evaluates expressions in the context of a business object, the expression language supported by this class is javascript rhino.
    • Constructor Detail

      • Evaluator

        public Evaluator()
    • Method Detail

      • getInstance

        public static Evaluator getInstance()
      • setInstance

        public static void setInstance​(Evaluator instance)
      • evaluateBoolean

        public Boolean evaluateBoolean​(BaseOBObjectDef contextBob,
                                       String script)
        Evaluates the passed script in the context of the passed business object. This means that properties of the business object may be used directly in the script. The result should always be a boolean.
        contextBob - the script is executed in the context of this business object
        script - the javascript which much evaluate to a boolean
        the result of the script evaluation