com.atlassian.greenhopper.service.rapid.view
Class StatisticsFieldServiceImpl

java.lang.Object
  extended by com.atlassian.greenhopper.global.AbstractLoggable
      extended by com.atlassian.greenhopper.service.rapid.view.StatisticsFieldServiceImpl
All Implemented Interfaces:
StatisticsFieldService

@Service
public class StatisticsFieldServiceImpl
extends AbstractLoggable
implements StatisticsFieldService

Default implementation of StatisticsFieldService.


Field Summary
static java.lang.String ISSUE_COUNT_NAME_KEY
           
static java.lang.String NONE_NAME_KEY
           
 
Fields inherited from class com.atlassian.greenhopper.global.AbstractLoggable
logger
 
Constructor Summary
StatisticsFieldServiceImpl()
           
 
Method Summary
 void flushCache()
           
 java.util.List<StatisticsFieldConfig> getAvailableStatisticsFieldConfigs()
          Returns the list of StatisticsFieldConfigs which are available to be used in a RapidView.
 java.util.List<StatisticsFieldInstance> getAvailableStatisticsFields()
          Returns the list of StatisticsFieldInstances which represent the available StatisticsFieldConfigs.
 StatisticsFieldConfig getDefaultStatisticsFieldConfig()
          Returns the default StatisticsFieldConfig to use.
 ServiceOutcome<StatisticsFieldInstance> getInstanceOfField(StatisticsFieldConfig config)
          Returns the StatisticsFieldInstance representing the specified StatisticsFieldConfig.
 void invalidate(RapidView rapidView)
           
 ServiceOutcome<StatisticsFieldConfig> loadStatisticsField(RapidView rapidView)
           
 ServiceOutcome<StatisticsFieldInstance> loadStatisticsFieldInstance(RapidView rapidView)
           
 StatisticsFieldConfig updateStatisticsField(com.atlassian.crowd.embedded.api.User user, ErrorCollection errors, RapidView rapidView, StatisticsFieldConfig statisticsField)
          Update the statistics field
 
Methods inherited from class com.atlassian.greenhopper.global.AbstractLoggable
logDebug, logError, logException, logInfo, logTrace, logWarn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ISSUE_COUNT_NAME_KEY

public static final java.lang.String ISSUE_COUNT_NAME_KEY
See Also:
Constant Field Values

NONE_NAME_KEY

public static final java.lang.String NONE_NAME_KEY
See Also:
Constant Field Values
Constructor Detail

StatisticsFieldServiceImpl

public StatisticsFieldServiceImpl()
Method Detail

updateStatisticsField

public StatisticsFieldConfig updateStatisticsField(com.atlassian.crowd.embedded.api.User user,
                                                   ErrorCollection errors,
                                                   RapidView rapidView,
                                                   StatisticsFieldConfig statisticsField)
Update the statistics field

Specified by:
updateStatisticsField in interface StatisticsFieldService

loadStatisticsField

public ServiceOutcome<StatisticsFieldConfig> loadStatisticsField(RapidView rapidView)
Specified by:
loadStatisticsField in interface StatisticsFieldService

loadStatisticsFieldInstance

public ServiceOutcome<StatisticsFieldInstance> loadStatisticsFieldInstance(RapidView rapidView)
Specified by:
loadStatisticsFieldInstance in interface StatisticsFieldService

getDefaultStatisticsFieldConfig

public StatisticsFieldConfig getDefaultStatisticsFieldConfig()
Description copied from interface: StatisticsFieldService
Returns the default StatisticsFieldConfig to use.

Specified by:
getDefaultStatisticsFieldConfig in interface StatisticsFieldService
Returns:
the instance

getAvailableStatisticsFieldConfigs

public java.util.List<StatisticsFieldConfig> getAvailableStatisticsFieldConfigs()
Description copied from interface: StatisticsFieldService
Returns the list of StatisticsFieldConfigs which are available to be used in a RapidView.

Specified by:
getAvailableStatisticsFieldConfigs in interface StatisticsFieldService
Returns:
the list; never null.

getAvailableStatisticsFields

public java.util.List<StatisticsFieldInstance> getAvailableStatisticsFields()
Description copied from interface: StatisticsFieldService
Returns the list of StatisticsFieldInstances which represent the available StatisticsFieldConfigs.

Specified by:
getAvailableStatisticsFields in interface StatisticsFieldService
Returns:
the list; never null.
See Also:
StatisticsFieldService.getAvailableStatisticsFieldConfigs()

getInstanceOfField

@NotNull
public ServiceOutcome<StatisticsFieldInstance> getInstanceOfField(StatisticsFieldConfig config)
Description copied from interface: StatisticsFieldService
Returns the StatisticsFieldInstance representing the specified StatisticsFieldConfig. If the config is somehow invalid, for example if the field in the config refers to a non-existent field, an instance will still be returned which is the minimal implementation of a StatisticsFieldInstance - that is, it contains only a reference to the config. In addition to this, an error is returned in the ServiceOutcome.

Specified by:
getInstanceOfField in interface StatisticsFieldService
Parameters:
config - the configuration to construct the instance from
Returns:
the result; will always have a ServiceOutcome.getValue(), and sometimes ServiceOutcome.getErrors().

invalidate

public void invalidate(RapidView rapidView)
Specified by:
invalidate in interface StatisticsFieldService

flushCache

public void flushCache()
Specified by:
flushCache in interface StatisticsFieldService


Copyright © 2007-2012 Atlassian. All Rights Reserved.