Package com.atlassian.bamboo.quickfilter
Class QuickFilterManagerImpl
- java.lang.Object
-
- com.atlassian.bamboo.quickfilter.QuickFilterManagerImpl
-
- All Implemented Interfaces:
QuickFilterManager
@ThreadSafe public class QuickFilterManagerImpl extends Object implements QuickFilterManager
-
-
Constructor Summary
Constructors Constructor Description QuickFilterManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreate(@NotNull QuickFilter quickFilter)Creates a new quick filter.voiddelete(@NotNull QuickFilter quickFilter)Delete an existing quick filter.<T extends ImmutableTopLevelPlan>
Iterable<T>filter(@NotNull Iterable<T> plans, @NotNull QuickFilter quickFilter)Filter given plans, returning only those that match the specified quick filter.@NotNull List<QuickFilter>findAll()Retrieves allquick filtersordered by theirposition.@Nullable QuickFilterfindById(long id)Retrieves aQuickFilterby it's id.voidupdate(@NotNull QuickFilter quickFilter, int previousPosition)Updates a quick filter.@NotNull ErrorCollectionvalidate(@NotNull QuickFilter quickFilter)Validates the given quick filter.
-
-
-
Method Detail
-
findAll
@NotNull public @NotNull List<QuickFilter> findAll()
Description copied from interface:QuickFilterManagerRetrieves allquick filtersordered by theirposition.- Specified by:
findAllin interfaceQuickFilterManager- Returns:
- ordered list of all quick filters
-
findById
@Nullable public @Nullable QuickFilter findById(long id)
Description copied from interface:QuickFilterManagerRetrieves aQuickFilterby it's id.- Specified by:
findByIdin interfaceQuickFilterManager- Parameters:
id- id of the quick filter- Returns:
- quick filter or null, if it wasn't found
-
validate
@NotNull public @NotNull ErrorCollection validate(@NotNull @NotNull QuickFilter quickFilter)
Description copied from interface:QuickFilterManagerValidates the given quick filter. Will not validate rules.- Specified by:
validatein interfaceQuickFilterManager- Parameters:
quickFilter- filter to validate- Returns:
- validation error collection - empty, if validation was successful
-
create
public void create(@NotNull @NotNull QuickFilter quickFilter)Description copied from interface:QuickFilterManagerCreates 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.- Specified by:
createin interfaceQuickFilterManager- Parameters:
quickFilter- quick filter to create, with or without defined position.
-
update
public void update(@NotNull @NotNull QuickFilter quickFilter, int previousPosition)Description copied from interface:QuickFilterManagerUpdates a quick filter. After the update, other persisted quick filters will be repositioned if necessary. Quick filter rules will not be updated.- Specified by:
updatein interfaceQuickFilterManager- Parameters:
quickFilter- quick filter to updatepreviousPosition- previous position of the quick filter
-
delete
public void delete(@NotNull @NotNull QuickFilter quickFilter)Description copied from interface:QuickFilterManagerDelete an existing quick filter. After the update, other persisted quick filters will be repositioned if necessary.- Specified by:
deletein interfaceQuickFilterManager- Parameters:
quickFilter- quick filter to delete
-
filter
public <T extends ImmutableTopLevelPlan> Iterable<T> filter(@NotNull @NotNull Iterable<T> plans, @NotNull @NotNull QuickFilter quickFilter)
Description copied from interface:QuickFilterManagerFilter given plans, returning only those that match the specified quick filter.- Specified by:
filterin interfaceQuickFilterManager
-
-