Class TextareaChoiceListProvider
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.TextareaChoiceListProvider
- All Implemented Interfaces:
ExtensionPoint,Describable<ChoiceListProvider>,Serializable
A choice provider whose choices are defined as a text, like the build-in choice parameter.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe internal class to work with views.Nested classes/interfaces inherited from class jp.ikedam.jenkins.plugins.extensible_choice_parameter.AddEditedChoiceListProvider
AddEditedChoiceListProvider.WhenToAddNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
ConstructorsConstructorDescriptionTextareaChoiceListProvider(String choiceListText, String defaultChoice, boolean addEditedValue, AddEditedChoiceListProvider.WhenToAdd whenToAdd) Constructor instantiating with parameters in the configuration page. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddEditedValue(AbstractProject<?, ?> project, ExtensibleChoiceParameterDefinition def, String value) Called to add a edited value to the choice list.Returns the list of choices the user specified in the job configuration page.The list of choices, joined into a string.Returns the default choice.booleanChecks if accessChoiceListProvider.getChoiceList()from REST API needs theItem.BUILDpermission.protected voidsetChoiceList(List<String> choiceList) Methods inherited from class jp.ikedam.jenkins.plugins.extensible_choice_parameter.AddEditedChoiceListProvider
getWhenToAdd, isAddEditedValue, onBuildCompletedWithValue, onBuildTriggeredWithValueMethods inherited from class jp.ikedam.jenkins.plugins.extensible_choice_parameter.ChoiceListProvider
allMethods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
TextareaChoiceListProvider
@DataBoundConstructor public TextareaChoiceListProvider(String choiceListText, 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:
choiceListText- the text where choices are written in each line.defaultChoice-addEditedValue-whenToAdd-
-
-
Method Details
-
getChoiceList
Returns the list of choices the user specified in the job configuration page.- Specified by:
getChoiceListin classChoiceListProvider- Returns:
- the list of choices.
- See Also:
-
setChoiceList
- Parameters:
choiceList- the choiceList to set
-
getChoiceListText
The list of choices, joined into a string. Used for filling a field when the configuration page is shown.- Returns:
- Joined choices.
-
getDefaultChoice
Returns the default choice.- Overrides:
getDefaultChoicein classChoiceListProvider- Returns:
- the default choice
- See Also:
-
requiresBuildPermission
public boolean requiresBuildPermission()Description copied from class:ChoiceListProviderChecks if accessChoiceListProvider.getChoiceList()from REST API needs theItem.BUILDpermission. If true this will currently return the choices only for Job based API calls.- Overrides:
requiresBuildPermissionin classChoiceListProvider- Returns:
- true if allow access to choices only if BUILD permission was granted. false otherwise.
-
addEditedValue
protected void addEditedValue(AbstractProject<?, ?> project, ExtensibleChoiceParameterDefinition def, String value) Description copied from class:AddEditedChoiceListProviderCalled to add a edited value to the choice list.- Specified by:
addEditedValuein classAddEditedChoiceListProvider
-