public abstract class AbstractStatisticAgent extends java.lang.Object implements java.lang.Comparable<AbstractStatisticAgent>, java.lang.Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
AbstractStatisticAgent.AbstractReportMetricComparator |
Constructor and Description |
---|
AbstractStatisticAgent() |
AbstractStatisticAgent(AbstractStatisticAgent parent) |
Modifier and Type | Method and Description |
---|---|
protected void |
addElement(java.lang.String elt,
java.util.Map<java.lang.String,java.lang.Integer> eltMap) |
abstract AbstractStatisticAgent |
clone() |
int |
compareTo(AbstractStatisticAgent o) |
abstract void |
doProcess(EventData data,
StatisticContext context) |
abstract boolean |
endAnalyze(AbstractReportMetric reportMetric,
StatisticContext context) |
java.lang.String |
getDisplayJSP() |
java.util.Date |
getLatestAnalyzeDate() |
static java.util.Set<AbstractReportMetric> |
getMetricObjectSet(Workspace workspace,
java.util.Date startDate,
java.util.Date endDate,
java.lang.String urid,
java.lang.Class<? extends AbstractReportMetric> clazz) |
java.lang.String |
getName(java.lang.String userLang)
Get Agent name
|
int |
getOrder() |
java.util.Date |
getReportDay() |
abstract java.lang.Class<? extends AbstractReportMetric> |
getReportMetricClass() |
Workspace |
getWorkspace() |
static java.util.Set<AbstractReportMetric> |
getWorkspacesMetricObjectSet(java.util.Date startDate,
java.util.Date endDate,
java.lang.String urid,
java.lang.Class<? extends AbstractReportMetric> clazz) |
void |
init(StatisticContext context) |
boolean |
isReportDisplayed(Workspace displayedWS,
java.util.Date beginDate,
java.util.Date endDate)
Indicates if this agent have a display available for the provided parameters
|
void |
process(EventData data,
StatisticContext context)
process the current data
Default implementation check :
- if data is not null
- if urid is not null in analyze configuration, canUse check if the evenData urid is the same
- if workspaceId is not null in analyze configuration, canUse check if the evenData workspaceId is the same
- if startDate or endDate in eventData is null it return false
- if the startDate is in the same day than the agent report day
|
void |
setDisplayJSP(java.lang.String displayJSP) |
void |
setOrder(int order) |
void |
setReportDay(java.util.Date reportDay) |
void |
setWorkspace(Workspace workspace) |
abstract void |
startAnalyze(StatisticContext context) |
public AbstractStatisticAgent()
public AbstractStatisticAgent(AbstractStatisticAgent parent)
public void init(StatisticContext context)
public Workspace getWorkspace()
public void setWorkspace(Workspace workspace)
public java.util.Date getReportDay()
public void setReportDay(java.util.Date reportDay)
public java.lang.String getDisplayJSP()
public void setDisplayJSP(java.lang.String displayJSP)
public int getOrder()
public void setOrder(int order)
public java.lang.String getName(java.lang.String userLang)
userLang
- the language to compute agent namepublic static java.util.Set<AbstractReportMetric> getMetricObjectSet(Workspace workspace, java.util.Date startDate, java.util.Date endDate, java.lang.String urid, java.lang.Class<? extends AbstractReportMetric> clazz)
public static java.util.Set<AbstractReportMetric> getWorkspacesMetricObjectSet(java.util.Date startDate, java.util.Date endDate, java.lang.String urid, java.lang.Class<? extends AbstractReportMetric> clazz)
public java.util.Date getLatestAnalyzeDate()
public boolean isReportDisplayed(Workspace displayedWS, java.util.Date beginDate, java.util.Date endDate)
displayedWS
- the Workspace
(can be null for all workspaces)beginDate
- the begin date of te displayed intervalendDate
- the end date of te displayed intervalpublic void process(EventData data, StatisticContext context)
context
- the StatisticContext
data
- the EventData
public abstract AbstractStatisticAgent clone()
clone
in class java.lang.Object
public abstract void startAnalyze(StatisticContext context)
public abstract void doProcess(EventData data, StatisticContext context)
public abstract boolean endAnalyze(AbstractReportMetric reportMetric, StatisticContext context)
public abstract java.lang.Class<? extends AbstractReportMetric> getReportMetricClass()
public int compareTo(AbstractStatisticAgent o)
compareTo
in interface java.lang.Comparable<AbstractStatisticAgent>
protected void addElement(java.lang.String elt, java.util.Map<java.lang.String,java.lang.Integer> eltMap)
Copyright © 2001-2010 Jalios SA. All Rights Reserved.