|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.model.ManagementLink
org.jvnet.hudson.plugins.scriptler.ScriptlerManagment
@Extension public class ScriptlerManagment
Creates the link on the "manage hudson" page and handles all the web requests.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
|---|
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Field Summary |
|---|
| Fields inherited from class hudson.model.ManagementLink |
|---|
LIST |
| Constructor Summary | |
|---|---|
ScriptlerManagment()
|
|
| Method Summary | |
|---|---|
org.kohsuke.stapler.HttpResponse |
doDownloadScript(org.kohsuke.stapler.StaplerRequest res,
org.kohsuke.stapler.StaplerResponse rsp,
java.lang.String id,
java.lang.String catalogName)
Downloads a script from a catalog and imports it to the local system. |
void |
doEditScript(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
java.lang.String scriptName)
Loads the script by its name and forwards the request to "edit.jelly". |
org.kohsuke.stapler.HttpResponse |
doRemoveScript(org.kohsuke.stapler.StaplerRequest res,
org.kohsuke.stapler.StaplerResponse rsp,
java.lang.String name)
Removes a script from the config and filesystem. |
void |
doRunScript(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
java.lang.String scriptName)
Display the screen to trigger a script. |
org.kohsuke.stapler.HttpResponse |
doScriptAdd(org.kohsuke.stapler.StaplerRequest res,
org.kohsuke.stapler.StaplerResponse rsp,
java.lang.String name,
java.lang.String comment,
java.lang.String script,
java.lang.String originCatalogName,
java.lang.String originId)
Saves a script snipplet as file to the system. |
void |
doTriggerScript(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
java.lang.String scriptName,
java.lang.String script,
java.lang.String node)
Trigger/run/execute the script on a slave and show the result/output. |
org.kohsuke.stapler.HttpResponse |
doUploadScript(org.kohsuke.stapler.StaplerRequest req)
Uploads a script and stores it with the given filename to the configuration. |
CatalogInfo |
getCatalogInfoByName(java.lang.String catalogName)
|
java.util.List<Catalog> |
getCatalogs()
Gets the remote catalogs containing the available scripts for download. |
ScriptlerConfiguration |
getConfiguration()
|
java.lang.String |
getDescription()
|
java.lang.String |
getDisplayName()
|
java.lang.String |
getIconFileName()
|
protected Script |
getScript(java.lang.String scriptName,
boolean withSrc)
Loads the script information. |
static java.io.File |
getScriptDirectory()
returns the directory where the script files get stored |
ScriptlerManagment |
getScriptler()
|
static java.io.File |
getScriptlerHomeDirectory()
|
java.util.List<java.lang.String> |
getSlaveNames()
Gets the names of all configured slaves, regardless whether they are online. |
java.lang.String |
getUrlName()
|
| Methods inherited from class hudson.model.ManagementLink |
|---|
all |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScriptlerManagment()
| Method Detail |
|---|
public java.lang.String getIconFileName()
getIconFileName in interface hudson.model.ActiongetIconFileName in class hudson.model.ManagementLinkpublic java.lang.String getUrlName()
getUrlName in interface hudson.model.ActiongetUrlName in class hudson.model.ManagementLinkpublic java.lang.String getDisplayName()
public java.lang.String getDescription()
getDescription in class hudson.model.ManagementLinkpublic ScriptlerManagment getScriptler()
public ScriptlerConfiguration getConfiguration()
public org.kohsuke.stapler.HttpResponse doDownloadScript(org.kohsuke.stapler.StaplerRequest res,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(value="id")
java.lang.String id,
@QueryParameter(value="catalog")
java.lang.String catalogName)
throws java.io.IOException
res - requestrsp - responsename - the name of the file to be downloadedcatalogName - the catalog to download the file from
doScriptAdd
java.io.IOException
public org.kohsuke.stapler.HttpResponse doScriptAdd(org.kohsuke.stapler.StaplerRequest res,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(value="name")
java.lang.String name,
@QueryParameter(value="comment")
java.lang.String comment,
@QueryParameter(value="script")
java.lang.String script,
java.lang.String originCatalogName,
java.lang.String originId)
throws java.io.IOException
res - responsersp - requestname - the name for the filecomment - a commentscript - script codecatalogName - (optional) the name of the catalog the script is loaded/added
fromoriginId - (optional) the original id the script had at the catalog
java.io.IOException
public org.kohsuke.stapler.HttpResponse doRemoveScript(org.kohsuke.stapler.StaplerRequest res,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(value="name")
java.lang.String name)
throws java.io.IOException
res - responsersp - requestname - the name of the file to be removed
java.io.IOException
public org.kohsuke.stapler.HttpResponse doUploadScript(org.kohsuke.stapler.StaplerRequest req)
throws java.io.IOException,
javax.servlet.ServletException
req - request
java.io.IOException
javax.servlet.ServletException
protected Script getScript(java.lang.String scriptName,
boolean withSrc)
scriptName - the name of the scriptwithSrc - should the script sources be loaded too?
public void doRunScript(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(value="name")
java.lang.String scriptName)
throws java.io.IOException,
javax.servlet.ServletException
req - requestrsp - responsescriptName - the name of the script to be executed
java.io.IOException
javax.servlet.ServletException
public void doTriggerScript(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(value="scriptName")
java.lang.String scriptName,
@QueryParameter(value="script")
java.lang.String script,
@QueryParameter(value="node")
java.lang.String node)
throws java.io.IOException,
javax.servlet.ServletException
runscript.jelly (This is
usually also where the request came from). The script passed to this
method gets restored in the request again (and not loaded from the
system). This way one is able to modify the script before execution and
reuse the modified version for further executions.
req - requestrsp - responsescriptName - the name of the scriptscript - the script code (groovy)node - the node, to execute the code on.
java.io.IOException
javax.servlet.ServletException
public void doEditScript(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(value="name")
java.lang.String scriptName)
throws java.io.IOException,
javax.servlet.ServletException
req - requestrsp - responsescriptName - the name of the script to be loaded in to the edit view.
java.io.IOException
javax.servlet.ServletExceptionpublic java.util.List<java.lang.String> getSlaveNames()
public java.util.List<Catalog> getCatalogs()
public CatalogInfo getCatalogInfoByName(java.lang.String catalogName)
public static java.io.File getScriptDirectory()
public static java.io.File getScriptlerHomeDirectory()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||