public class XWikiStatsServiceImpl extends Object implements XWikiStatsService, org.xwiki.observation.EventListener
Constructor and Description |
---|
XWikiStatsServiceImpl() |
Modifier and Type | Method and Description |
---|---|
Map<?,?> |
getActionStatistics(String action,
Scope scope,
Period period,
Duration step,
XWikiContext context)
Shows how the statistics for the specified action have evolved over the specified period of time.
|
List<DocumentStats> |
getBackLinkStatistics(String domain,
Scope scope,
Period period,
Range range,
XWikiContext context)
Retrieves back-link statistics.
|
DocumentStats |
getDocDayStats(String docname,
String action,
Date day,
XWikiContext context)
Gets day statistics on a document for a specific action.
|
DocumentStats |
getDocMonthStats(String docname,
String action,
Date month,
XWikiContext context)
Gets monthly statistics on a document for a specific action.
|
DocumentStats |
getDocTotalStats(String docname,
String action,
XWikiContext context)
Gets total statistics on a document for a specific action.
|
List<DocumentStats> |
getDocumentStatistics(String action,
Scope scope,
Period period,
Range range,
XWikiContext context)
Retrieves document statistics.
|
List<org.xwiki.observation.event.Event> |
getEvents() |
String |
getName() |
Collection<Object> |
getRecentActions(String action,
int size,
XWikiContext context)
Return the statistics action stored.
|
List<RefererStats> |
getRefererStatistics(String domain,
Scope scope,
Period period,
Range range,
XWikiContext context)
Retrieves referrer statistics.
|
List<?> |
getRefMonthStats(String docName,
Date month,
XWikiContext context)
Gets monthly referer statistics.
|
List<VisitStats> |
getVisitStatistics(String action,
Period period,
Range range,
XWikiContext context)
Retrieves visit statistics.
|
void |
init(XWikiContext context)
Methods called just one time at XWiki initialization.
|
void |
onEvent(org.xwiki.observation.event.Event event,
Object source,
Object data) |
public String getName()
getName
in interface org.xwiki.observation.EventListener
public List<org.xwiki.observation.event.Event> getEvents()
getEvents
in interface org.xwiki.observation.EventListener
public void init(XWikiContext context)
XWikiStatsService
init
in interface XWikiStatsService
context
- the XWiki context.public Collection<Object> getRecentActions(String action, int size, XWikiContext context)
XWikiStatsService
getRecentActions
in interface XWikiStatsService
action
- the action.size
- the maximum size of the list to return.context
- the XWiki context.public void onEvent(org.xwiki.observation.event.Event event, Object source, Object data)
onEvent
in interface org.xwiki.observation.EventListener
public Map<?,?> getActionStatistics(String action, Scope scope, Period period, Duration step, XWikiContext context)
XWikiStatsService
getActionStatistics
in interface XWikiStatsService
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.context
- the XWiki context.public List<DocumentStats> getDocumentStatistics(String action, Scope scope, Period period, Range range, XWikiContext context)
XWikiStatsService
getDocumentStatistics
in interface XWikiStatsService
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 statistics.period
- the period of time.range
- the sub-range to return from the entire result set. Use this parameter for pagination.context
- the XWiki context.public List<DocumentStats> getBackLinkStatistics(String domain, Scope scope, Period period, Range range, XWikiContext context)
XWikiStatsService
getBackLinkStatistics
in interface XWikiStatsService
domain
- the domain used for filtering the results.scope
- the scope of referred documents for which to retrieve statistics.period
- the period of time.range
- the sub-range to return from the entire result set. Use this parameter for pagination.context
- the XWiki context.public List<RefererStats> getRefererStatistics(String domain, Scope scope, Period period, Range range, XWikiContext context)
XWikiStatsService
getRefererStatistics
in interface XWikiStatsService
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 time.range
- the sub-range to return from the entire result set. Use this parameter for pagination.context
- the XWiki context.public List<VisitStats> getVisitStatistics(String action, Period period, Range range, XWikiContext context)
XWikiStatsService
getVisitStatistics
in interface XWikiStatsService
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 time.range
- the sub-range to return from the entire result set. Use this parameter for pagination.context
- the XWiki context.public DocumentStats getDocTotalStats(String docname, String action, XWikiContext context)
XWikiStatsService
getDocTotalStats
in interface XWikiStatsService
docname
- fully qualified document name.action
- can be "view", "edit", "save", etc..context
- the XWiki context.public DocumentStats getDocMonthStats(String docname, String action, Date month, XWikiContext context)
XWikiStatsService
getDocMonthStats
in interface XWikiStatsService
docname
- fully qualified document name.action
- can be "view", "edit", "save", etc..month
- the month.context
- the XWiki context.public DocumentStats getDocDayStats(String docname, String action, Date day, XWikiContext context)
XWikiStatsService
getDocDayStats
in interface XWikiStatsService
docname
- fully qualified document name.action
- can be "view", "edit", "save", etc..day
- the day.context
- the XWiki context.public List<?> getRefMonthStats(String docName, Date month, XWikiContext context) throws XWikiException
XWikiStatsService
getRefMonthStats
in interface XWikiStatsService
docName
- fully qualified document name.month
- the month.context
- the XWiki context.XWikiException
- error when searching for referer statistics.Copyright © 2004–2022 XWiki. All rights reserved.