Package org.biouno.unochoice
Class AbstractCascadableParameter
java.lang.Object
hudson.model.ParameterDefinition
hudson.model.SimpleParameterDefinition
org.biouno.unochoice.AbstractUnoChoiceParameter
org.biouno.unochoice.AbstractScriptableParameter
org.biouno.unochoice.AbstractCascadableParameter
- All Implemented Interfaces:
ExtensionPoint,Describable<ParameterDefinition>,Serializable,CascadableParameter<Map<Object,,Object>> ScriptableParameter<Map<Object,,Object>> UnoChoiceParameter
- Direct Known Subclasses:
CascadeChoiceParameter,DynamicReferenceParameter
public abstract class AbstractCascadableParameter
extends AbstractScriptableParameter
implements CascadableParameter<Map<Object,Object>>
Base class for cascadable parameters, providing basic and utility methods.
- Since:
- 0.20
- Author:
- Bruno P. Kinoshita
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.ParameterDefinition
ParameterDefinition.ParameterDescriptorNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsModifier and TypeFieldDescriptionMap with parameters in the UI.Fields inherited from class org.biouno.unochoice.AbstractScriptableParameter
EQUALS, JENKINS_BUILD_VARIABLE_NAME, JENKINS_PARAMETER_VARIABLE_NAME, JENKINS_PROJECT_VARIABLE_NAME, script, SEPARATORFields inherited from class org.biouno.unochoice.AbstractUnoChoiceParameter
DEFAULT_MAX_VISIBLE_ITEM_COUNT, ELEMENT_TYPE_FORMATTED_HIDDEN_HTML, ELEMENT_TYPE_FORMATTED_HTML, ELEMENT_TYPE_ORDERED_LIST, ELEMENT_TYPE_TEXT_BOX, ELEMENT_TYPE_UNORDERED_LIST, LOGGER, PARAMETER_TYPE_CHECK_BOX, PARAMETER_TYPE_MULTI_SELECT, PARAMETER_TYPE_RADIO, PARAMETER_TYPE_SINGLE_SELECTFields inherited from class hudson.model.ParameterDefinition
LIST -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractCascadableParameter(String name, String description, String randomName, Script script, String referencedParameters) Create a new abstract cascadable parameter.protectedAbstractCascadableParameter(String name, String description, Script script, String referencedParameters) Deprecated.see JENKINS-32149 -
Method Summary
Modifier and TypeMethodDescriptionvoidExposed to the UI.Evaluates a script and returns its result as a Map.Gets the current parameters, be it before or after other referenced parameters triggered an update.Gets the list of referenced parameters.String[]Methods inherited from class org.biouno.unochoice.AbstractScriptableParameter
detectProject, getChoices, getChoices, getChoicesAsString, getChoicesAsString, getDefaultParameterValue, getScript, getVisibleItemCountMethods inherited from class org.biouno.unochoice.AbstractUnoChoiceParameter
createValue, createValue, getChoiceType, getDescriptor, getRandomNameMethods inherited from class hudson.model.SimpleParameterDefinition
createValue, createValueMethods inherited from class hudson.model.ParameterDefinition
all, copyWithDefaultValue, createValue, createValue, equals, getDescription, getFormattedDescription, getName, getType, hashCode, isValid, setDescriptionMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.biouno.unochoice.ScriptableParameter
getChoices
-
Field Details
-
parameters
Map with parameters in the UI.
-
-
Constructor Details
-
AbstractCascadableParameter
@Deprecated protected AbstractCascadableParameter(String name, String description, Script script, String referencedParameters) Deprecated.see JENKINS-32149Create a new abstract cascadable parameter.- Parameters:
name- namedescription- descriptionscript- script used to generate the list of parameter valuesreferencedParameters- comma separated list of referenced parameters
-
AbstractCascadableParameter
protected AbstractCascadableParameter(String name, String description, String randomName, Script script, String referencedParameters) Create a new abstract cascadable parameter.- Parameters:
name- namedescription- descriptionrandomName- parameter random generated name (uuid)script- script used to generate the list of parameter valuesreferencedParameters- comma separated list of referenced parameters
-
-
Method Details
-
getReferencedParameters
Description copied from interface:CascadableParameterGets the list of referenced parameters. If any of these parameters change in the UI we will update our current parameters.- Specified by:
getReferencedParametersin interfaceCascadableParameter<Map<Object,Object>> - Returns:
- the referencedParameters
-
getParameters
Description copied from class:AbstractScriptableParameterGets the current parameters, be it before or after other referenced parameters triggered an update. Populates parameters common to all evaluations, such as jenkinsProject, which is the current Jenkins project.- Overrides:
getParametersin classAbstractScriptableParameter- Returns:
- the current parameters with pre-populated defaults
-
doUpdate
Description copied from interface:CascadableParameterExposed to the UI. Is triggered every time any of the referenced parameters gets updated.- Specified by:
doUpdatein interfaceCascadableParameter<Map<Object,Object>> - Parameters:
parameters- Comma separated list of parameters
-
getChoicesForUI
Description copied from interface:CascadableParameterEvaluates a script and returns its result as a Map. List values are automatically handled and converted to Maps too.- Specified by:
getChoicesForUIin interfaceCascadableParameter<Map<Object,Object>> - Returns:
- script result as Map
-
getReferencedParametersAsArray
-