Class FilterParser.Filter

java.lang.Object
io.jenkins.plugins.batchcontrol.ui.FilterParser.Filter
Enclosing class:
FilterParser

public static final class FilterParser.Filter extends Object
The validated filter. Immutable; date bounds are always present (defaulted), text filters are null when absent.
  • Method Details

    • getFromValue

      public String getFromValue()
    • getToValue

      public String getToValue()
    • getFromError

      @CheckForNull public String getFromError()
      e2e-04 FD-11: the refusal of the from date, or null.
    • getToError

      @CheckForNull public String getToError()
      e2e-04 FD-11: the refusal of the to date (or of a reversed range), or null.
    • isValid

      public boolean isValid()
      Whether both dates were usable; the screen lists nothing otherwise.
    • getFromInput

      public String getFromInput()
      The from field's value for redisplay: what the user entered after a refusal.
    • getToInput

      public String getToInput()
      The to field's value for redisplay: what the user entered after a refusal.
    • getJob

      @CheckForNull public String getJob()
    • getUser

      @CheckForNull public String getUser()
    • getResult

      @CheckForNull public String getResult()
    • getStatus

      @CheckForNull public String getStatus()
    • fromInstant

      public Instant fromInstant()
      Start of the range (inclusive), in the controller zone.
    • toInstantExclusive

      public Instant toInstantExclusive()
      End of the range (exclusive: start of the day after to).
    • months

      public List<YearMonth> months(Collection<YearMonth> stored)
      The months of stored (the store's existing buckets) that the range covers, oldest first. Bounded by what exists, not by the span, so a wide range is cheap.
    • inRange

      public boolean inRange(@CheckForNull Instant at)
      Whether the timestamp lies inside the [from, to] date range; null never matches.
    • matchesJob

      public boolean matchesJob(@CheckForNull String jobFullName)
      Case-insensitive substring match on the job full name (or change target).
    • matchesUser

      public boolean matchesUser(@CheckForNull String userId)
      R4-01: the same user under the realm's user id strategy (Approvers.sameUser(java.lang.String, java.lang.String)).
    • matchesResult

      public boolean matchesResult(@CheckForNull Object recordResult)
      Case-insensitive match on the result token (build result / incident result).
    • matchesStatus

      public boolean matchesStatus(@CheckForNull Object recordStatus)
      Case-insensitive match on the status token (enum name).
    • toQueryString

      public String toQueryString()
      The filter as a URL query fragment (from=...&to=..., plus the optional parameters when present), for paging and CSV export links. Values are URL-encoded.