Package org.biouno.unochoice.model
Class ScriptlerScript
java.lang.Object
org.biouno.unochoice.model.AbstractScript
org.biouno.unochoice.model.ScriptlerScript
- All Implemented Interfaces:
Describable<AbstractScript>
,Serializable
,Script
A scriptler script.
- Since:
- 0.1
- Author:
- Bruno P. Kinoshita
- See Also:
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionScriptlerScript
(org.jenkinsci.plugins.scriptler.builder.ScriptlerBuilder scriptlerBuilder, Boolean isSandboxed) -
Method Summary
Modifier and TypeMethodDescriptioneval()
Evaluates the script.Evaluates the script using the given parameters binding parameters.org.jenkinsci.plugins.scriptler.builder.ScriptlerBuilder
void
setParameters
(List<Map<String, String>> parametersList) void
setScriptlerScriptId
(String scriptlerScriptId) Converts this scriptler script to a GroovyScript.Methods inherited from class org.biouno.unochoice.model.AbstractScript
all, getDescriptor
-
Constructor Details
-
ScriptlerScript
@DataBoundConstructor public ScriptlerScript(org.jenkinsci.plugins.scriptler.builder.ScriptlerBuilder scriptlerBuilder, Boolean isSandboxed) - Parameters:
scriptlerBuilder
- Scriptler builderisSandboxed
- whether this script must be sandboxed or not
-
-
Method Details
-
readResolve
-
getScriptlerBuilder
public org.jenkinsci.plugins.scriptler.builder.ScriptlerBuilder getScriptlerBuilder()- Returns:
- the Scriptler builder
-
getScriptlerScriptId
- Returns:
- the scriptler script ID
-
setScriptlerScriptId
-
getParameters
- Returns:
- the parameters
-
setParameters
-
getIsSandboxed
- Returns:
- the sandbox flag
-
eval
Description copied from interface:Script
Evaluates the script.- Returns:
- output of the script
-
eval
Description copied from interface:Script
Evaluates the script using the given parameters binding parameters.- Parameters:
parameters
- binding parameters- Returns:
- output of the script
-
toGroovyScript
Converts this scriptler script to a GroovyScript. The script will run in the Groovy Sandbox environment by default, unless approved by a Jenkins administrator. In this case it won't use the Groovy Sandbox. This is useful if the Groovy script needs access to API not available in the Sandbox (e.g. Grapes).- Returns:
- a GroovyScript
-