Class ContainerFilter

java.lang.Object
io.jenkins.blueocean.service.embedded.rest.ContainerFilter
All Implemented Interfaces:
ExtensionPoint

public abstract class ContainerFilter extends Object implements ExtensionPoint
Simple extension point to allow filtering item types by a specific key This can be used anywhere a list of items are returned, and it will examine the current request for a ?filter=filter1(param:value),filter2 parameter, okay the last bit is a future addition once/if OmniSearch and this are consolidated
  • Constructor Details

    • ContainerFilter

      public ContainerFilter()
  • Method Details

    • getName

      public abstract String getName()
      Name to match
    • getFilter

      public abstract Predicate<Item> getFilter()
      Predicate to filter items
    • filter

      public static <T extends Item> Collection<T> filter(Collection<T> items)
      Filters the item list based on the current StaplerRequest
    • filter

      public static <T extends Item> Collection<T> filter(Collection<T> items, String... filterNames)
      Filters the item list based on the supplied filter name
    • filter

      public static <T extends Item> Collection<T> filter(Collection<T> items, int start, int limit)
      Filter items based on supplied filter and paging criteria
    • getItemFilter

      public static Predicate<Item> getItemFilter(String filterName)
      Finds a item filter by name