Package org.biouno.unochoice
Class AbstractUnoChoiceParameter
java.lang.Object
hudson.model.ParameterDefinition
hudson.model.SimpleParameterDefinition
org.biouno.unochoice.AbstractUnoChoiceParameter
- All Implemented Interfaces:
ExtensionPoint
,Describable<ParameterDefinition>
,Serializable
,UnoChoiceParameter
- Direct Known Subclasses:
AbstractScriptableParameter
public abstract class AbstractUnoChoiceParameter
extends SimpleParameterDefinition
implements UnoChoiceParameter
Abstract Uno Choice parameter. Provides basic methods common to all Uno Choice parameters.
- Since:
- 0.20
- Author:
- Bruno P. Kinoshita
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.ParameterDefinition
ParameterDefinition.ParameterDescriptor
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final String
static final String
static final String
static final String
static final String
protected static final Logger
static final String
static final String
static final String
static final String
Fields inherited from class hudson.model.ParameterDefinition
LIST
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractUnoChoiceParameter
(String name, String description) Deprecated.to fix JENKINS-32149 (create random name only once - this is the parameter ID)protected
AbstractUnoChoiceParameter
(String name, String description, String randomName) Inherited constructor. -
Method Summary
Modifier and TypeMethodDescriptionall()
createValue
(String value) createValue
(org.kohsuke.stapler.StaplerRequest request, net.sf.json.JSONObject json) abstract String
Gets the choice type.Gets the randomly generated parameter name.Methods inherited from class hudson.model.SimpleParameterDefinition
createValue, createValue
Methods inherited from class hudson.model.ParameterDefinition
copyWithDefaultValue, equals, getDefaultParameterValue, getDescription, getFormattedDescription, getName, getType, hashCode, isValid, setDescription
-
Field Details
-
LOGGER
-
PARAMETER_TYPE_SINGLE_SELECT
- See Also:
-
PARAMETER_TYPE_MULTI_SELECT
- See Also:
-
PARAMETER_TYPE_CHECK_BOX
- See Also:
-
PARAMETER_TYPE_RADIO
- See Also:
-
ELEMENT_TYPE_TEXT_BOX
- See Also:
-
ELEMENT_TYPE_ORDERED_LIST
- See Also:
-
ELEMENT_TYPE_UNORDERED_LIST
- See Also:
-
ELEMENT_TYPE_FORMATTED_HTML
- See Also:
-
ELEMENT_TYPE_FORMATTED_HIDDEN_HTML
- See Also:
-
DEFAULT_MAX_VISIBLE_ITEM_COUNT
public static final int DEFAULT_MAX_VISIBLE_ITEM_COUNT- See Also:
-
-
Constructor Details
-
AbstractUnoChoiceParameter
Deprecated.to fix JENKINS-32149 (create random name only once - this is the parameter ID)Inherited constructor. .- Parameters:
name
- namedescription
- description FIXME: remove in new major release
-
AbstractUnoChoiceParameter
Inherited constructor. .- Parameters:
name
- namedescription
- descriptionrandomName
- the parameter unique ID (a random uuid) created once per parameter. If blank ornull
it will be created a new random parameter name that starts with choice-parameter
-
-
Method Details
-
getRandomName
Gets the randomly generated parameter name. Used in the UI for objecting binding.- Returns:
- a random string, created during object instantiation.
-
createValue
- Specified by:
createValue
in classSimpleParameterDefinition
-
createValue
public ParameterValue createValue(org.kohsuke.stapler.StaplerRequest request, net.sf.json.JSONObject json) - Specified by:
createValue
in classParameterDefinition
-
getChoiceType
Gets the choice type.
This method can be called from Javascript
- Returns:
- choice type
-
getDescriptor
- Specified by:
getDescriptor
in interfaceDescribable<ParameterDefinition>
- Overrides:
getDescriptor
in classParameterDefinition
-
all
public static DescriptorExtensionList<ParameterDefinition,ParameterDefinition.ParameterDescriptor> all()
-