Class SystemGroovyChoiceListProvider
java.lang.Object
hudson.model.AbstractDescribableImpl<ChoiceListProvider>
jp.ikedam.jenkins.plugins.extensible_choice_parameter.ChoiceListProvider
jp.ikedam.jenkins.plugins.extensible_choice_parameter.SystemGroovyChoiceListProvider
- All Implemented Interfaces:
ExtensionPoint
,Describable<ChoiceListProvider>
,Serializable
A choice provider whose choices are determined by a Groovy script.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
The internal class to work with views.Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
ConstructorsConstructorDescriptionSystemGroovyChoiceListProvider
(String scriptText, String defaultChoice) SystemGroovyChoiceListProvider
(String scriptText, String defaultChoice, boolean usePredefinedVariables) SystemGroovyChoiceListProvider
(org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript groovyScript, String defaultChoice, boolean usePredefinedVariables) Constructor instantiating with parameters in the configuration page. -
Method Summary
Modifier and TypeMethodDescriptionReturns the list of choices the user specified in the job configuration page.Returns the default choice.org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript
protected Job<?,
?> Return the project where this is configured.Deprecated.boolean
protected void
setProject
(AbstractProject<?, ?> project) Deprecated.protected void
setProject
(Job<?, ?> project) Methods inherited from class jp.ikedam.jenkins.plugins.extensible_choice_parameter.ChoiceListProvider
all, onBuildCompletedWithValue, onBuildTriggeredWithValue, requiresBuildPermission
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
SystemGroovyChoiceListProvider
@DataBoundConstructor public SystemGroovyChoiceListProvider(org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript groovyScript, String defaultChoice, boolean usePredefinedVariables) Constructor instantiating with parameters in the configuration page.- Parameters:
groovyScript
-defaultChoice
-usePredefinedVariables
-- Since:
- 1.4.0
-
SystemGroovyChoiceListProvider
-
SystemGroovyChoiceListProvider
-
-
Method Details
-
getChoiceList
Returns the list of choices the user specified in the job configuration page.- Specified by:
getChoiceList
in classChoiceListProvider
- Returns:
- the list of choices.
- See Also:
-
getScriptText
Deprecated. -
getGroovyScript
public org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript getGroovyScript()- Returns:
- script to generate choices.
- Since:
- 1.4.0
-
getDefaultChoice
Returns the default choice.- Overrides:
getDefaultChoice
in classChoiceListProvider
- Returns:
- the default choice
- See Also:
-
isUsePredefinedVariables
public boolean isUsePredefinedVariables()- Returns:
- whether to use predefined variables
-
setProject
- Parameters:
project
-
-
setProject
Deprecated. -
getProject
Return the project where this is configured. This is set only whenisUsePredefinedVariables()
is true.- Returns:
- project
-
getGroovyScript()