Examples of RhinoScriptable


Examples of org.pentaho.platform.plugin.condition.javascript.RhinoScriptable

        script = buffer.toString();
        if ( ComponentBase.debug ) {
          debug( "script=" + script ); //$NON-NLS-1$
        }
        try {
          ScriptableObject scriptable = new RhinoScriptable();
          // initialize the standard javascript objects
          Scriptable scope = cx.initStandardObjects( scriptable );

          Object resultObject = executeScript( scriptable, scope, script, cx );
          if ( oldStyleOutputs ) {
View Full Code Here

Examples of org.pentaho.platform.plugin.condition.javascript.RhinoScriptable

    Context cx = ContextFactory.getGlobal().enterContext();
    try {
      // Initialize the standard objects (Object, Function, etc.)
      // This must be done before scripts can be executed. Returns
      // a scope object that we use in later calls.
      Scriptable scope = new RhinoScriptable();
      scope.getClassName();
      // Collect the arguments into a single string.
      String[] args = { "var s=5;", "s++;", "s+=2;", "s = \'" + scope.getClassName() + "\'" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
      String s = ""; //$NON-NLS-1$
      for ( int i = 0; i < args.length; i++ ) {
        s += args[i];
      }
      // Now evaluate the string we've colected.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.