Run a script identified by name with a single argument. @param scriptName name of the script to run @param argument a single argument passed as a variable named arg in the binding @return a toString() representation of the result of the execution of the script @throws Re
(String scriptName, String argument)
| 627 | * @throws ScriptException if there is a problem parsing the script |
| 628 | */ |
| 629 | public String run(String scriptName, String argument) throws ResourceException, ScriptException { |
| 630 | Binding binding = new Binding(); |
| 631 | binding.setVariable("arg", argument); |
| 632 | Object result = run(scriptName, binding); |
| 633 | return result == null ? "" : result.toString(); |
| 634 | } |
| 635 | |
| 636 | /** |
| 637 | * Run a script identified by name with a given binding. |