Class RapidViewServiceImpl
java.lang.Object
com.atlassian.greenhopper.service.rapid.view.RapidViewServiceImpl
- All Implemented Interfaces:
RapidViewService
@ParametersAreNonnullByDefault
public class RapidViewServiceImpl
extends Object
implements RapidViewService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a new copy of the specifiedRapidView
entity and store it in the database.create
(com.atlassian.jira.user.ApplicationUser user, String name, Long savedFilterId, RapidViewPreset preset) Create a newRapidView
entity and store it in the database.Delete a rapid view given its ID.getFirstVisibleRapidView
(com.atlassian.jira.user.ApplicationUser user) Get the first visible rapid view for a given usergetRapidView
(com.atlassian.jira.user.ApplicationUser user, Long rapidViewId) Get a rapid view given its id.getRapidViews
(com.atlassian.jira.user.ApplicationUser user) getRapidViews
(com.atlassian.jira.user.ApplicationUser user, PageRequest pageRequest, RapidViewQuery query) Save aRapidView
entity's state to the database.
-
Constructor Details
-
RapidViewServiceImpl
public RapidViewServiceImpl()
-
-
Method Details
-
create
@Nonnull public ServiceOutcome<RapidView> create(@Nullable com.atlassian.jira.user.ApplicationUser user, String name, Long savedFilterId, RapidViewPreset preset) Description copied from interface:RapidViewService
Create a newRapidView
entity and store it in the database. PublishesBoardCreatedEvent
.- Specified by:
create
in interfaceRapidViewService
- Parameters:
user
- the user who is performing operation and whose permissions are checked. Null means anonymous access.name
- the name of the board.savedFilterId
- 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.
-
copy
@Nonnull public ServiceOutcome<RapidView> copy(@Nullable com.atlassian.jira.user.ApplicationUser user, RapidView sourceRapidView) Description copied from interface:RapidViewService
Create a new copy of the specifiedRapidView
entity and store it in the database. PublishesBoardCreatedEvent
.- Specified by:
copy
in interfaceRapidViewService
- Parameters:
user
- the user who is performing operation and whose permissions are checked. Null means anonymous access.sourceRapidView
- the view to copy- Returns:
- the copied
RapidView
or error if operation failed.
-
update
@Nonnull public ServiceResult update(@Nullable com.atlassian.jira.user.ApplicationUser user, RapidView rapidView) Description copied from interface:RapidViewService
Save aRapidView
entity's state to the database. The ID must be set. PublishesBoardUpdatedEvent
.- Specified by:
update
in interfaceRapidViewService
- Parameters:
user
- the user who is performing operation and whose permissions are checked. Null means anonymous access.rapidView
- the rapid view which will be updated. Which rapid view will be updated is determined by its id.- Returns:
- a service result which is either valid or contains error messages.
-
delete
@Nonnull public ServiceResult delete(@Nullable com.atlassian.jira.user.ApplicationUser user, RapidView rapidView) Description copied from interface:RapidViewService
Delete a rapid view given its ID. PublishesBoardDeletedEvent
.- Specified by:
delete
in interfaceRapidViewService
- Parameters:
user
- the user who is performing operation and whose permissions are checked. Null means anonymous access.rapidView
- the rapid view which will be deleted.- Returns:
- a service result which is either valid or contains error messages.
-
getFirstVisibleRapidView
@Nonnull public ServiceOutcome<RapidView> getFirstVisibleRapidView(@Nullable com.atlassian.jira.user.ApplicationUser user) Description copied from interface:RapidViewService
Get the first visible rapid view for a given user- Specified by:
getFirstVisibleRapidView
in interfaceRapidViewService
- Parameters:
user
- the user who is performing operation and whose permissions are checked. Null means anonymous access.- Returns:
- the first visible rapid view or error if operation failed.
-
getRapidViews
@Nonnull public ServiceOutcome<List<RapidView>> getRapidViews(@Nullable com.atlassian.jira.user.ApplicationUser user) - Specified by:
getRapidViews
in interfaceRapidViewService
- Parameters:
user
- the user who is performing operation and whose permissions are checked. Null means anonymous access.- Returns:
- all views the user is allowed to see or error if operation failed.
-
getRapidViews
@Nonnull public ServiceOutcome<Page<RapidView>> getRapidViews(@Nullable com.atlassian.jira.user.ApplicationUser user, PageRequest pageRequest, RapidViewQuery query) - Specified by:
getRapidViews
in interfaceRapidViewService
- Parameters:
user
- the user who is performing operation and whose permissions are checked. Null means anonymous access.pageRequest
- information about the desired number of results and theirs offset.query
- query which limit the result only to these boards which fulfil its constraints.- Returns:
- a page of found rapid views or error if operation failed.
-
getRapidView
@Nonnull public ServiceOutcome<RapidView> getRapidView(@Nullable com.atlassian.jira.user.ApplicationUser user, @Nullable Long rapidViewId) Description copied from interface:RapidViewService
Get a rapid view given its id.- Specified by:
getRapidView
in interfaceRapidViewService
- Parameters:
user
- the user who is performing operation and whose permissions are checked. Null means anonymous access.rapidViewId
- the id of the requested rapid view- Returns:
- the requested rapid view or error if operation failed.
-