com.atlassian.jira.project.statistics
Class ProjectStatistics

java.lang.Object
  extended bycom.atlassian.jira.project.statistics.ProjectStatistics

public class ProjectStatistics
extends java.lang.Object

This class contains a Map of SecurityStatistic objects for a project


Constructor Summary
ProjectStatistics(GenericValue project)
          This constructor creates a new Map of SecurityStatistic objects for this project.
 
Method Summary
 GenericValue getProject()
          Returns the project of this class
 java.util.Collection getSecurityStatistics()
          Gets the values of the securityStatistics map
 StatisticCollection getStatisticCollection(GenericValue securityLevel, StatisticType statisticType)
          Gets the StatisticCollection for this securitylevel and StatisticType.
 java.lang.String toString()
           
 void updateStatistics(StatisticsUpdateEvent event)
          Updates the Statistics based on an issue and its changegroup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProjectStatistics

public ProjectStatistics(GenericValue project)
This constructor creates a new Map of SecurityStatistic objects for this project.

If the project has a security scheme then , for every security level that is in that scheme it creates a SecurityStatistic object for that level and puts this object into the Map.

It will then also create a SecurityStatistic object for no security level to cater for projects and issues that are not secured, and add this object to the Map also.

Method Detail

getStatisticCollection

public StatisticCollection getStatisticCollection(GenericValue securityLevel,
                                                  StatisticType statisticType)
Gets the StatisticCollection for this securitylevel and StatisticType.

First gets the SecurityStatistic for this security level from the securityStatistics Map. It then gets and returns the StatisticCollection for this StatisticType from the SecurityStatistic


getSecurityStatistics

public java.util.Collection getSecurityStatistics()
Gets the values of the securityStatistics map


getProject

public GenericValue getProject()
Returns the project of this class


toString

public java.lang.String toString()

updateStatistics

public void updateStatistics(StatisticsUpdateEvent event)
Updates the Statistics based on an issue and its changegroup.

This method gets the SecurityStatistic object based on the security level of the issue passed in. UpdateStatistics is then called on this object

See Also:
SecurityStatistic.updateStatistics(com.atlassian.jira.project.statistics.StatisticsUpdateEvent)