Class GlobalTextareaChoiceListProvider
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<ChoiceListProvider>
-
- jp.ikedam.jenkins.plugins.extensible_choice_parameter.ChoiceListProvider
-
- jp.ikedam.jenkins.plugins.extensible_choice_parameter.AddEditedChoiceListProvider
-
- jp.ikedam.jenkins.plugins.extensible_choice_parameter.GlobalTextareaChoiceListProvider
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<ChoiceListProvider>
,Serializable
public class GlobalTextareaChoiceListProvider extends AddEditedChoiceListProvider
A choice provider whose choices are defined in the System Configuration page, and can be refereed from all jobs.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GlobalTextareaChoiceListProvider.DescriptorImpl
The internal class to work with views.-
Nested classes/interfaces inherited from class jp.ikedam.jenkins.plugins.extensible_choice_parameter.AddEditedChoiceListProvider
AddEditedChoiceListProvider.WhenToAdd
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description GlobalTextareaChoiceListProvider(String name, String defaultChoice, boolean addEditedValue, AddEditedChoiceListProvider.WhenToAdd whenToAdd)
Constructor instantiating with parameters in the configuration page.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addEditedValue(AbstractProject<?,?> project, ExtensibleChoiceParameterDefinition def, String value)
Called to add a edited value to the choice list.List<String>
getChoiceList()
Returns the choices available as a parameter value.String
getDefaultChoice()
Returns the default choice.String
getName()
Returns the name of the set of choice, specified by a user.-
Methods inherited from class jp.ikedam.jenkins.plugins.extensible_choice_parameter.AddEditedChoiceListProvider
getWhenToAdd, isAddEditedValue, onBuildCompletedWithValue, onBuildTriggeredWithValue
-
Methods inherited from class jp.ikedam.jenkins.plugins.extensible_choice_parameter.ChoiceListProvider
all, requiresBuildPermission
-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Constructor Detail
-
GlobalTextareaChoiceListProvider
@DataBoundConstructor public GlobalTextareaChoiceListProvider(String name, String defaultChoice, boolean addEditedValue, AddEditedChoiceListProvider.WhenToAdd whenToAdd)
Constructor instantiating with parameters in the configuration page. When instantiating from the saved configuration, the object is directly serialized with XStream, and no constructor is used.- Parameters:
name
- the name of the set of choices.defaultChoice
- the initial selected value.addEditedValue
-whenToAdd
-
-
-
Method Detail
-
getName
public String getName()
Returns the name of the set of choice, specified by a user.- Returns:
- the name of the set of choice
-
getDefaultChoice
public String getDefaultChoice()
Returns the default choice.- Overrides:
getDefaultChoice
in classChoiceListProvider
- Returns:
- the default choice
- See Also:
ChoiceListProvider.getDefaultChoice()
-
getChoiceList
public List<String> getChoiceList()
Returns the choices available as a parameter value.- Specified by:
getChoiceList
in classChoiceListProvider
- Returns:
- choices
- See Also:
ChoiceListProvider.getChoiceList()
-
addEditedValue
protected void addEditedValue(AbstractProject<?,?> project, ExtensibleChoiceParameterDefinition def, String value)
Called to add a edited value to the choice list.- Specified by:
addEditedValue
in classAddEditedChoiceListProvider
- Parameters:
project
-def
-value
-- See Also:
AddEditedChoiceListProvider.addEditedValue(hudson.model.AbstractProject, jp.ikedam.jenkins.plugins.extensible_choice_parameter.ExtensibleChoiceParameterDefinition, java.lang.String)
-
-