com.atlassian.greenhopper.service.statistics
Interface CapacityService2

All Known Implementing Classes:
CapacityService2Impl

public interface CapacityService2

Encapsulates capacity storage Note: All methods expect a boardKey instead of a boardType. While on planning board the two are often the same, the differ in cases where the board has subfilters (e.g. byVersion or byAssignee), plus on the TaskBoard where the column should form part of the boardKey BoardKey therefore is a specific board configuration (breadcrumb filters/ TB + column) for which capacities should be stored


Field Summary
static java.lang.String SERVICE
          Service identifier to be used for dependency injection.
 
Method Summary
 Capacities getCapacities(com.opensymphony.user.User user, XProject xproject, ViewDefinition view, java.lang.String key, ProjectConfiguration configuration)
          Get the capacities object for all currently configured watched fields for a given xproject, view and key // TODO: take out watchedFields parameter, fetch directly from WatchedFieldService
 Capacity getCapacity(com.atlassian.jira.project.Project project, ViewDefinition view, java.lang.String key, WatchedField watchedField)
           
 Capacity getCapacity(XProject xproject, ViewDefinition view, java.lang.String key, WatchedField watchedField)
          Fetch a Capacity object given a xproject and key.
 Capacities getDefaultCapacities(com.opensymphony.user.User user, XProject xproject, ViewDefinition view, ProjectConfiguration configuration)
          Get the default capacities object for a collection of watched fields.
 Capacity getDefaultCapacity(XProject xproject, ViewDefinition view, WatchedField watchedField)
          Fetch a default Capacity object given a xproject
 ErrorCollection removeCapacity(com.opensymphony.user.User user, XProject xproject, ViewDefinition view, java.lang.String key, WatchedField watchedField)
          Removes the capacity for the given xproject, boardType and key.
 ErrorCollection removeDefaultCapacity(com.opensymphony.user.User user, XProject xproject, ViewDefinition view, WatchedField watchedField)
          Removes the default capacity for a given xproject and boardType
 ErrorCollection setCapacity(com.opensymphony.user.User user, XProject xproject, ViewDefinition view, java.lang.String key, WatchedField watchedField, Capacity capacity)
          Update the capacity min/max values with the values currently set in the Capacity object
 ErrorCollection setDefaultCapacity(com.opensymphony.user.User user, XProject xproject, ViewDefinition view, WatchedField watchedField, Capacity capacity)
          Update the default capacity min/max values with the values currently set in the Capacity object
 

Field Detail

SERVICE

static final java.lang.String SERVICE
Service identifier to be used for dependency injection.

See Also:
Constant Field Values
Method Detail

getCapacity

Capacity getCapacity(XProject xproject,
                     ViewDefinition view,
                     java.lang.String key,
                     WatchedField watchedField)
Fetch a Capacity object given a xproject and key.

Parameters:
xproject - the xproject a Capacity is stored against
watchedField - the watched field to get capacity for
key - The key to find capacities for. This is normally the actual board id, but could also be the column id (task board) and would be null for the default capacities.
Returns:
a Capacity object for the given parameters. Never returns null

getCapacity

Capacity getCapacity(com.atlassian.jira.project.Project project,
                     ViewDefinition view,
                     java.lang.String key,
                     WatchedField watchedField)
Parameters:
project - the project a Capacity is stored against
watchedField - the watched field to get capacity for
key - The key to find capacities for. This is normally the actual board id, but could also be the column id (task board) and would be null for the default capacities. The Key passed in is the key used.
Returns:
a Capacity object for the given parameters. Never returns null

getDefaultCapacity

Capacity getDefaultCapacity(XProject xproject,
                            ViewDefinition view,
                            WatchedField watchedField)
Fetch a default Capacity object given a xproject

Parameters:
xproject - the xproject a Capacity is stored against
watchedField - the watched field to get capacity for
Returns:
a Capacity object for the given parameters. Never returns null

setCapacity

ErrorCollection setCapacity(com.opensymphony.user.User user,
                            XProject xproject,
                            ViewDefinition view,
                            java.lang.String key,
                            WatchedField watchedField,
                            Capacity capacity)
Update the capacity min/max values with the values currently set in the Capacity object


setDefaultCapacity

ErrorCollection setDefaultCapacity(com.opensymphony.user.User user,
                                   XProject xproject,
                                   ViewDefinition view,
                                   WatchedField watchedField,
                                   Capacity capacity)
Update the default capacity min/max values with the values currently set in the Capacity object


removeCapacity

ErrorCollection removeCapacity(com.opensymphony.user.User user,
                               XProject xproject,
                               ViewDefinition view,
                               java.lang.String key,
                               WatchedField watchedField)
Removes the capacity for the given xproject, boardType and key.


removeDefaultCapacity

ErrorCollection removeDefaultCapacity(com.opensymphony.user.User user,
                                      XProject xproject,
                                      ViewDefinition view,
                                      WatchedField watchedField)
Removes the default capacity for a given xproject and boardType


getCapacities

Capacities getCapacities(com.opensymphony.user.User user,
                         XProject xproject,
                         ViewDefinition view,
                         java.lang.String key,
                         ProjectConfiguration configuration)
Get the capacities object for all currently configured watched fields for a given xproject, view and key // TODO: take out watchedFields parameter, fetch directly from WatchedFieldService


getDefaultCapacities

Capacities getDefaultCapacities(com.opensymphony.user.User user,
                                XProject xproject,
                                ViewDefinition view,
                                ProjectConfiguration configuration)
Get the default capacities object for a collection of watched fields.



Copyright © 2007-2011 Atlassian. All Rights Reserved.