|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.model.ManagementLink
org.jenkinsci.plugins.scriptler.ScriptlerManagment
@Extension public class ScriptlerManagment
Creates the link on the "manage Jenkins" 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 | |
|---|---|
boolean |
allowRunScriptEdit()
|
boolean |
allowRunScriptPermission()
|
boolean |
disableRemoteCatalog()
|
org.kohsuke.stapler.HttpResponse |
doDownloadScript(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
String id,
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,
String id)
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,
String id)
Removes a script from the config and filesystem. |
void |
doRunScript(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
String id)
Display the screen to trigger a script. |
org.kohsuke.stapler.HttpResponse |
doScriptAdd(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
String id,
String name,
String comment,
String script,
boolean nonAdministerUsing,
String originCatalogName,
String originId)
Saves a script snipplet as file to the system. |
org.kohsuke.stapler.HttpResponse |
doScriptlerSettings(org.kohsuke.stapler.StaplerRequest res,
org.kohsuke.stapler.StaplerResponse rsp,
boolean disableRemoteCatalog,
boolean allowRunScriptPermission,
boolean allowRunScriptEdit)
save the scriptler 'global' settings (on settings screen, not global Jenkins config) |
void |
doTriggerScript(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
String id,
String scriptSrc,
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. |
ScriptInfoCatalog<? extends ScriptInfo> |
getCatalogByName(String catalogName)
|
CatalogInfo |
getCatalogInfoByName(String catalogName)
|
List<ScriptInfoCatalog> |
getCatalogs()
Gets the remote catalogs containing the available scripts for download. |
ScriptlerConfiguration |
getConfiguration()
|
String |
getDescription()
|
String |
getDisplayName()
|
String |
getIconFileName()
|
String |
getPluginResourcePath()
|
static File |
getScriptDirectory()
returns the directory where the script files get stored |
ScriptlerManagment |
getScriptler()
|
static File |
getScriptlerHomeDirectory()
|
List<String> |
getSlaveAlias()
Gets the names of all configured slaves, regardless whether they are online, including alias of ALL and ALL_SLAVES |
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 String getIconFileName()
getIconFileName in interface hudson.model.ActiongetIconFileName in class hudson.model.ManagementLinkpublic String getUrlName()
getUrlName in interface hudson.model.ActiongetUrlName in class hudson.model.ManagementLinkpublic boolean disableRemoteCatalog()
public boolean allowRunScriptEdit()
public boolean allowRunScriptPermission()
public String getDisplayName()
getDisplayName in interface hudson.model.ActiongetDisplayName in interface hudson.model.ModelObjectpublic String getDescription()
getDescription in class hudson.model.ManagementLinkpublic ScriptlerManagment getScriptler()
public ScriptlerConfiguration getConfiguration()
public String getPluginResourcePath()
public org.kohsuke.stapler.HttpResponse doScriptlerSettings(org.kohsuke.stapler.StaplerRequest res,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(value="disableRemoteCatalog")
boolean disableRemoteCatalog,
@QueryParameter(value="allowRunScriptPermission")
boolean allowRunScriptPermission,
@QueryParameter(value="allowRunScriptEdit")
boolean allowRunScriptEdit)
throws IOException
res - rsp - disableRemoteCatalog - allowRunScriptPermission - allowRunScriptEdit -
IOException
public org.kohsuke.stapler.HttpResponse doDownloadScript(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(value="id")
String id,
@QueryParameter(value="catalog")
String catalogName)
throws IOException,
javax.servlet.ServletException
res - requestrsp - responseid - the id of the file to be downloadedcatalogName - the catalog to download the file from
doScriptAdd
IOException
javax.servlet.ServletException
public org.kohsuke.stapler.HttpResponse doScriptAdd(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(value="id")
String id,
@QueryParameter(value="name")
String name,
@QueryParameter(value="comment")
String comment,
@QueryParameter(value="script")
String script,
@QueryParameter(value="nonAdministerUsing")
boolean nonAdministerUsing,
String originCatalogName,
String originId)
throws IOException,
javax.servlet.ServletException
req - responsersp - requestid - the script id (fileName)name - the name of the scriptcomment - 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
IOException
javax.servlet.ServletException
public org.kohsuke.stapler.HttpResponse doRemoveScript(org.kohsuke.stapler.StaplerRequest res,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(value="id")
String id)
throws IOException
res - responsersp - requestname - the name of the file to be removed
IOException
public org.kohsuke.stapler.HttpResponse doUploadScript(org.kohsuke.stapler.StaplerRequest req)
throws IOException,
javax.servlet.ServletException
req - request
IOException
javax.servlet.ServletException
public void doRunScript(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(value="id")
String id)
throws IOException,
javax.servlet.ServletException
req - requestrsp - responsescriptName - the name of the script to be executed
IOException
javax.servlet.ServletException
public void doTriggerScript(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(value="id")
String id,
@QueryParameter(value="script")
String scriptSrc,
@QueryParameter(value="node")
String node)
throws 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 scriptscriptSrc - the script code (groovy)node - the node, to execute the code on.
IOException
javax.servlet.ServletException
public void doEditScript(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(value="id")
String id)
throws IOException,
javax.servlet.ServletException
req - requestrsp - responsescriptName - the name of the script to be loaded in to the edit view.
IOException
javax.servlet.ServletExceptionpublic List<String> getSlaveAlias()
public List<ScriptInfoCatalog> getCatalogs()
public ScriptInfoCatalog<? extends ScriptInfo> getCatalogByName(String catalogName)
public CatalogInfo getCatalogInfoByName(String catalogName)
public static File getScriptDirectory()
public static File getScriptlerHomeDirectory()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||