com.xpn.xwiki.stats.impl
Class DocumentStats

java.lang.Object
  extended by com.xpn.xwiki.objects.BaseElement<R>
      extended by com.xpn.xwiki.objects.BaseCollection
          extended by com.xpn.xwiki.stats.impl.XWikiStats
              extended by 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: cfec193cd11854f16088ed1007363b6721fda1d4 $
See Also:
Serialized Form

Nested Class Summary
static class DocumentStats.Property
          The 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
localEntityReferenceSerializer, referenceCache
 
Constructor Summary
DocumentStats()
          Default DocumentStats constructor.
DocumentStats(String docName, String action, Date periodDate, StatsUtil.PeriodType periodType)
           
 
Method Summary
 String getAction()
           
 int getUniqueVisitors()
           
 int getVisits()
           
 void incUniqueVisitors()
          Add 1 to the number of unique visitors.
 void incVisits()
          Add 1 to the number of visits.
 void setAction(String action)
           
 void setUniqueVisitors(int uniqueVisitors)
           
 void setVisits(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, getCustomMappingMap, getDateValue, getDiff, getDoubleValue, getField, getFieldList, getFieldsToRemove, getFloatValue, getIntValue, getIntValue, getLargeStringValue, getListValue, getLongValue, getNumber, getProperties, getPropertyList, getPropertyNames, getRelativeXClassReference, getSetValue, getSortedIterator, getStringValue, getXClass, getXClassReference, merge, merge, put, removeField, safeget, safeput, setClassName, setDateValue, setDBStringListValue, setDocumentReference, setDoubleValue, setFields, setFieldsToRemove, setFloatValue, setIntValue, setLargeStringValue, setLongValue, setName, setNumber, setSetValue, setStringListValue, setStringValue, setXClassReference, toString, toXMLString
 
Methods inherited from class com.xpn.xwiki.objects.BaseElement
createReference, getDocumentReference, getId, getLocalUidStringEntityReferenceSerializer, getName, getPrettyName, getReference, setId, setPrettyName
 
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
 

Constructor Detail

DocumentStats

public DocumentStats()
Default DocumentStats constructor.


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.



Copyright © 2004-2013 XWiki. All Rights Reserved.