com.atlassian.greenhopper.service.rapid.view.statistics
Interface TrackingStatisticService

All Known Implementing Classes:
TrackingStatisticServiceImpl

public interface TrackingStatisticService

Service for accessing StatisticsFieldConfig and StatisticsField objects relating to the Tracking Statistic(s) of a RapidView.

Since:
v5.9.8

Field Summary
static java.lang.String REMAINING_ESTIMATE_FIELD_ID
          The JIRA Field ID that represents TimeEstimateSystemField when used in a StatisticsFieldConfig.
 
Method Summary
 java.util.List<StatisticsField> getAvailableTrackingStatistics()
          Returns the list of StatisticsFields which represent the available StatisticsFieldConfigs.
 StatisticsField getInvalidTrackingStatistic(RapidView rapidView)
          Returns a StatisticsField instance which represents an invalid StatisticsFieldConfig.
 StatisticsField getTrackingStatistic(RapidView rapidView)
          Will always return a StatisticsField, which may or may not be valid.
 ServiceOutcome<StatisticsField> getTrackingStatisticStrict(RapidView rapidView)
          Attempts to get the StatisticsField of a rapid view.
 boolean isRemainingEstimateStatisticsField(StatisticsField statisticsField)
          Is the passed StatisticsField of type remaining estimate?
 boolean isTrackingStatisticFieldAndNotApplicable(StatisticsField trackingStatistic, com.atlassian.jira.issue.Issue issue)
          Is the StatisticsField field based but not applicable for the given issue? (Due to Custom Field configuration contexts, for example.)
 boolean isTrackingStatisticFieldAndNotApplicable(StatisticsField trackingStatistic, java.lang.Long projectId, java.lang.String issueTypeId)
          Is the StatisticsField field based but not applicable for the given project and issue type? (Due to Custom Field configuration contexts, for example.)
 boolean isTrackingStatisticValidAndEnabled(StatisticsField trackingStatistic)
          Is the StatisticsField valid and enabled (i.e.
 ServiceOutcome<java.lang.Void> updateTrackingStatistic(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, StatisticsFieldConfig trackingStatistic)
          Updates the specified rapid view to a new configuration.
 

Field Detail

REMAINING_ESTIMATE_FIELD_ID

static final java.lang.String REMAINING_ESTIMATE_FIELD_ID
The JIRA Field ID that represents TimeEstimateSystemField when used in a StatisticsFieldConfig.

See Also:
Constant Field Values
Method Detail

getAvailableTrackingStatistics

@NotNull
java.util.List<StatisticsField> getAvailableTrackingStatistics()
Returns the list of StatisticsFields which represent the available StatisticsFieldConfigs.

Returns:
the list.

updateTrackingStatistic

@NotNull
ServiceOutcome<java.lang.Void> updateTrackingStatistic(com.atlassian.crowd.embedded.api.User user,
                                                               @NotNull
                                                               RapidView rapidView,
                                                               @NotNull
                                                               StatisticsFieldConfig trackingStatistic)
Updates the specified rapid view to a new configuration.

Parameters:
user - the user
rapidView - the rapid view
trackingStatistic - the new configuration
Returns:
the outcome; possibly with errors

getTrackingStatisticStrict

@NotNull
ServiceOutcome<StatisticsField> getTrackingStatisticStrict(@NotNull
                                                                   RapidView rapidView)
Attempts to get the StatisticsField of a rapid view. Outcome will contain errors if the configured tracking statistic is invalid. You may wish to call getInvalidTrackingStatistic(com.atlassian.greenhopper.model.rapid.RapidView) in that case.

If you just want either the valid or invalid StatisticsField to be returned, call getTrackingStatistic(com.atlassian.greenhopper.model.rapid.RapidView).

Parameters:
rapidView - the rapid view
Returns:
strict outcome of valid statistics field; or errors
See Also:
getInvalidTrackingStatistic(com.atlassian.greenhopper.model.rapid.RapidView), getTrackingStatistic(com.atlassian.greenhopper.model.rapid.RapidView)

getTrackingStatistic

@NotNull
StatisticsField getTrackingStatistic(@NotNull
                                             RapidView rapidView)
Will always return a StatisticsField, which may or may not be valid.

Parameters:
rapidView - the rapid view
Returns:
the statistic field

getInvalidTrackingStatistic

@NotNull
StatisticsField getInvalidTrackingStatistic(@NotNull
                                                    RapidView rapidView)
Returns a StatisticsField instance which represents an invalid StatisticsFieldConfig. This only really makes sense to call if you have previously called getTrackingStatisticStrict(com.atlassian.greenhopper.model.rapid.RapidView) and were returned errors.

Parameters:
rapidView - the rapid view
Returns:
the invalid instance representing the configuration

isTrackingStatisticFieldAndNotApplicable

boolean isTrackingStatisticFieldAndNotApplicable(StatisticsField trackingStatistic,
                                                 com.atlassian.jira.issue.Issue issue)
Is the StatisticsField field based but not applicable for the given issue? (Due to Custom Field configuration contexts, for example.)

Parameters:
trackingStatistic - the tracking statistic
issue - the issue
Returns:
the result
See Also:
isTrackingStatisticFieldAndNotApplicable(com.atlassian.greenhopper.model.rapid.StatisticsField, Long, String)

isTrackingStatisticFieldAndNotApplicable

boolean isTrackingStatisticFieldAndNotApplicable(StatisticsField trackingStatistic,
                                                 java.lang.Long projectId,
                                                 java.lang.String issueTypeId)
Is the StatisticsField field based but not applicable for the given project and issue type? (Due to Custom Field configuration contexts, for example.)

Parameters:
trackingStatistic - the tracking statistic
projectId - the ID of the project
issueTypeId - the ID of the issue type
Returns:
the result
See Also:
isTrackingStatisticFieldAndNotApplicable(StatisticsField, Issue)

isTrackingStatisticValidAndEnabled

boolean isTrackingStatisticValidAndEnabled(StatisticsField trackingStatistic)
Is the StatisticsField valid and enabled (i.e. should it take part in accumulating statistics over issues)?

Parameters:
trackingStatistic - the tracking statistic
Returns:
the result
See Also:
StatisticsField.isValid(), StatisticsField.isEnabled()

isRemainingEstimateStatisticsField

boolean isRemainingEstimateStatisticsField(StatisticsField statisticsField)
Is the passed StatisticsField of type remaining estimate?



Copyright © 2007-2013 Atlassian. All Rights Reserved.