Class XWikiStats

    • Constructor Detail

      • XWikiStats

        public XWikiStats()
        Default constructor.
      • XWikiStats

        public XWikiStats​(Date periodDate,
                          StatsUtil.PeriodType periodtype)
        Parameters:
        periodDate - the period date.
        periodtype - the period type.
    • Method Detail

      • getPeriod

        public int getPeriod()
        Returns:
        the time when statistic was stored.
      • setPeriod

        public void setPeriod​(int period)
        Parameters:
        period - the time when statistic was stored.
      • getPageViews

        public int getPageViews()
        Returns:
        the counter of view action of this statistic.
      • setPageViews

        public void setPageViews​(int pageViews)
        Parameters:
        pageViews - the counter of view action of this statistic.
      • incPageViews

        public void incPageViews()
        Add 1 to the counter of view action of this statistic.
      • getLocalKey

        protected String getLocalKey()
        Overrides:
        getLocalKey in class BaseElement
        Returns:
        a unique identifier representing this element reference to be used for hashCode().
      • fromXML

        public void fromXML​(org.dom4j.Element oel)
                     throws XWikiException
        Initialize statistics object from XML schema.
        Overrides:
        fromXML in class BaseElement
        Parameters:
        oel - the XML root node containing statistics datas.
        Throws:
        XWikiException - error when parsing XML schema.