Class RapidViewManagerImpl
java.lang.Object
com.atlassian.greenhopper.manager.rapidview.RapidViewManagerImpl
- All Implemented Interfaces:
GreenHopperCache
,RapidViewManager
@Service
public class RapidViewManagerImpl
extends Object
implements RapidViewManager, GreenHopperCache
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.greenhopper.manager.rapidview.RapidViewManager
RapidViewManager.RapidViewPermissionCheck
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy
(RapidView sourceRapidView, RapidView destinationRapidView, com.atlassian.jira.user.ApplicationUser creator) Copy the contents of one RapidView into anothercreate
(RapidView view, com.atlassian.jira.user.ApplicationUser user, RapidViewPreset preset) Persist a new instance of a RapidBoardcreate
(com.atlassian.jira.user.ApplicationUser user, String name, Long filterId, RapidViewPreset preset) Persist a new instance of a RapidBoardDelete the RapidView that is associated to the provided RapidViewfind
(RapidViewSimpleQuery rapidViewSimpleQuery) Get a list of all RapidViews which fulfil query constraints.findByFilterId
(long filterId) Get a list of all RapidView objects that are configured to use the filter with the given id.void
Invoked when all caches in the plugin need to be cleared.Get a RapidBoard from cache directlygetAll()
Get a list of all RapidViews that exist, regardless of any security considerations.getAll
(RapidViewManager.RapidViewPermissionCheck permissionCheck) Get a list of all RapidViews that are visible for a permissionCheckgetFirst
(RapidViewManager.RapidViewPermissionCheck permissionCheck) Return the first RapidView found after iterating over the entire list.Update a RapidView associated to the id of the provided RapidView after first checking that it is valid.
-
Constructor Details
-
RapidViewManagerImpl
public RapidViewManagerImpl()
-
-
Method Details
-
create
public ServiceOutcome<RapidView> create(RapidView view, com.atlassian.jira.user.ApplicationUser user, RapidViewPreset preset) Description copied from interface:RapidViewManager
Persist a new instance of a RapidBoard- Specified by:
create
in interfaceRapidViewManager
- Returns:
- the created RapidView from cache or the error that occurred
-
create
public ServiceOutcome<RapidView> create(com.atlassian.jira.user.ApplicationUser user, String name, Long filterId, RapidViewPreset preset) Description copied from interface:RapidViewManager
Persist a new instance of a RapidBoard- Specified by:
create
in interfaceRapidViewManager
- Parameters:
user
- the user who is performing operation and whose permissions are checked. Null means anonymous access.name
- the name of the board.filterId
- the ID of JIRA's SearchRequest that is to be associated with the new view.preset
- the param which determine initial settings of created rapid view.- Returns:
- a created rapid view or error if operation failed.
-
delete
Description copied from interface:RapidViewManager
Delete the RapidView that is associated to the provided RapidView- Specified by:
delete
in interfaceRapidViewManager
- Parameters:
view
- RapidView representing the rapid view to delete- Returns:
- Void or the error that occurred
-
update
Description copied from interface:RapidViewManager
Update a RapidView associated to the id of the provided RapidView after first checking that it is valid.- Specified by:
update
in interfaceRapidViewManager
- Parameters:
view
- RapidView containing the id and updates (over-writing existing values) of the target RapidView- Returns:
- Void or the error that occurred
-
getFirst
public ServiceOutcome<RapidView> getFirst(RapidViewManager.RapidViewPermissionCheck permissionCheck) Description copied from interface:RapidViewManager
Return the first RapidView found after iterating over the entire list.- Specified by:
getFirst
in interfaceRapidViewManager
- Parameters:
permissionCheck
- a permission check to perform to determine whether a RapidBoard should be included- Returns:
- a RapidView that is the first visible RapidView based on the permissionCheck
-
getAll
public ServiceOutcome<List<RapidView>> getAll(RapidViewManager.RapidViewPermissionCheck permissionCheck) Description copied from interface:RapidViewManager
Get a list of all RapidViews that are visible for a permissionCheck- Specified by:
getAll
in interfaceRapidViewManager
- Parameters:
permissionCheck
- a permissionCheck to perform to determine if a RapidView is visible- Returns:
- a list of all visible rapid views
-
getAll
Description copied from interface:RapidViewManager
Get a list of all RapidViews that exist, regardless of any security considerations.- Specified by:
getAll
in interfaceRapidViewManager
- Returns:
- a list of all rapid views
-
find
Description copied from interface:RapidViewManager
Get a list of all RapidViews which fulfil query constraints.- Specified by:
find
in interfaceRapidViewManager
- Parameters:
rapidViewSimpleQuery
- which contains expectation to rapidViews.- Returns:
- a filtered iterable of rapidView.
-
copy
public ServiceOutcome<RapidView> copy(RapidView sourceRapidView, RapidView destinationRapidView, com.atlassian.jira.user.ApplicationUser creator) Description copied from interface:RapidViewManager
Copy the contents of one RapidView into another- Specified by:
copy
in interfaceRapidViewManager
- Parameters:
sourceRapidView
- the RapidView to copydestinationRapidView
- the destination RapidViewcreator
- the user creating this copy- Returns:
- a copied RapidView
-
get
Description copied from interface:RapidViewManager
Get a RapidBoard from cache directly- Specified by:
get
in interfaceRapidViewManager
- Parameters:
id
- the id of the RapidBoard- Returns:
- a Option containing the rapid board which may or may not contain a result
-
findByFilterId
Description copied from interface:RapidViewManager
Get a list of all RapidView objects that are configured to use the filter with the given id.- Specified by:
findByFilterId
in interfaceRapidViewManager
- Parameters:
filterId
- id of the filter- Returns:
- A list of all RapidView objects that are configured to use the filter with the given id.
-
flushCache
public void flushCache()Description copied from interface:GreenHopperCache
Invoked when all caches in the plugin need to be cleared.- Specified by:
flushCache
in interfaceGreenHopperCache
-