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

All Known Implementing Classes:
EstimateStatisticServiceImpl

public interface EstimateStatisticService

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

Since:
v5.9.5

Field Summary
static java.lang.String ORIGINAL_ESTIMATE_FIELD_ID
          The JIRA Field ID that represents OriginalEstimateSystemField when used in a StatisticsFieldConfig.
 
Method Summary
 java.util.List<StatisticsField> getAvailableEstimateStatistics()
          Returns the list of StatisticsFields which represent the available StatisticsFieldConfigs.
 StatisticsField getEstimateStatistic(RapidView rapidView)
          Will always return a StatisticsField, which may or may not be valid.
 ServiceOutcome<StatisticsField> getEstimateStatisticStrict(RapidView rapidView)
          Attempts to get the StatisticsField of a rapid view.
 StatisticsField getInvalidEstimateStatistic(RapidView rapidView)
          Returns a StatisticsField instance which represents an invalid StatisticsFieldConfig.
 boolean isEstimateStatisticFieldAndNotApplicable(StatisticsField estimateStatistic, 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 isEstimateStatisticFieldAndNotApplicable(StatisticsField estimateStatistic, 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 isEstimateStatisticValidAndEnabled(StatisticsField estimateStatistic)
          Is the StatisticsField valid and enabled (i.e.
 ServiceOutcome<java.lang.Void> updateEstimateStatistic(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, StatisticsFieldConfig estimateStatistic)
          Updates the specified rapid view to a new configuration.
 

Field Detail

ORIGINAL_ESTIMATE_FIELD_ID

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

See Also:
Constant Field Values
Method Detail

getAvailableEstimateStatistics

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

Returns:
the list.

updateEstimateStatistic

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

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

getEstimateStatisticStrict

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

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

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

getEstimateStatistic

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

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

getInvalidEstimateStatistic

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

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

isEstimateStatisticFieldAndNotApplicable

boolean isEstimateStatisticFieldAndNotApplicable(StatisticsField estimateStatistic,
                                                 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:
estimateStatistic - the estimate statistic
issue - the issue
Returns:
the result
See Also:
isEstimateStatisticFieldAndNotApplicable(com.atlassian.greenhopper.model.rapid.StatisticsField, Long, String)

isEstimateStatisticFieldAndNotApplicable

boolean isEstimateStatisticFieldAndNotApplicable(StatisticsField estimateStatistic,
                                                 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:
estimateStatistic - the estimate statistic
projectId - the ID of the project
issueTypeId - the ID of the issue type
Returns:
the result
See Also:
isEstimateStatisticFieldAndNotApplicable(StatisticsField, Issue)

isEstimateStatisticValidAndEnabled

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

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


Copyright © 2007-2014 Atlassian. All Rights Reserved.