Class Entry

java.lang.Object
com.day.crx.statistics.Entry
Direct Known Subclasses:
PageView, Query, ResultSelected

public abstract class Entry extends Object
Entry is the basic unit of statistic information that can be stored in a statistics workspace.
  • Constructor Details

    • Entry

      public Entry(String pathPrefix)
      Creates a new entry.
      Parameters:
      pathPrefix - the location where the entry will be stored.
  • Method Details

    • write

      public final void write(Session session) throws RepositoryException
      Writes this entry to the workspace accessible via session.
      Parameters:
      session - the session giving access to the worksapce.
      Throws:
      RepositoryException - if an error occurs while writing to the workspace.
    • write

      public void write(Node node) throws RepositoryException
      Writes the timestamp to a long property called timestamp.
      Parameters:
      node - the node where to store the property.
      Throws:
      RepositoryException - if an error occurs while writing to the node.
    • getPath

      public final String getPath()
      Returns:
      the path where this entry is stored in the workspace.
    • getTimestamp

      public long getTimestamp()
      Returns:
      a timestamp for this entry.
    • setTimestamp

      public void setTimestamp(long timestamp)
      Parameters:
      timestamp - a time stamp for this entry.
    • getPathPrefix

      public String getPathPrefix()
      Returns an absolute path prefix or an empty string if no path prefix is set. This method will never return the path of the root node ('/'), instead it will return an empty string.
      Returns:
      an absolute path prefix or an empty string.
    • setPathPrefix

      public void setPathPrefix(String pathPrefix)
      Parameters:
      pathPrefix - location where the entry will be stored.