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:
- Serialized Form
-
-
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
Fields Modifier and Type Field Description static intDEFAULT_MAX_VISIBLE_ITEM_COUNTstatic StringELEMENT_TYPE_FORMATTED_HIDDEN_HTMLstatic StringELEMENT_TYPE_FORMATTED_HTMLstatic StringELEMENT_TYPE_ORDERED_LISTstatic StringELEMENT_TYPE_TEXT_BOXstatic StringELEMENT_TYPE_UNORDERED_LISTprotected static LoggerLOGGERstatic StringPARAMETER_TYPE_CHECK_BOXstatic StringPARAMETER_TYPE_MULTI_SELECTstatic StringPARAMETER_TYPE_RADIOstatic StringPARAMETER_TYPE_SINGLE_SELECT-
Fields inherited from class hudson.model.ParameterDefinition
LIST
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractUnoChoiceParameter(String name, String description)Deprecated.to fix JENKINS-32149 (create random name only once - this is the parameter ID)protectedAbstractUnoChoiceParameter(String name, String description, String randomName)Inherited constructor.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static DescriptorExtensionList<ParameterDefinition,ParameterDefinition.ParameterDescriptor>all()ParameterValuecreateValue(String value)ParameterValuecreateValue(org.kohsuke.stapler.StaplerRequest request, net.sf.json.JSONObject json)abstract StringgetChoiceType()Gets the choice type.ParameterDefinition.ParameterDescriptorgetDescriptor()StringgetRandomName()Gets the randomly generated parameter name.-
Methods inherited from class hudson.model.SimpleParameterDefinition
createValue, createValue
-
Methods inherited from class hudson.model.ParameterDefinition
copyWithDefaultValue, getDefaultParameterValue, getDescription, getFormattedDescription, getName, getType
-
-
-
-
Field Detail
-
LOGGER
protected static final Logger LOGGER
-
PARAMETER_TYPE_SINGLE_SELECT
public static final String PARAMETER_TYPE_SINGLE_SELECT
- See Also:
- Constant Field Values
-
PARAMETER_TYPE_MULTI_SELECT
public static final String PARAMETER_TYPE_MULTI_SELECT
- See Also:
- Constant Field Values
-
PARAMETER_TYPE_CHECK_BOX
public static final String PARAMETER_TYPE_CHECK_BOX
- See Also:
- Constant Field Values
-
PARAMETER_TYPE_RADIO
public static final String PARAMETER_TYPE_RADIO
- See Also:
- Constant Field Values
-
ELEMENT_TYPE_TEXT_BOX
public static final String ELEMENT_TYPE_TEXT_BOX
- See Also:
- Constant Field Values
-
ELEMENT_TYPE_ORDERED_LIST
public static final String ELEMENT_TYPE_ORDERED_LIST
- See Also:
- Constant Field Values
-
ELEMENT_TYPE_UNORDERED_LIST
public static final String ELEMENT_TYPE_UNORDERED_LIST
- See Also:
- Constant Field Values
-
ELEMENT_TYPE_FORMATTED_HTML
public static final String ELEMENT_TYPE_FORMATTED_HTML
- See Also:
- Constant Field Values
-
ELEMENT_TYPE_FORMATTED_HIDDEN_HTML
public static final String ELEMENT_TYPE_FORMATTED_HIDDEN_HTML
- See Also:
- Constant Field Values
-
DEFAULT_MAX_VISIBLE_ITEM_COUNT
public static final int DEFAULT_MAX_VISIBLE_ITEM_COUNT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractUnoChoiceParameter
protected AbstractUnoChoiceParameter(String name, String description)
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
protected AbstractUnoChoiceParameter(String name, String description, String randomName)
Inherited constructor. .- Parameters:
name- namedescription- descriptionrandomName- the parameter unique ID (a random uuid) created once per parameter. If blank ornullit will be created a new random parameter name that starts with choice-parameter
-
-
Method Detail
-
getRandomName
public String getRandomName()
Gets the randomly generated parameter name. Used in the UI for objecting binding.- Returns:
- a random string, created during object instantiation.
-
createValue
public ParameterValue createValue(String value)
- Specified by:
createValuein classSimpleParameterDefinition
-
createValue
public ParameterValue createValue(org.kohsuke.stapler.StaplerRequest request, net.sf.json.JSONObject json)
- Specified by:
createValuein classParameterDefinition
-
getChoiceType
public abstract String getChoiceType()
Gets the choice type.
This method can be called from Javascript
- Returns:
- choice type
-
getDescriptor
public ParameterDefinition.ParameterDescriptor getDescriptor()
- Specified by:
getDescriptorin interfaceDescribable<ParameterDefinition>- Overrides:
getDescriptorin classParameterDefinition
-
all
public static DescriptorExtensionList<ParameterDefinition,ParameterDefinition.ParameterDescriptor> all()
-
-