com.atlassian.jira.project.statistics.type
Class AbstractStatisticType

java.lang.Object
  extended bycom.atlassian.jira.project.statistics.type.AbstractStatisticType
All Implemented Interfaces:
java.util.Comparator, StatisticType
Direct Known Subclasses:
AbstractFieldStatisticType, AbstractOpenByStatisticType

public abstract class AbstractStatisticType
extends java.lang.Object
implements StatisticType


Field Summary
 
Fields inherited from interface com.atlassian.jira.project.statistics.StatisticType
OPEN_BY_AFFECTED_VERSION, OPEN_BY_ASSIGNEE, OPEN_BY_COMPONENT, OPEN_BY_FIX_VERSION, OPEN_BY_PRIORITY, STATUS
 
Constructor Summary
AbstractStatisticType()
           
 
Method Summary
 StatisticCollection calculateStatisticsCollection(ProjectStatistics projectStats, GenericValue securityLevel)
          Create statistics for the current security level for all, assignee and reporter
protected  void decrementStatisticInCollection(StatisticCollection statCollection, java.lang.String oldValue, GenericValue issue)
           
 void decrementStatisticInCollectionWithSecurityType(StatisticCollection statCollection, Statistic statistic, GenericValue issue)
           
protected abstract  java.util.Collection getEntities(ProjectStatistics projectStatistics)
           
protected abstract  java.lang.String getFieldName()
          This is the name of the field that will be 'grouped' for the statistic.
protected abstract  java.util.Collection getIssues(ProjectStatistics projectStats, GenericValue securityLevel, java.lang.Object entity)
           
protected abstract  java.lang.String getKey(GenericValue issue, java.lang.Object entity)
           
protected  void incrementStatisticInCollection(StatisticCollection statCollection, java.lang.String newValue, GenericValue issue)
           
 void incrementStatisticInCollectionWithSecurityType(StatisticCollection statCollection, java.lang.String key, StatisticSecurityType statisticSecurityType, GenericValue issue)
           
protected  boolean isResolved(StatisticsUpdateEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.project.statistics.StatisticType
amendCollection
 
Methods inherited from interface java.util.Comparator
compare, equals
 

Constructor Detail

AbstractStatisticType

public AbstractStatisticType()
Method Detail

getFieldName

protected abstract java.lang.String getFieldName()
This is the name of the field that will be 'grouped' for the statistic.


isResolved

protected boolean isResolved(StatisticsUpdateEvent event)

calculateStatisticsCollection

public StatisticCollection calculateStatisticsCollection(ProjectStatistics projectStats,
                                                         GenericValue securityLevel)
Create statistics for the current security level for all, assignee and reporter

Specified by:
calculateStatisticsCollection in interface StatisticType
Parameters:
projectStats -
securityLevel -
Returns:

getEntities

protected abstract java.util.Collection getEntities(ProjectStatistics projectStatistics)
                                             throws GenericEntityException
Throws:
GenericEntityException

getIssues

protected abstract java.util.Collection getIssues(ProjectStatistics projectStats,
                                                  GenericValue securityLevel,
                                                  java.lang.Object entity)
                                           throws GenericEntityException
Throws:
GenericEntityException

getKey

protected abstract java.lang.String getKey(GenericValue issue,
                                           java.lang.Object entity)

decrementStatisticInCollection

protected void decrementStatisticInCollection(StatisticCollection statCollection,
                                              java.lang.String oldValue,
                                              GenericValue issue)
                                       throws StatisticOutOfDateException
Throws:
StatisticOutOfDateException

decrementStatisticInCollectionWithSecurityType

public void decrementStatisticInCollectionWithSecurityType(StatisticCollection statCollection,
                                                           Statistic statistic,
                                                           GenericValue issue)
                                                    throws StatisticOutOfDateException
Specified by:
decrementStatisticInCollectionWithSecurityType in interface StatisticType
Throws:
StatisticOutOfDateException

incrementStatisticInCollection

protected void incrementStatisticInCollection(StatisticCollection statCollection,
                                              java.lang.String newValue,
                                              GenericValue issue)
                                       throws StatisticOutOfDateException
Throws:
StatisticOutOfDateException

incrementStatisticInCollectionWithSecurityType

public void incrementStatisticInCollectionWithSecurityType(StatisticCollection statCollection,
                                                           java.lang.String key,
                                                           StatisticSecurityType statisticSecurityType,
                                                           GenericValue issue)
                                                    throws StatisticOutOfDateException
Specified by:
incrementStatisticInCollectionWithSecurityType in interface StatisticType
Throws:
StatisticOutOfDateException