Package com.day.crx.statistics
Class Entry
java.lang.Object
com.day.crx.statistics.Entry
- Direct Known Subclasses:
PageView,Query,ResultSelected
Entry is the basic unit of statistic information that can be
stored in a statistics workspace.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal StringgetPath()Returns an absolute path prefix or an empty string if no path prefix is set.longvoidsetPathPrefix(String pathPrefix) voidsetTimestamp(long timestamp) voidWrites the timestamp to a long property calledtimestamp.final voidWrites this entry to the workspace accessible viasession.
-
Constructor Details
-
Entry
Creates a new entry.- Parameters:
pathPrefix- the location where the entry will be stored.
-
-
Method Details
-
write
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
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
- 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
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
- Parameters:
pathPrefix- location where the entry will be stored.
-