org.jvnet.hudson.plugins.scriptler.util
Class ScriptHelper

java.lang.Object
  extended by org.jvnet.hudson.plugins.scriptler.util.ScriptHelper

public class ScriptHelper
extends java.lang.Object


Constructor Summary
ScriptHelper()
           
 
Method Summary
static java.lang.String doScript(java.lang.String node, java.lang.String scriptTxt)
          Runs the execution on a given slave.
static Script getScript(java.lang.String scriptName, boolean withSrc)
          Loads the script information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptHelper

public ScriptHelper()
Method Detail

getScript

public static Script getScript(java.lang.String scriptName,
                               boolean withSrc)
Loads the script information.

Parameters:
scriptName - the name of the script
withSrc - should the script sources be loaded too?
Returns:
the script

doScript

public static java.lang.String doScript(java.lang.String node,
                                        java.lang.String scriptTxt)
                                 throws java.io.IOException,
                                        javax.servlet.ServletException
Runs the execution on a given slave.

Parameters:
node - where to run the script.
scriptTxt - the script (groovy) to be executed.
Returns:
the output
Throws:
java.io.IOException
javax.servlet.ServletException


Copyright © 2010-2011. All Rights Reserved.