Interface QuickFilterManager

All Known Implementing Classes:
QuickFilterManagerImpl

@ThreadSafe public interface QuickFilterManager
A manager for quick filters.
  • Method Details

    • findAll

      @NotNull @NotNull List<QuickFilter> findAll()
      Retrieves all quick filters ordered by their position.
      Returns:
      ordered list of all quick filters
    • findById

      @Nullable @Nullable QuickFilter findById(long id)
      Retrieves a QuickFilter by it's id.
      Parameters:
      id - id of the quick filter
      Returns:
      quick filter or null, if it wasn't found
    • validate

      @NotNull @NotNull ErrorCollection validate(@NotNull @NotNull QuickFilter quickFilter)
      Validates the given quick filter. Will not validate rules.
      Parameters:
      quickFilter - filter to validate
      Returns:
      validation error collection - empty, if validation was successful
    • create

      void create(@NotNull @NotNull QuickFilter quickFilter)
      Creates a new quick filter. If the quick filter doesn't have a position defined, it will be assigned one. If instead it has a position defined, then other persisted quick filters will be repositioned to maintain integrity.
      Parameters:
      quickFilter - quick filter to create, with or without defined position.
    • update

      void update(@NotNull @NotNull QuickFilter quickFilter, int previousPosition)
      Updates a quick filter. After the update, other persisted quick filters will be repositioned if necessary. Quick filter rules will not be updated.
      Parameters:
      quickFilter - quick filter to update
      previousPosition - previous position of the quick filter
    • delete

      void delete(@NotNull @NotNull QuickFilter quickFilter)
      Delete an existing quick filter. After the update, other persisted quick filters will be repositioned if necessary.
      Parameters:
      quickFilter - quick filter to delete
    • filter

      <T extends ImmutableTopLevelPlan> Iterable<T> filter(@NotNull @NotNull Iterable<T> plans, @NotNull @NotNull QuickFilter quickFilter)
      Filter given plans, returning only those that match the specified quick filter.