Class StatisticsFieldServiceImpl
java.lang.Object
com.atlassian.greenhopper.service.rapid.view.StatisticsFieldServiceImpl
- All Implemented Interfaces:
GreenHopperCache
,StatisticsFieldService
Default implementation of
StatisticsFieldService
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Invoked when all caches in the plugin need to be cleared.Returns the list ofStatisticsFieldConfig
s which are available to be used in aRapidView
.Returns the list ofStatisticsFieldInstance
s which represent the availableStatisticsFieldConfig
s.Returns the defaultStatisticsFieldConfig
to use.Returns theStatisticsFieldInstance
representing the specifiedStatisticsFieldConfig
.void
init()
void
invalidate
(RapidView rapidView) loadStatisticsField
(RapidView rapidView) loadStatisticsFieldInstance
(RapidView rapidView) updateStatisticsField
(com.atlassian.jira.user.ApplicationUser user, ErrorCollection errors, RapidView rapidView, StatisticsFieldConfig statisticsField) Update the statistics field
-
Field Details
-
ISSUE_COUNT_NAME_KEY
- See Also:
-
ISSUE_COUNT_EXCL_SUBS_NAME_KEY
- See Also:
-
NONE_NAME_KEY
- See Also:
-
-
Constructor Details
-
StatisticsFieldServiceImpl
public StatisticsFieldServiceImpl()
-
-
Method Details
-
init
@PostConstruct public void init() -
updateStatisticsField
public StatisticsFieldConfig updateStatisticsField(com.atlassian.jira.user.ApplicationUser user, ErrorCollection errors, RapidView rapidView, StatisticsFieldConfig statisticsField) Update the statistics field- Specified by:
updateStatisticsField
in interfaceStatisticsFieldService
-
loadStatisticsField
- Specified by:
loadStatisticsField
in interfaceStatisticsFieldService
-
loadStatisticsFieldInstance
- Specified by:
loadStatisticsFieldInstance
in interfaceStatisticsFieldService
-
getDefaultStatisticsFieldConfig
Description copied from interface:StatisticsFieldService
Returns the defaultStatisticsFieldConfig
to use.- Specified by:
getDefaultStatisticsFieldConfig
in interfaceStatisticsFieldService
- Returns:
- the instance
-
getAvailableStatisticsFieldConfigs
Description copied from interface:StatisticsFieldService
Returns the list ofStatisticsFieldConfig
s which are available to be used in aRapidView
.- Specified by:
getAvailableStatisticsFieldConfigs
in interfaceStatisticsFieldService
- Returns:
- the list; never null.
-
getAvailableStatisticsFields
Description copied from interface:StatisticsFieldService
Returns the list ofStatisticsFieldInstance
s which represent the availableStatisticsFieldConfig
s.- Specified by:
getAvailableStatisticsFields
in interfaceStatisticsFieldService
- Returns:
- the list; never null.
- See Also:
-
getInstanceOfField
@Nonnull public ServiceOutcome<StatisticsFieldInstance> getInstanceOfField(StatisticsFieldConfig config) Description copied from interface:StatisticsFieldService
Returns theStatisticsFieldInstance
representing the specifiedStatisticsFieldConfig
. 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 aStatisticsFieldInstance
- that is, it contains only a reference to the config. In addition to this, an error is returned in theServiceOutcome
.- Specified by:
getInstanceOfField
in interfaceStatisticsFieldService
- Parameters:
config
- the configuration to construct the instance from- Returns:
- the result; will always have a
ServiceOutcome.getValue()
, and sometimesServiceOutcome.getErrors()
.
-
invalidate
- Specified by:
invalidate
in interfaceStatisticsFieldService
-
flushCache
public void flushCache()Description copied from interface:GreenHopperCache
Invoked when all caches in the plugin need to be cleared.- Specified by:
flushCache
in interfaceGreenHopperCache
-