Class ValueService
java.lang.Object
io.jenkins.plugins.restlistparam.logic.ValueService
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 Summary
Modifier and TypeMethodDescriptionstatic 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.
-
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 incontext. 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 parametercontext- The job the entries are for, ornulloutside any jobforced- 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
-