Package com.day.crx.statistics.result
Class MostPopularResultsReport
- java.lang.Object
-
- com.day.crx.statistics.Report
-
- com.day.crx.statistics.result.MostPopularResultsReport
-
public class MostPopularResultsReport extends Report
MostPopularResultsReport
implements a report that returns the most popular results in a given period.
-
-
Constructor Summary
Constructors Constructor Description MostPopularResultsReport(java.lang.String dataPath)
Creates a newMostPopularResultsReport
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getDate()
java.util.Iterator
getResult(Session session)
Runs the report and returns a result iterator overObject[]
instances.int
getSize()
void
setDate(long date)
void
setSize(int size)
-
-
-
Constructor Detail
-
MostPopularResultsReport
public MostPopularResultsReport(java.lang.String dataPath)
Creates a newMostPopularResultsReport
.- Parameters:
dataPath
- the path where the results statistics are stored.
-
-
Method Detail
-
getResult
public java.util.Iterator getResult(Session session) throws RepositoryException
Runs the report and returns a result iterator overObject[]
instances. Returns result rows with the following objects:- Path
String
, which indicates the month Long
count (how may times a result was selected)String[]
with recent queries that lead to this result.
- Specified by:
getResult
in classReport
- Parameters:
session
- the session giving access to the workspace.- Returns:
- Iterator over
Object
results. - Throws:
RepositoryException
- if an error occurs while reading from the repository.
- Path
-
getSize
public int getSize()
- Returns:
- the maximum number of results to return.
-
setSize
public void setSize(int size)
- Parameters:
size
- the maximum number of results to return.
-
setDate
public void setDate(long date)
- Parameters:
date
- the report covers the month as indicated bydate
.
-
getDate
public long getDate()
- Returns:
- the report covers the month as indicated by
date
.
-
-