|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.xpn.xwiki.api.Api com.xpn.xwiki.api.StatsService
public class StatsService
Statistics api. The Statistics module needs to be activated (xwiki.stats=1 in xwiki.cfg).
Field Summary |
---|
Fields inherited from class com.xpn.xwiki.api.Api |
---|
context |
Constructor Summary | |
---|---|
StatsService(XWikiContext context)
Create new StatsService instance. |
Method Summary | |
---|---|
Map<?,?> |
getActionStatistics(String action,
Scope scope,
Period period,
Duration step)
Shows how the statistics for the specified action have evolved over the specified period of time. |
List<?> |
getBackLinkStatistics(String domain,
Scope scope,
Period period,
Range range)
Retrieves back-link statistics. |
List<?> |
getDocumentStatistics(String action,
Scope scope,
Period period,
Range range)
Retrieves document statistics. |
Collection<?> |
getRecentActions(String action,
int size)
Returns the recently visited pages for a specific action. |
List<?> |
getRefererStatistics(String domain,
Scope scope,
Period period,
Range range)
Retrieves referrer statistics. |
List<?> |
getVisitStatistics(String action,
Period period,
Range range)
Retrieves visit statistics. |
boolean |
isEnabled()
Deprecated. use isEnabledForCurrentWiki() |
boolean |
isEnabledForCurrentWiki()
Indicate if statistics service is enabled for the current wiki. |
boolean |
isEnabledGlobally()
Indicate if statistics service is globally enabled. |
Methods inherited from class com.xpn.xwiki.api.Api |
---|
convert, convert, getXWikiContext, hasAccessLevel, hasAdminRights, hasProgrammingRights, hasWikiAdminRights |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StatsService(XWikiContext context)
context
- the XWiki context.Method Detail |
---|
public boolean isEnabledGlobally()
isEnabledForCurrentWiki()
.
To be true the xwiki.stats
setting in xwiki.cfg has to be 1
.
true
if the statistics module is enabledpublic boolean isEnabledForCurrentWiki()
To be true the xwiki.stats
in xwiki.cfg has to be 1
and
xwiki.stats.default
too.
xwiki.stats.default
can be overwritten by statistics
in XWikiPreferences
.
@Deprecated public boolean isEnabled()
isEnabledForCurrentWiki()
To be true the xwiki.stats
in xwiki.cfg has to be 1
and
xwiki.stats.default
too.
xwiki.stats.default
can be overwritten by statistics
in XWikiPreferences
.
public List<?> getDocumentStatistics(String action, Scope scope, Period period, Range range)
action
- The action the results should be ordered by. It can be one of: "view", "save" or "download". If the
action is "view" then the documents are ordered by the number of times they have been viewed so far.scope
- The set of documents for which to retrieve statisticsperiod
- The period of timerange
- The sub-range to return from the entire result set. Use this parameter for pagination
public List<?> getVisitStatistics(String action, Period period, Range range)
action
- The action the results should be ordered by. It can be one of: "view", "save" or "download". If the
action is "view" then the visitors are ordered by the number of pages they have viewed so far.period
- The period of timerange
- The sub-range to return from the entire result set. Use this parameter for pagination
public List<?> getRefererStatistics(String domain, Scope scope, Period period, Range range)
domain
- The domain for which to retrieve statistics. To retrieve statistics for all domains use the empty
string.scope
- The scope of referred documents to use for filtering the results.period
- The period of timerange
- The sub-range to return from the entire result set. Use this parameter for pagination
public List<?> getBackLinkStatistics(String domain, Scope scope, Period period, Range range)
domain
- the domain used for filtering the resultsscope
- the scope of referred documents for which to retrieve statistics.period
- the period of timerange
- the sub-range to return from the entire result set. Use this parameter for pagination
public Map<?,?> getActionStatistics(String action, Scope scope, Period period, Duration step)
action
- the action for which to retrieve statistics.scope
- the set of documents to consider.period
- the period of time.step
- the step used for sampling the period.
public Collection<?> getRecentActions(String action, int size)
action
- ("view" or "edit").size
- how many recent actions to retrieve.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |