com.atlassian.greenhopper.service.backlog
Interface BacklogService

All Known Implementing Classes:
BacklogServiceImpl

public interface BacklogService

Service for Backlog handling

Author:
ahennecke

Field Summary
static java.lang.String SERVICE
           
 
Method Summary
 ErrorCollection archiveBacklog(com.opensymphony.user.User user, Backlog backlog)
          Marks the given Backlog as "archived".
 ErrorCollection completeBacklog(com.opensymphony.user.User user, Backlog backlog)
          Marks the given Backlog as "completed".
 ErrorCollection create(com.opensymphony.user.User user, Backlog backlog)
          Creates the given top level backlog object.
 ErrorCollection create(com.opensymphony.user.User user, Backlog backlog, java.lang.Long parentId)
          Creates the given backlog object as a child of the given parent Backlog.
 void createUnscheduled(XProject xproject)
          Creates the unscheduled backlog for given xproject.
 ErrorCollection delete(com.opensymphony.user.User user, java.lang.Long id)
          Delete the backlog with the given ID
 Backlog get(com.opensymphony.user.User user, java.lang.Long id)
          Get a backlog given its id taking user permissions into account
 java.util.SortedSet<Backlog> getAll(com.opensymphony.user.User user)
          Returns all backlogs a user has access to.
 java.util.SortedSet<Backlog> getBacklogs(com.opensymphony.user.User user, XProject xproject, Backlog.Status... statuses)
          Get all backlogs for a XProject.
 java.util.List<Backlog> getSortedBacklogs(com.opensymphony.user.User user, XProject xproject, Backlog.Status... statuses)
          Get all backlogs for a XProject, sorted respecting the hierarchy order.
 java.util.List<Backlog> getSortedOpenBacklogs(com.opensymphony.user.User user, XProject xproject)
          Get all backlogs for a XProject, sorted respecting the hierarchy order.
 Backlog getUnscheduled(com.opensymphony.user.User user, XProject xproject)
          Gets the "Unscheduled" default backlog for a XProject.
 boolean isAdmin(com.opensymphony.user.User user, Backlog backlog)
          Does the user have project admin rights for the xproject the passed backlog belongs to.
 boolean isBrowsable(com.opensymphony.user.User user, Backlog backlog)
          Is the XProject the passed Backlog belongs to browsable by the user
 ErrorCollection reopenBacklog(com.opensymphony.user.User user, Backlog backlog)
          Reopens the given, completed or archived Backlog.
 ErrorCollection save(com.opensymphony.user.User user, Backlog backlog)
          Updates the given backlog object.
 ErrorCollection save(com.opensymphony.user.User user, Backlog backlog, java.lang.Long parentId)
          Updates the given backlog object.
 

Field Detail

SERVICE

static final java.lang.String SERVICE
See Also:
Constant Field Values
Method Detail

get

Backlog get(com.opensymphony.user.User user,
            java.lang.Long id)
Get a backlog given its id taking user permissions into account

Parameters:
user - the user requesting the backlog
Returns:
Backlog for the given ID, or null if there is none

getBacklogs

java.util.SortedSet<Backlog> getBacklogs(com.opensymphony.user.User user,
                                         XProject xproject,
                                         Backlog.Status... statuses)
Get all backlogs for a XProject.

Parameters:
statuses - : the statuses the result is limited to. If none are given, an empty set is returned.
Returns:
All Backlogs for the project, an empty set if the user does not have access

getSortedOpenBacklogs

java.util.List<Backlog> getSortedOpenBacklogs(com.opensymphony.user.User user,
                                              XProject xproject)
Get all backlogs for a XProject, sorted respecting the hierarchy order. NOTE: does not show completed backlogs

Parameters:
user - the user requesting the backlogs
Returns:
All Backlogs for the project, an empty set if the user does not have access

getSortedBacklogs

java.util.List<Backlog> getSortedBacklogs(com.opensymphony.user.User user,
                                          XProject xproject,
                                          Backlog.Status... statuses)
Get all backlogs for a XProject, sorted respecting the hierarchy order.

Parameters:
user - the user requesting the backlogs
statuses - : the statuses the result is limited to. If none are given, an empty set is returned.
Returns:
All Backlogs for the project, an empty set if the user does not have access

getUnscheduled

Backlog getUnscheduled(com.opensymphony.user.User user,
                       XProject xproject)
Gets the "Unscheduled" default backlog for a XProject. This is the one issues are associated to by default.

Parameters:
user - the user requesting the backlog
Returns:
The unscheduled Backlog or null if the user does not have access
Throws:
BacklogStateInconsistenException - if none or more than one default backlogs were found

create

ErrorCollection create(com.opensymphony.user.User user,
                       Backlog backlog)
Creates the given top level backlog object. It will have an ID assigned afterwards.

Returns:
ErrorCollection with error messages, if there were any

create

ErrorCollection create(com.opensymphony.user.User user,
                       Backlog backlog,
                       java.lang.Long parentId)
Creates the given backlog object as a child of the given parent Backlog. It will have an ID assigned afterwards. If the parentId is null, a top level backlog will be created.

Returns:
ErrorCollection with error messages, if there were any

createUnscheduled

void createUnscheduled(XProject xproject)
Creates the unscheduled backlog for given xproject. It will have an ID assigned afterwards.


save

ErrorCollection save(com.opensymphony.user.User user,
                     Backlog backlog)
Updates the given backlog object. The ID of the backlog object should exist already. No Hierarchy information is saved.

Returns:
ErrorCollection with error messages, if there were any

save

ErrorCollection save(com.opensymphony.user.User user,
                     Backlog backlog,
                     java.lang.Long parentId)
Updates the given backlog object. The ID of the backlog object should exist already. If the parentId is null, the backlog will be set to be a top level backlog.

Returns:
ErrorCollection with error messages, if there were any

delete

ErrorCollection delete(com.opensymphony.user.User user,
                       java.lang.Long id)
Delete the backlog with the given ID

Returns:
ErrorCollection with error messages, if there were any

getAll

java.util.SortedSet<Backlog> getAll(com.opensymphony.user.User user)
Returns all backlogs a user has access to. This will search all XProjects to which a user has browse access to (the user therefore needs browse permission for at least one of the projects contained in the XProject) and returns all backlogs contained in them. If none can be found, an empty set is returned.


isBrowsable

boolean isBrowsable(com.opensymphony.user.User user,
                    Backlog backlog)
Is the XProject the passed Backlog belongs to browsable by the user


isAdmin

boolean isAdmin(com.opensymphony.user.User user,
                Backlog backlog)
Does the user have project admin rights for the xproject the passed backlog belongs to.


completeBacklog

ErrorCollection completeBacklog(com.opensymphony.user.User user,
                                Backlog backlog)
Marks the given Backlog as "completed". Backlogs marked as this can't be edited anymore, but still show up in statistics.


archiveBacklog

ErrorCollection archiveBacklog(com.opensymphony.user.User user,
                               Backlog backlog)
Marks the given Backlog as "archived". Backlogs marked as this aren't used anymore in GreenHopper.


reopenBacklog

ErrorCollection reopenBacklog(com.opensymphony.user.User user,
                              Backlog backlog)
Reopens the given, completed or archived Backlog.



Copyright © 2007-2011 Atlassian. All Rights Reserved.