com.xpn.xwiki.stats.impl
Class VisitStats
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.VisitStats
- All Implemented Interfaces:
- ElementInterface, ObjectInterface, Serializable, Cloneable
public class VisitStats
- extends XWikiStats
The visit statistics database object.
- Version:
- $Id: 71a720cee5d8cc29ca3d2f9f5df8dc4e0f3b70cf $
- See Also:
- Serialized Form
Nested Class Summary |
static class |
VisitStats.Property
The properties of visit statistics object. |
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, setNumber, setOwnerDocument, setSetValue, setStringListValue, setStringValue, setXClassReference, toString, toXMLString |
Methods inherited from class com.xpn.xwiki.objects.BaseElement |
createReference, getDocumentReference, getId, getLocalUidStringEntityReferenceSerializer, getName, getOwnerDocument, getPrettyName, getReference, setId, setName, setPrettyName |
oldObject
protected VisitStats oldObject
- The previous visit object.
VisitStats
public VisitStats()
- Default
VisitStats
constructor.
VisitStats
public VisitStats(String user,
String uniqueID,
String cookie,
String ip,
String userAgent,
Date startDate,
StatsUtil.PeriodType periodType)
- Parameters:
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.
rememberOldObject
public void rememberOldObject(VisitStats vobject)
- Store previous object to be able to remove it from the database later.
- Parameters:
vobject
- the previous object.
unrememberOldObject
public void unrememberOldObject()
- Set old visit object to null.
getOldObject
public VisitStats getOldObject()
- Returns:
- the previous visit object.
getPageSaves
public int getPageSaves()
- Returns:
- the number of saved pages during this visit.
setPageSaves
public void setPageSaves(int pageSaves)
- Parameters:
pageSaves
- the number of saved pages during this visit.
incPageSaves
public void incPageSaves()
- Add 1 to the number of saved pages during this visit.
getDownloads
public int getDownloads()
- Returns:
- the number of downloaded pages during this visit.
setDownloads
public void setDownloads(int downloads)
- Parameters:
downloads
- the number of downloaded pages during this visit.
incDownloads
public void incDownloads()
- Add 1 to the number of downloaded pages during this visit.
getStartDate
public Date getStartDate()
- Returns:
- the starting date of the user visit.
setStartDate
public void setStartDate(Date startDate)
- Parameters:
startDate
- the starting date of the user visit.
getEndDate
public Date getEndDate()
- Returns:
- the ending date of the user visit.
setEndDate
public void setEndDate(Date endDate)
- Parameters:
endDate
- the ending date of the user visit.
getUniqueID
public String getUniqueID()
- Returns:
- the unique id of the user visit.
setUniqueID
public void setUniqueID(String uniqueID)
- Parameters:
uniqueID
- the unique id of the user visit.
getCookie
public String getCookie()
- Returns:
- the cookie id of the user.
setCookie
public void setCookie(String cookie)
- Parameters:
cookie
- the cookie id of the user.
getIP
public String getIP()
- Returns:
- the IP address of the user.
setIP
public void setIP(String ip)
- Parameters:
ip
- the IP address of the user.
getUserAgent
public String getUserAgent()
- Returns:
- the user agent of the user.
setUserAgent
public void setUserAgent(String userAgent)
- Parameters:
userAgent
- the user agent of the user.
getUser
public String getUser()
- Returns:
- the user name.
setUser
public void setUser(String user)
- Parameters:
user
- the user name.
Copyright © 2004–2014 XWiki. All rights reserved.