Package com.day.crx.statistics
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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getPath()
String
getPathPrefix()
Returns an absolute path prefix or an empty string if no path prefix is set.long
getTimestamp()
void
setPathPrefix(String pathPrefix)
void
setTimestamp(long timestamp)
void
write(Node node)
Writes the timestamp to a long property calledtimestamp
.void
write(Session session)
Writes this entry to the workspace accessible viasession
.
-
-
-
Constructor Detail
-
Entry
public Entry(String pathPrefix)
Creates a new entry.- Parameters:
pathPrefix
- the location where the entry will be stored.
-
-
Method Detail
-
write
public final void write(Session session) throws RepositoryException
Writes this entry to the workspace accessible viasession
.- 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 calledtimestamp
.- 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.
-
-