Package com.xpn.xwiki.stats.impl
Class DocumentStats
- java.lang.Object
-
- com.xpn.xwiki.objects.BaseElement<R>
-
- com.xpn.xwiki.objects.BaseCollection
-
- com.xpn.xwiki.stats.impl.XWikiStats
-
- com.xpn.xwiki.stats.impl.DocumentStats
-
- All Implemented Interfaces:
ElementInterface,ObjectInterface,Serializable,Cloneable
public class DocumentStats extends XWikiStats
The document statistics database object.- Version:
- $Id: 1f26cd3e7c165a665cdb6b05d3d8f6b6c1bb1a23 $
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDocumentStats.PropertyThe properties of document statistics object.
-
Field Summary
-
Fields inherited from class com.xpn.xwiki.objects.BaseCollection
currentReferenceDocumentReferenceResolver, fields, fieldsToRemove, number, relativeEntityReferenceResolver
-
Fields inherited from class com.xpn.xwiki.objects.BaseElement
documentReference, ownerDocument, referenceCache
-
-
Constructor Summary
Constructors Constructor Description DocumentStats()DefaultDocumentStatsconstructor.DocumentStats(String docName, String action, Date periodDate, StatsUtil.PeriodType periodType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAction()intgetUniqueVisitors()intgetVisits()voidincUniqueVisitors()Add 1 to the number of unique visitors.voidincVisits()Add 1 to the number of visits.voidsetAction(String action)voidsetUniqueVisitors(int uniqueVisitors)voidsetVisits(int visits)-
Methods inherited from class com.xpn.xwiki.stats.impl.XWikiStats
equals, fromXML, getLocalKey, getPageViews, getPeriod, hashCode, incPageViews, setPageViews, setPeriod, toXML
-
Methods inherited from class com.xpn.xwiki.objects.BaseCollection
addField, addPropertyForRemoval, apply, clone, get, getClassName, getCurrentReferenceDocumentReferenceResolver, getCustomMappingMap, getDateValue, getDiff, getDoubleValue, getField, getFieldList, getFieldsToRemove, getFloatValue, getIntValue, getIntValue, getLargeStringValue, getListValue, getLongValue, getNumber, getProperties, getPropertyList, getPropertyNames, getRelativeEntityReferenceResolver, getRelativeXClassReference, getSetValue, getSortedIterator, getStringValue, getXClass, getXClassReference, merge, merge, mergeField, put, removeField, safeget, safeput, setClassName, setDateValue, setDBStringListValue, setDocumentReference, setDoubleValue, setFields, setFieldsToRemove, setFloatValue, setIntValue, setLargeStringValue, setLongValue, setNumber, setOwnerDocument, setSetValue, setStringListValue, setStringValue, setXClassReference, toXML, toXMLString
-
Methods inherited from class com.xpn.xwiki.objects.BaseElement
createReference, fromXML, getDocumentReference, getId, getLocalEntityReferenceSerializer, getLocalization, getLocalUidStringEntityReferenceSerializer, getMergeManager, getName, getOwnerDocument, getPrettyName, getReference, getXWikiContext, localizePlain, localizePlainOrKey, merge, setId, setName, setPrettyName, toString, toXMLString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.xpn.xwiki.objects.ElementInterface
getDocumentReference, getName, getReference, merge, setName, toString
-
-
-
-
Constructor Detail
-
DocumentStats
public DocumentStats()
DefaultDocumentStatsconstructor.
-
DocumentStats
public DocumentStats(String docName, String action, Date periodDate, StatsUtil.PeriodType periodType)
- Parameters:
docName- the name of the wiki/space/document.action- the action made on the document ("view", "save", ...).periodDate- the date of the period.periodType- the type of the period.
-
-
Method Detail
-
getAction
public String getAction()
- Returns:
- the action made on the document ("view", "save", ...).
-
setAction
public void setAction(String action)
- Parameters:
action- the action made on the document ("view", "save", ...).
-
getUniqueVisitors
public int getUniqueVisitors()
- Returns:
- the number of unique visitors.
-
setUniqueVisitors
public void setUniqueVisitors(int uniqueVisitors)
- Parameters:
uniqueVisitors- the number of unique visitors.
-
incUniqueVisitors
public void incUniqueVisitors()
Add 1 to the number of unique visitors.
-
getVisits
public int getVisits()
- Returns:
- the number of visits.
-
setVisits
public void setVisits(int visits)
- Parameters:
visits- the number of visits.
-
incVisits
public void incVisits()
Add 1 to the number of visits.
-
-