com.atlassian.jira.web.bean
Class StatisticAccessorBean

java.lang.Object
  extended by com.atlassian.jira.web.bean.StatisticAccessorBean

public class StatisticAccessorBean
extends Object


Nested Class Summary
static class StatisticAccessorBean.Direction
          Enumerated type for sort direction.
static class StatisticAccessorBean.OrderBy
          Enumerated type for ordering of statistics.
protected static class StatisticAccessorBean.SearchStatisticsResult
           
 
Constructor Summary
StatisticAccessorBean()
           
StatisticAccessorBean(com.atlassian.crowd.embedded.api.User remoteUser, Long projectId)
           
StatisticAccessorBean(com.atlassian.crowd.embedded.api.User remoteUser, Long projectId, boolean limitToOpenIssues)
           
StatisticAccessorBean(com.atlassian.crowd.embedded.api.User remoteUser, Long projectId, Clause additionalClause, boolean limitToOpenIssues)
          Instantiates this class with given parameters.
StatisticAccessorBean(com.atlassian.crowd.embedded.api.User remoteUser, SearchRequest filter)
           
StatisticAccessorBean(com.atlassian.crowd.embedded.api.User remoteUser, SearchRequest filter, boolean overrideSecurity)
           
 
Method Summary
 StatisticMapWrapper getAllFilterBy(String type)
           
 StatisticMapWrapper getAllFilterBy(String type, StatisticAccessorBean.OrderBy orderBy, StatisticAccessorBean.Direction direction)
           
 long getCount()
          Returns nuber of search results for this filter
 SearchRequest getFilter()
           
 Collection getIssues()
          Returns a collection of found issues for this filter
 StatisticsMapper getMapper(String type)
           
 long getOpenByComponent()
          Stats by Component
 long getOpenByComponent(org.ofbiz.core.entity.GenericValue component)
           
 long getOpenByFixFor()
          Stats by FixFor
 long getOpenByFixFor(Version version)
           
 SearchRequestAppender getSearchRequestAppender(String statisticType)
          This will obtain a SearchRequestAppender relevant for the given statisticType, either by casting the StatisticsMapper to SearchRequestAppender.Factory or by constructing an artificial SearchRequestAppender wrapper around the StatisticsMapper.
 StatisticMapWrapper getWrapper(StatisticsMapper mapper)
           
 StatisticMapWrapper getWrapper(StatisticsMapper mapper, StatisticAccessorBean.OrderBy orderBy, StatisticAccessorBean.Direction direction)
          Returns a StatisticMapWrapper containing ordered search statistic results
protected  StatisticAccessorBean.SearchStatisticsResult searchCountMap(String groupField)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatisticAccessorBean

public StatisticAccessorBean()

StatisticAccessorBean

public StatisticAccessorBean(com.atlassian.crowd.embedded.api.User remoteUser,
                             SearchRequest filter)

StatisticAccessorBean

public StatisticAccessorBean(com.atlassian.crowd.embedded.api.User remoteUser,
                             SearchRequest filter,
                             boolean overrideSecurity)

StatisticAccessorBean

public StatisticAccessorBean(com.atlassian.crowd.embedded.api.User remoteUser,
                             Long projectId,
                             boolean limitToOpenIssues)

StatisticAccessorBean

public StatisticAccessorBean(com.atlassian.crowd.embedded.api.User remoteUser,
                             Long projectId)

StatisticAccessorBean

public StatisticAccessorBean(com.atlassian.crowd.embedded.api.User remoteUser,
                             Long projectId,
                             Clause additionalClause,
                             boolean limitToOpenIssues)
Instantiates this class with given parameters.

Parameters:
remoteUser - remote User
projectId - project id
additionalClause - An additional clause to and to the current filter. Can be null.
limitToOpenIssues - flag that limits issues on status (open vs other)
Since:
v3.10
Method Detail

getFilter

public SearchRequest getFilter()

getWrapper

public StatisticMapWrapper getWrapper(StatisticsMapper mapper)
                               throws SearchException
Throws:
SearchException

getWrapper

public StatisticMapWrapper getWrapper(StatisticsMapper mapper,
                                      StatisticAccessorBean.OrderBy orderBy,
                                      StatisticAccessorBean.Direction direction)
                               throws SearchException
Returns a StatisticMapWrapper containing ordered search statistic results

Parameters:
mapper - the relevant StatisticsMapper for this instance
orderBy - either OrderBy.NATURAL or OrderBy.TOTAL to specify ordering by result keys or values respectively. null produces the same result as OrderBy.NATURAL
direction - either Direction.DESC or Direction.ASC to specify direction of ordering. null produces the same result as Direction.ASC
Returns:
the ordered results
Throws:
SearchException - .

searchCountMap

protected StatisticAccessorBean.SearchStatisticsResult searchCountMap(String groupField)
                                                               throws SearchException
Throws:
SearchException

getOpenByComponent

public long getOpenByComponent()
                        throws SearchException
Stats by Component

Throws:
SearchException

getOpenByComponent

public long getOpenByComponent(org.ofbiz.core.entity.GenericValue component)
                        throws SearchException
Throws:
SearchException

getOpenByFixFor

public long getOpenByFixFor()
                     throws SearchException
Stats by FixFor

Throws:
SearchException

getOpenByFixFor

public long getOpenByFixFor(Version version)
                     throws SearchException
Throws:
SearchException

getCount

public long getCount()
              throws SearchException
Returns nuber of search results for this filter

Returns:
count
Throws:
SearchException - if search fails
Since:
v3.10

getIssues

public Collection getIssues()
                     throws SearchException
Returns a collection of found issues for this filter

Returns:
collection of Issue objects
Throws:
SearchException - if search fails
Since:
v3.10

getAllFilterBy

public StatisticMapWrapper getAllFilterBy(String type)
                                   throws SearchException
Throws:
SearchException

getAllFilterBy

public StatisticMapWrapper getAllFilterBy(String type,
                                          StatisticAccessorBean.OrderBy orderBy,
                                          StatisticAccessorBean.Direction direction)
                                   throws SearchException
Throws:
SearchException

getMapper

public StatisticsMapper getMapper(String type)

getSearchRequestAppender

public SearchRequestAppender getSearchRequestAppender(String statisticType)
This will obtain a SearchRequestAppender relevant for the given statisticType, either by casting the StatisticsMapper to SearchRequestAppender.Factory or by constructing an artificial SearchRequestAppender wrapper around the StatisticsMapper.



Copyright © 2002-2014 Atlassian. All Rights Reserved.