com.atlassian.greenhopper.model.rapid
Interface StatisticsField

All Known Implementing Classes:
StatisticsFieldInstance

public interface StatisticsField

Represents an instance of a StatisticsFieldConfig for a RapidView. This should be used when "resolving" the configuration of the Statistics Field in a request which requires real knowledge of how that configuration works at run-time. Specifically, if a StatisticsFieldConfig has type StatisticsFieldConfig.Type.JIRA_FIELD, the configuration will only tell you the ID of the field used, but this object will allow you to resolve the proper name of that configuration, provided that the field is still around at this point.

If this instance refers to a configuration which is now invalid isValid() will be false.

See Also:
StatisticsFieldService, EstimateStatisticService, StatisticsFieldConfig

Method Summary
 StatisticsFieldConfig getConfig()
          Returns the configuration associated with this instance.
 java.lang.String getDisplayName(I18n2 i18n)
          Get the display name of this instance
 java.lang.String getDocumentId()
          Note: behaviour is only determined for this method when isValid() is true.
 com.atlassian.jira.issue.fields.Field getField()
          Returns the field that the configuration refers to, if it is still available at this time.
 boolean isEnabled()
          Note: this method cannot return true if isValid() is false.
 boolean isFieldBased()
           
 boolean isValid()
           
 

Method Detail

getConfig

StatisticsFieldConfig getConfig()
Returns the configuration associated with this instance.

Returns:
the config; never null.

getDisplayName

java.lang.String getDisplayName(I18n2 i18n)
Get the display name of this instance

Parameters:
i18n - the i18n bean
Returns:
the name; possibly blank

isFieldBased

boolean isFieldBased()
Returns:
Does this statistic field use a field

getField

com.atlassian.jira.issue.fields.Field getField()
Returns the field that the configuration refers to, if it is still available at this time.

Returns:
the field; null if there is no field for the configuration or it is not available.

isValid

boolean isValid()
Returns:
does this instance refer to a valid configuration?

isEnabled

boolean isEnabled()
Note: this method cannot return true if isValid() is false.

Returns:
does this configuration refer to a Statistic for which there is "work to be done".

getDocumentId

java.lang.String getDocumentId()
Note: behaviour is only determined for this method when isValid() is true.

Returns:
the ID by which this field is referred to in Lucene documents.


Copyright © 2007-2013 Atlassian. All Rights Reserved.