|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Atlassian Source Code Template. User: Bobby Date: Apr 24, 2003 Time: 5:37:51 PM CVS Revision: Revision$ Last CVS Commit: Date$ Author of last CVS Commit: Author$
Field Summary | |
static int |
CREATE_EVENT
|
static int |
DELETE_EVENT
|
static int |
MOVE_EVENT
|
static int |
UPDATE_EVENT
|
Method Summary | |
java.util.Map |
getAllStatistics()
Returns a Map containing the Statistics for all projects that have had their statistics loaded. |
StatisticCollection |
getStatistics(GenericValue securityLevel,
StatisticType statisticType,
GenericValue project)
Get the StatisticCollection for this StatisticType , security level and project. |
long |
getTotalStatistics(StatisticType statisticType,
java.lang.String key,
GenericValue project)
Get the total statistical value for this StatisticType , key and project. |
java.util.Map |
getTypes()
Returns a Map containing all the StatisticType objects that have been loaded |
long |
getUsersTotalStatistics(User user,
StatisticType statisticType,
java.lang.String key,
GenericValue project)
|
void |
loadStatisticsForAllProjects()
Load all the statistics for every project into this StatisticsManagerImpl . |
ProjectStatistics |
refreshProjectStatistics(GenericValue project)
Refresh the Statistics for a given project |
void |
updateStatistics(StatisticsUpdateEvent event)
Updates the Statistics based on an issue and its changegroup. |
Field Detail |
public static final int CREATE_EVENT
public static final int UPDATE_EVENT
public static final int DELETE_EVENT
public static final int MOVE_EVENT
Method Detail |
public void loadStatisticsForAllProjects()
StatisticsManagerImpl
.
If you want to pre-cache all statistics, call this method straight after constructing a StatisticsManager.
Alternatively if you want to lazy load statistics, don't call loadStatisticsForAllProjects() and the first time statistics for a particular project are accessed, they will be loaded.
public StatisticCollection getStatistics(GenericValue securityLevel, StatisticType statisticType, GenericValue project)
StatisticCollection
for this StatisticType
, security level and project.
First the ProjectStatistics
will be retrieved for this project and from this the
StatisticCollection
for this security level and StatisticType will be returned
public java.util.Map getTypes()
StatisticType
objects that have been loaded
public java.util.Map getAllStatistics()
If loadStatisticsForAllProjects() has been called then this map will contain the Statistics for all Projects.
public ProjectStatistics refreshProjectStatistics(GenericValue project)
The ProjectStatistics
object for the given project is removed
from the Project Statistics Map and then they are recalculated and added again
public void updateStatistics(StatisticsUpdateEvent event) throws GenericEntityException
This method gets the ProjectStatistics
object based on the project of the issue passed in. UpdateStatistics is then
called on this object
GenericEntityException
ProjectStatistics.updateStatistics(com.atlassian.jira.project.statistics.StatisticsUpdateEvent)
public long getTotalStatistics(StatisticType statisticType, java.lang.String key, GenericValue project)
StatisticType
, key and project. For example the Statistics
for OpenByAssignee for "joe" in Project X
The ProjectStatistics
object for this project is retrieved. For each SecurityStatistic
in this ProjectStatistics, the StatisticCollection
object for this StatisticType is retrieved.
The value of the Statistic
object with this key is taken from the StatisticCollection and
added to the total.
public long getUsersTotalStatistics(User user, StatisticType statisticType, java.lang.String key, GenericValue project) throws StatisticException
StatisticException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |