Class ChoiceListProvider

    • Constructor Detail

      • ChoiceListProvider

        public ChoiceListProvider()
    • Method Detail

      • getChoiceList

        public abstract List<String> getChoiceList()
        Returns the choices.
        Returns:
        the choices list.
      • getDefaultChoice

        public String getDefaultChoice()
        Returns the default choice value. null indicates the first one is the default value.
        Returns:
        the default choice value.
      • onBuildTriggeredWithValue

        public void onBuildTriggeredWithValue​(AbstractProject<?,​?> job,
                                              ExtensibleChoiceParameterDefinition def,
                                              String value)
        Called when a build is triggered Implementations can override this method, and do custom behavior. Default implementation do nothing at all.
        Parameters:
        job - the job with which this choice provider is used.
        def - the parameter definition the value specified
        value - the value specified.
      • onBuildCompletedWithValue

        public void onBuildCompletedWithValue​(AbstractBuild<?,​?> build,
                                              ExtensibleChoiceParameterDefinition def,
                                              String value)
        Called when a build is completed Implementations can override this method, and do custom behavior. Default implementation do nothing at all.
        Parameters:
        build - the build with which this choice provider is used.
        def - the parameter definition the value specified
        value - the value specified.
      • requiresBuildPermission

        public boolean requiresBuildPermission()
        Checks if access getChoiceList() from REST API needs the Item.BUILD permission. If true this will currently return the choices only for Job based API calls.
        Returns:
        true if allow access to choices only if BUILD permission was granted. false otherwise.
        Since:
        1.8.0