Class HistoryPageFilter<T>

java.lang.Object
jenkins.widgets.HistoryPageFilter<T>
Type Parameters:
T - typically HistoricalBuild

public class HistoryPageFilter<T> extends Object
History page filter.
Author:
tom.fennelly@gmail.com
  • Field Details

  • Constructor Details

    • HistoryPageFilter

      public HistoryPageFilter(int maxEntries)
      Create a history page filter instance.
      Parameters:
      maxEntries - The max number of entries allowed for the page.
  • Method Details

    • setNewerThan

      public void setNewerThan(Long newerThan)
      Set the 'newerThan' queue ID.
      Parameters:
      newerThan - Queue IDs newer/greater than this queue ID take precedence on this page.
    • setOlderThan

      public void setOlderThan(Long olderThan)
      Set the 'olderThan' queue ID.
      Parameters:
      olderThan - Queue IDs older/less than this queue ID take precedence on this page.
    • setSearchString

      public void setSearchString(@NonNull String searchString)
      Set the search string used to narrow the filtered set of builds.
      Parameters:
      searchString - The search string.
    • setStatuses

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void setStatuses(@NonNull Set<String> statuses)
      Set the build statuses to narrow the filtered set of builds to. A build matching any one of the given statuses is included (i.e. the statuses are OR'd together). Each status is one of the Result names (e.g. SUCCESS, FAILURE), or BUILDING to match builds currently in progress. Queue items don't have a result yet, so they are only included when BUILDING is given.
      Parameters:
      statuses - The statuses to filter by.
    • add

      public void add(@NonNull Iterable<T> runItems)
      Add build items to the History page.
      Parameters:
      runItems - The items to be added. Assumes the items are in descending queue ID order i.e. newest first.
      Since:
      2.17
    • add

      public void add(@NonNull Iterable<T> runItems, @NonNull List<QueueItem> queueItems)
      Add run items and queued items to the History page.
      Parameters:
      runItems - The items to be added. Assumes the items are in descending queue ID order i.e. newest first.
      queueItems - The queue items to be added. Queue items do not need to be sorted.
      Since:
      2.17
    • size

      public int size()