Class FilterOptions

java.lang.Object
io.jenkins.plugins.batchcontrol.ui.FilterOptions

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public final class FilterOptions extends Object
#18.3 (Wave D, D2): the options of the History filter's Result and Status dropdowns. The first option is "Any" (empty value, no filter); the others are the enum or result names, so the URL, bookmarks and FilterParser tokens are unchanged, labelled with StatusLabels.

The current token selects the option it names (case-insensitively, as FilterParser.Filter.matchesResult(java.lang.Object) and FilterParser.Filter.matchesStatus(java.lang.Object) compare). A value from a hand-edited URL that names no option is kept as one extra, selected option whose value and text are that value (SPEC 6: the user's input is kept); the view escapes both. A value that is not a token at all (FilterParser ignores it, so it filters nothing) is kept the same way, as typed, and the view says that it is not applied.

  • Method Details

    • results

      public static List<FilterOptions.Option> results(@CheckForNull String current, @CheckForNull String ignored)
      The Result dropdown of the runs: Any, then every build result.
    • incidentResults

      public static List<FilterOptions.Option> incidentResults(@CheckForNull String current, @CheckForNull String ignored)
      The Result dropdown of the incidents: Any, then only the results that can open an incident (StatusLabels.incidentResultNames()), whatever incidentResults holds today. A typed result outside that list (SUCCESS, NOT_BUILT) is kept as the extra, selected option.
    • incidentStatuses

      public static List<FilterOptions.Option> incidentStatuses(@CheckForNull String current, @CheckForNull String ignored)
      The Status dropdown of the incidents: Any, then every incident status.
    • runRequestStatuses

      public static List<FilterOptions.Option> runRequestStatuses(@CheckForNull String current, @CheckForNull String ignored)
      The Status dropdown of the run requests: Any, then every request status.