Class AbstractScriptableParameter

    • Field Detail

      • SEPARATOR

        protected static final String SEPARATOR
        Used to split values that come from the UI via Ajax POST's
        See Also:
        Constant Field Values
      • EQUALS

        protected static final String EQUALS
        Used to split values when scripts return values like A=2, B=3.
        See Also:
        Constant Field Values
      • JENKINS_PROJECT_VARIABLE_NAME

        protected static final String JENKINS_PROJECT_VARIABLE_NAME
        Constant used to add the project in the environment variables map.
        See Also:
        Constant Field Values
      • JENKINS_BUILD_VARIABLE_NAME

        protected static final String JENKINS_BUILD_VARIABLE_NAME
        Constant used to add the build in the environment variables map.
        See Also:
        Constant Field Values
      • JENKINS_PARAMETER_VARIABLE_NAME

        protected static final String JENKINS_PARAMETER_VARIABLE_NAME
        Constant used to add the parameter name in the environment variables map.
        See Also:
        Constant Field Values
      • script

        protected final Script script
        Script used to render the parameter.
    • Constructor Detail

      • AbstractScriptableParameter

        protected AbstractScriptableParameter​(String name,
                                              String description,
                                              Script script)
        Deprecated.
        see JENKINS-32149
        Inherited constructor.
        Parameters:
        name - name
        description - description
        script - script used to generate the list of parameter values
      • AbstractScriptableParameter

        protected AbstractScriptableParameter​(String name,
                                              String description,
                                              String randomName,
                                              Script script)
        Inherited constructor.
        Parameters:
        name - name
        description - description
        randomName - parameter random generated name (uuid)
        script - script used to generate the list of parameter values
    • Method Detail

      • getScript

        public Script getScript()
        Gets the script.
        Returns:
        the script
      • getParameters

        public Map<Object,​Object> getParameters()
        Gets 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.
        Returns:
        the current parameters with pre-populated defaults
      • getChoicesAsString

        public String getChoicesAsString()
      • getVisibleItemCount

        public int getVisibleItemCount()
        Get the number of visible items in the select.
        Returns:
        the number of choices or, if it is higher than the default, then it returns the default maximum value