org.eclipse.mylar.internal.monitor.reports.collectors
Class ViewUsageCollector
java.lang.Object
org.eclipse.mylar.internal.monitor.reports.collectors.ViewUsageCollector
- All Implemented Interfaces:
- IUsageCollector
- Direct Known Subclasses:
- MylarViewUsageCollector
public class ViewUsageCollector
- extends java.lang.Object
- implements IUsageCollector
- Author:
- Mik Kersten, Leah Findlater
Method Summary |
void |
consumeEvent(org.eclipse.mylar.context.core.InteractionEvent event,
int userId)
|
void |
exportAsCSVFile(java.lang.String directory)
Implementors will need to generate a unique filename given the directory
in which to place the file |
private java.lang.String |
formatAsPercentage(float viewUse)
|
java.util.Map<java.lang.String,java.lang.Integer> |
getNormalViewSelections()
For testing. |
java.util.List<java.lang.String> |
getReport()
TODO: return report as HTML |
java.lang.String |
getReportTitle()
|
java.util.List<java.lang.String> |
getSummary(int userId)
|
void |
setMaxViewsToReport(int maxViewsToReport)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
usersNumSelections
protected java.util.Map<java.lang.Integer,java.lang.Integer> usersNumSelections
usersNormalViewSelections
protected java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.lang.Integer>> usersNormalViewSelections
maxViewsToReport
protected int maxViewsToReport
ViewUsageCollector
public ViewUsageCollector()
consumeEvent
public void consumeEvent(org.eclipse.mylar.context.core.InteractionEvent event,
int userId)
- Specified by:
consumeEvent
in interface IUsageCollector
getSummary
public java.util.List<java.lang.String> getSummary(int userId)
formatAsPercentage
private java.lang.String formatAsPercentage(float viewUse)
getReport
public java.util.List<java.lang.String> getReport()
- Description copied from interface:
IUsageCollector
- TODO: return report as HTML
- Specified by:
getReport
in interface IUsageCollector
- Returns:
- a list corresponding to all of the lines of the report
getReportTitle
public java.lang.String getReportTitle()
- Specified by:
getReportTitle
in interface IUsageCollector
exportAsCSVFile
public void exportAsCSVFile(java.lang.String directory)
- Description copied from interface:
IUsageCollector
- Implementors will need to generate a unique filename given the directory
in which to place the file
- Specified by:
exportAsCSVFile
in interface IUsageCollector
getNormalViewSelections
public java.util.Map<java.lang.String,java.lang.Integer> getNormalViewSelections()
- For testing.
setMaxViewsToReport
public void setMaxViewsToReport(int maxViewsToReport)