Class ValueService

java.lang.Object
io.jenkins.plugins.restlistparam.logic.ValueService

public final class ValueService extends Object
The one way to get a parameter's entries, used by the build form, submission-time validation and the deprecated AbstractRestListParameterDefinition.getValues(). It never writes to the definition.
  • Method Details

    • entries

      public static ResultContainer<List<ValueItem>> entries(AbstractRestListParameterDefinition definition, Item context, boolean forced)
      Returns the parameter's entries from the value cache while they are fresh, and fetches them otherwise. Credentials and custom headers are resolved in context. Only successful fetches are cached, and only when the parameter's cache time is greater than 0. An empty result is a success when the parameter allows an empty value.
      Parameters:
      definition - The parameter
      context - The job the entries are for, or null outside any job
      forced - Whether to skip the value cache and the HTTP response cache and contact the endpoint
      Returns:
      The entries, or the error message and, for a failed fetch, its request metadata