public class VisitStats extends XWikiStats
Modifier and Type | Class and Description |
---|---|
static class |
VisitStats.Property
The properties of visit statistics object.
|
Modifier and Type | Field and Description |
---|---|
protected VisitStats |
oldObject
The previous visit object.
|
currentReferenceDocumentReferenceResolver, fields, fieldsToRemove, number, relativeEntityReferenceResolver
documentReference, ownerDocument, referenceCache
Constructor and Description |
---|
VisitStats()
Default
VisitStats constructor. |
VisitStats(String user,
String uniqueID,
String cookie,
String ip,
String userAgent,
Date startDate,
StatsUtil.PeriodType periodType) |
Modifier and Type | Method and Description |
---|---|
String |
getCookie() |
int |
getDownloads() |
Date |
getEndDate() |
String |
getIP() |
VisitStats |
getOldObject() |
int |
getPageSaves() |
Date |
getStartDate() |
String |
getUniqueID() |
String |
getUser() |
String |
getUserAgent() |
void |
incDownloads()
Add 1 to the number of downloaded pages during this visit.
|
void |
incPageSaves()
Add 1 to the number of saved pages during this visit.
|
void |
rememberOldObject(VisitStats vobject)
Store previous object to be able to remove it from the database later.
|
void |
setCookie(String cookie) |
void |
setDownloads(int downloads) |
void |
setEndDate(Date endDate) |
void |
setIP(String ip) |
void |
setPageSaves(int pageSaves) |
void |
setStartDate(Date startDate) |
void |
setUniqueID(String uniqueID) |
void |
setUser(String user) |
void |
setUserAgent(String userAgent) |
void |
unrememberOldObject()
Set old visit object to null.
|
equals, fromXML, getLocalKey, getPageViews, getPeriod, hashCode, incPageViews, setPageViews, setPeriod, toXML
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
createReference, fromXML, getDocumentReference, getId, getLocalEntityReferenceSerializer, getLocalization, getLocalUidStringEntityReferenceSerializer, getMergeManager, getName, getOwnerDocument, getPrettyName, getReference, getXWikiContext, localizePlain, localizePlainOrKey, setId, setName, setPrettyName, toString, toXMLString
finalize, getClass, notify, notifyAll, wait, wait, wait
getDocumentReference, getName, getReference, setName, toString
protected VisitStats oldObject
public VisitStats()
VisitStats
constructor.public VisitStats(String user, String uniqueID, String cookie, String ip, String userAgent, Date startDate, StatsUtil.PeriodType periodType)
user
- the user name.uniqueID
- the visit object unique id.cookie
- the cookie id.ip
- the IP of the user.userAgent
- the user agent of the user.startDate
- the starting date of the visit.periodType
- the type of the period.public void rememberOldObject(VisitStats vobject)
vobject
- the previous object.public void unrememberOldObject()
public VisitStats getOldObject()
public int getPageSaves()
public void setPageSaves(int pageSaves)
pageSaves
- the number of saved pages during this visit.public void incPageSaves()
public int getDownloads()
public void setDownloads(int downloads)
downloads
- the number of downloaded pages during this visit.public void incDownloads()
public Date getStartDate()
public void setStartDate(Date startDate)
startDate
- the starting date of the user visit.public Date getEndDate()
public void setEndDate(Date endDate)
endDate
- the ending date of the user visit.public String getUniqueID()
public void setUniqueID(String uniqueID)
uniqueID
- the unique id of the user visit.public String getCookie()
public void setCookie(String cookie)
cookie
- the cookie id of the user.public String getIP()
public void setIP(String ip)
ip
- the IP address of the user.public String getUserAgent()
public void setUserAgent(String userAgent)
userAgent
- the user agent of the user.public String getUser()
public void setUser(String user)
user
- the user name.Copyright © 2004–2022 XWiki. All rights reserved.