Package com.atlassian.bamboo.quickfilter
Class QuickFilterManagerImpl
java.lang.Object
com.atlassian.bamboo.quickfilter.QuickFilterManagerImpl
- All Implemented Interfaces:
QuickFilterManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
create
(@NotNull QuickFilter quickFilter) Creates a new quick filter.void
delete
(@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 filters
ordered by theirposition
.@Nullable QuickFilter
findById
(long id) Retrieves aQuickFilter
by it's id.void
update
(@NotNull QuickFilter quickFilter, int previousPosition) Updates a quick filter.@NotNull ErrorCollection
validate
(@NotNull QuickFilter quickFilter) Validates the given quick filter.
-
Constructor Details
-
QuickFilterManagerImpl
public QuickFilterManagerImpl()
-
-
Method Details
-
findAll
Description copied from interface:QuickFilterManager
Retrieves allquick filters
ordered by theirposition
.- Specified by:
findAll
in interfaceQuickFilterManager
- Returns:
- ordered list of all quick filters
-
findById
Description copied from interface:QuickFilterManager
Retrieves aQuickFilter
by it's id.- Specified by:
findById
in interfaceQuickFilterManager
- Parameters:
id
- id of the quick filter- Returns:
- quick filter or null, if it wasn't found
-
validate
Description copied from interface:QuickFilterManager
Validates the given quick filter. Will not validate rules.- Specified by:
validate
in interfaceQuickFilterManager
- Parameters:
quickFilter
- filter to validate- Returns:
- validation error collection - empty, if validation was successful
-
create
Description copied from interface:QuickFilterManager
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.- Specified by:
create
in interfaceQuickFilterManager
- Parameters:
quickFilter
- quick filter to create, with or without defined position.
-
update
Description copied from interface:QuickFilterManager
Updates a quick filter. After the update, other persisted quick filters will be repositioned if necessary. Quick filter rules will not be updated.- Specified by:
update
in interfaceQuickFilterManager
- Parameters:
quickFilter
- quick filter to updatepreviousPosition
- previous position of the quick filter
-
delete
Description copied from interface:QuickFilterManager
Delete an existing quick filter. After the update, other persisted quick filters will be repositioned if necessary.- Specified by:
delete
in 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:QuickFilterManager
Filter given plans, returning only those that match the specified quick filter.- Specified by:
filter
in interfaceQuickFilterManager
-