com.atlassian.greenhopper.service.rapid.view
Interface RapidViewService

All Superinterfaces:
GreenHopperCache
All Known Implementing Classes:
RapidViewServiceImpl

public interface RapidViewService
extends GreenHopperCache


Method Summary
 ServiceOutcome<RapidView> copy(com.atlassian.crowd.embedded.api.User user, RapidView sourceRapidView)
          Create a new copy of the specified RapidView entity and store it in the database.
 ServiceOutcome<RapidView> create(com.atlassian.crowd.embedded.api.User user, java.lang.String name, java.lang.Long filterId, RapidViewPreset preset)
          Create a new RapidView entity and store it in the database.
 ServiceOutcome<java.lang.Void> delete(com.atlassian.crowd.embedded.api.User user, java.lang.Long id)
          Delete a rapid view given its ID
 ServiceOutcome<java.util.List<RapidView>> findRapidViewsByName(com.atlassian.crowd.embedded.api.User user, java.lang.String nameQuery)
          Returns all views whose name matches the nameQuery in any part of the name.
 ServiceOutcome<RapidView> getFirstVisibleRapidView(com.atlassian.crowd.embedded.api.User user)
          Get the first visible rapid view for a given user
 ServiceOutcome<RapidView> getRapidView(com.atlassian.crowd.embedded.api.User user, java.lang.Long id)
           
 java.util.List<RapidView> getRapidViews(com.atlassian.crowd.embedded.api.User user, ErrorCollection errors)
           
 ServiceOutcome<java.util.List<RapidView>> getRapidViewsWithOutcome(com.atlassian.crowd.embedded.api.User user)
           
 ServiceOutcome<com.atlassian.jira.issue.fields.CustomField> getSortedByRankField(com.atlassian.crowd.embedded.api.User user, RapidView view)
           
 boolean isSortedByRankField(com.atlassian.crowd.embedded.api.User user, RapidView rapidView)
           
 ServiceOutcome<java.lang.Void> update(com.atlassian.crowd.embedded.api.User user, RapidView view)
          Save a RapidView entity's state to the database.
 ServiceOutcome<java.lang.Void> updateWithOutcome(com.atlassian.crowd.embedded.api.User user, RapidView view)
           
 
Methods inherited from interface com.atlassian.greenhopper.manager.GreenHopperCache
flushCache
 

Method Detail

getRapidView

@NotNull
ServiceOutcome<RapidView> getRapidView(com.atlassian.crowd.embedded.api.User user,
                                               java.lang.Long id)

getRapidViews

java.util.List<RapidView> getRapidViews(com.atlassian.crowd.embedded.api.User user,
                                        ErrorCollection errors)
Returns:
all views the user is allowed to see, or an empty list.

getFirstVisibleRapidView

ServiceOutcome<RapidView> getFirstVisibleRapidView(com.atlassian.crowd.embedded.api.User user)
Get the first visible rapid view for a given user

Parameters:
user - the user in play
Returns:
the first visible rapid view, invalid service outcome otherwise

getRapidViewsWithOutcome

ServiceOutcome<java.util.List<RapidView>> getRapidViewsWithOutcome(com.atlassian.crowd.embedded.api.User user)
Returns:
all views the user is allowed to see, or an empty list.

findRapidViewsByName

@NotNull
ServiceOutcome<java.util.List<RapidView>> findRapidViewsByName(com.atlassian.crowd.embedded.api.User user,
                                                                       @Nullable
                                                                       java.lang.String nameQuery)
Returns all views whose name matches the nameQuery in any part of the name. For example, "green" will match views named "green team" and "blue and green" alike.

Views will be filtered down to those which the user can see.

Parameters:
user - the user performing the search
nameQuery - a part of a view name to match e.g. "green"
Returns:
all views the user is allowed to see, or an empty list.

create

@Transactional
@NotNull
ServiceOutcome<RapidView> create(com.atlassian.crowd.embedded.api.User user,
                                                       java.lang.String name,
                                                       java.lang.Long filterId,
                                                       RapidViewPreset preset)
Create a new RapidView entity and store it in the database.

Parameters:
filterId - : The ID of JIRA's SearchRequest that is to be associated with the new view

copy

@Transactional
ServiceOutcome<RapidView> copy(com.atlassian.crowd.embedded.api.User user,
                                             RapidView sourceRapidView)
Create a new copy of the specified RapidView entity and store it in the database.

Parameters:
user - the user who requested to copy the rapid view
sourceRapidView - the view to copy
Returns:
the copied RapidView

update

@Transactional
ServiceOutcome<java.lang.Void> update(com.atlassian.crowd.embedded.api.User user,
                                                    RapidView view)
Save a RapidView entity's state to the database. The ID must be set.


updateWithOutcome

@Transactional
ServiceOutcome<java.lang.Void> updateWithOutcome(com.atlassian.crowd.embedded.api.User user,
                                                               RapidView view)

isSortedByRankField

boolean isSortedByRankField(com.atlassian.crowd.embedded.api.User user,
                            RapidView rapidView)
Returns:
if the rapidView can be ranked

getSortedByRankField

@NotNull
ServiceOutcome<com.atlassian.jira.issue.fields.CustomField> getSortedByRankField(com.atlassian.crowd.embedded.api.User user,
                                                                                         RapidView view)
Returns:
the rank custom field the board is sorted by, or an error otherwise

delete

@Transactional
ServiceOutcome<java.lang.Void> delete(com.atlassian.crowd.embedded.api.User user,
                                                    java.lang.Long id)
Delete a rapid view given its ID

Returns:
an error collection containing any errors, empty if successful


Copyright © 2007-2013 Atlassian. All Rights Reserved.