public class AnalyticsManager extends java.lang.Object implements JPropertiesListener
Modifier and Type | Class and Description |
---|---|
static class |
AnalyticsManager.ContentTopMapComparator |
class |
AnalyticsManager.dataMixInFilter |
class |
AnalyticsManager.DoubleEntryComparator |
class |
AnalyticsManager.DoubleMapComparator |
class |
AnalyticsManager.MemberMixInFilter |
class |
AnalyticsManager.TopDoubleMapComparator |
class |
AnalyticsManager.TopMapComparator |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AC_SEARCH |
static java.lang.String |
ACCESS |
static java.lang.String |
ANALYTICS_RESOLVEHOST_PROP |
static java.lang.String |
AUDIENCEMENT |
static java.lang.String |
AUTH_FAIL |
static java.lang.String |
BOT_PROP |
static java.lang.String |
BROWSER |
static java.lang.String |
BROWSERS_PROP |
static java.lang.String |
Chrome |
protected static java.lang.String |
CLOSE_WRAPPER |
static java.lang.String |
CORE |
static java.lang.String |
COUNTRY |
static java.lang.String |
CSRF_ERROR |
static java.lang.String |
CTXTCAT |
static java.lang.String |
CURRENTCAT |
static java.lang.String |
DATA |
static java.lang.String |
DATA_TYPE |
static java.lang.String |
DATA_WORKSPACES |
static java.lang.String |
DATEEND |
static java.lang.String |
DATESTART |
static java.lang.String |
DOWNLOAD |
static java.lang.String |
GROUPS |
static java.lang.String |
IPADDRESS |
static java.lang.String |
IS_BOT |
static java.lang.String |
LANGUAGE |
static java.lang.String |
LOCALE |
static java.lang.String |
MEMBER |
static java.lang.String |
MEMO |
static java.lang.String |
METHODE |
static java.lang.String |
NAME |
static java.lang.String |
OLD_DATA_WORKSPACES |
protected static java.lang.String |
OPEN_WRAPPER |
static java.lang.String |
OPENAPI |
static java.lang.String |
OPENAPI_DISABLED |
static java.lang.String |
OPENAPI_ERROR |
static java.lang.String |
OPENAPI_OK |
static java.lang.String |
OPENAPI_READ_ACCESS_DISABLED |
static java.lang.String |
OPENAPI_READ_ACCESS_FORBIDDEN |
static java.lang.String |
OPENAPI_UNAVAILABLE |
static java.lang.String |
OPENAPI_WRITE_ACCESS_DISABLED |
static java.lang.String |
OPENAPI_WRITE_ACCESS_FORBIDDEN |
static java.lang.String |
OS |
static java.lang.String |
OS_PROP |
static org.apache.oro.text.regex.Pattern |
PATTERN_BOT |
static org.apache.oro.text.regex.Pattern |
PATTERN_BROWSER |
static int |
PATTERN_NOT_PROCESSED |
static org.apache.oro.text.regex.Pattern |
PATTERN_OS |
static int |
PATTERN_PROCESSED_FALSE |
static int |
PATTERN_PROCESSED_TRUE |
static java.lang.String |
PORTAL |
static java.lang.String |
PORTAL_TITLE |
static java.lang.String |
PORTALCAT |
static java.lang.String |
PRINT_VIEW |
static java.lang.String |
PUBLICATION |
static java.lang.String |
QUERYSTRING |
static java.lang.String |
REFERER |
static java.lang.String |
Safari |
static java.lang.String |
SCHEME |
static java.lang.String |
SEARCH_CATEGORY |
static java.lang.String |
SEARCH_FULLTEXT |
static java.lang.String |
SEARCH_GROUPS |
static java.lang.String |
SEARCH_HIST |
static java.lang.String |
SEARCH_MEMBERS |
static java.lang.String |
SEARCH_SORT |
static java.lang.String |
SEARCH_TYPES |
static java.lang.String |
SERVERNAME |
static java.lang.String |
SERVERPORT |
static java.lang.String |
SESSIONID |
static java.lang.String |
URI |
static java.lang.String |
URID |
static java.lang.String |
USERAGENT |
static java.lang.String |
WORKSPACE |
static java.lang.String |
XFORWARD |
static java.lang.String |
ZONE |
REVISION
Modifier and Type | Method and Description |
---|---|
void |
addAgent(AbstractStatisticAgent agent)
add a
AbstractStatisticAgent to agent list |
static java.util.Set<AbstractReportMetric> |
aggregateAllUrid(java.util.Set<AbstractReportMetric> originalSet,
java.lang.Class<? extends AbstractReportMetric> clazz)
Aggregate all urid report in global report (day by day)
|
static void |
aggregateDateKeyDoubleMap(java.util.Map<java.util.Date,java.lang.Double> origMap,
java.util.Map<java.util.Date,java.lang.Double> mapToAdd) |
static void |
aggregateKeyContentTopMap(java.util.Map<java.lang.String,ContentTopValue> origContentTopMap,
java.util.Map<java.lang.String,ContentTopValue> mapToAdd) |
static void |
aggregateKeyIntegerMap(java.util.Map<java.lang.String,java.lang.Integer> origMap,
java.util.Map<java.lang.String,java.lang.Integer> mapToAdd) |
static void |
aggregateKeyLongMap(java.util.Map<java.lang.String,java.lang.Long> origMap,
java.util.Map<java.lang.String,java.lang.Long> mapToAdd) |
static void |
appendEventData(EventData eventData)
Append a data event
|
static void |
appendEventData(EventData eventData,
javax.servlet.http.HttpServletRequest request)
Append a data event
|
static void |
appendEventData(EventData eventData,
javax.servlet.http.HttpServletRequest request,
java.io.File eventDirectory)
Append a data event
|
static void |
appendPageEvent(javax.servlet.http.HttpServletRequest request,
long startPageRequest)
Append a page event (like previous page stat mechanism)
|
protected static void |
appendPageEvent(javax.servlet.http.HttpServletRequest request,
long startPageRequest,
long endPageRequest,
long eventDate,
java.io.File eventDirectory)
Append a page event (like previous page stat mechanism)
|
static void |
completeMetricObjectSet(java.util.Set<AbstractReportMetric> originalSet,
java.util.Date startDate,
java.util.Date endDate,
java.util.Locale locale,
java.lang.Class<? extends AbstractReportMetric> clazz)
Update the provided set with some empty report metric instance if any are missing in specified interval
|
void |
deleteAnalyze(AnalyzeListener listener)
|
static java.util.Map<java.lang.String,java.lang.String> |
generateAccessContextMap(javax.servlet.http.HttpServletRequest request,
EventData eventData) |
static java.lang.String |
getActionFromOp(int opAction) |
java.util.List<AbstractStatisticAgent> |
getAgents()
Get
AbstractStatisticAgent list (a copy of internal agent list) |
static java.util.SortedSet<java.lang.String> |
getBots(java.lang.String userAgent) |
static java.util.SortedSet<java.lang.String> |
getBrowsers(java.lang.String userAgent) |
static java.util.Set<Workspace> |
getCompatibleWorkspaceSet()
Get compatible workspaces for analyze (workspace model are ignored) (without any right check)
|
static java.util.Set<Workspace> |
getCompatibleWorkspaceSet(Member loggedMember)
Get compatible workspaces for analyze (workspace model are ignored)
|
java.util.List<AnalyzeListener> |
getCurrentAnalyzeListener()
Retrieve the current analyze listener
|
static java.util.Map<java.lang.String,ContentTopValue> |
getDeserializedContentTopMap(java.util.Map<java.lang.String,java.lang.String> contentTopMap)
Convert a Map of String to map of
ContentTopValue |
java.io.File |
getEventDirectory()
Retrieve event data directory
|
java.io.File |
getEventFile(java.io.File directory,
java.util.Date date)
Retrieve event data file for a date
|
protected static MonitoredInputStream |
getFileMonitoredStream(java.io.File file) |
static AnalyticsManager |
getInstance() |
org.codehaus.jackson.map.ObjectMapper |
getObjectMapper()
get the
ObjectMapper (cached in the class) |
java.util.Map<java.lang.String,java.lang.String> |
getRequestCustomContextMap(javax.servlet.http.HttpServletRequest request)
Get the context
Map which will be merge with existing context if it exists before writing EventData |
static java.util.Map<java.lang.String,java.lang.String> |
getSerializedContentTopMap(java.util.Map<java.lang.String,ContentTopValue> contentTopMap)
Convert a Map of
ContentTopValue to map of String |
static java.util.SortedMap<java.lang.String,ContentTopValue> |
getSortedContentTopMap(java.util.Map<java.lang.String,ContentTopValue> origContentTopMap,
int nbMaxElt) |
java.util.SortedMap<java.lang.String,java.lang.Double> |
getSortedTopDoubleMap(java.util.Map<java.lang.String,java.lang.Double> topMap,
int nbMaxElt) |
java.util.SortedMap<java.lang.String,java.lang.Integer> |
getSortedTopMap(java.util.Map<java.lang.String,java.lang.Integer> topMap,
int nbMaxElt) |
java.util.Map<java.lang.String,java.lang.String> |
getThreadLocalCustomContextMap()
Get the context
Map which will be merge with existing context if it exists before writing EventData context map will be get from a ThreadLocal object |
static java.lang.String |
getUrlSubString(java.lang.String value,
int maxLength) |
static java.util.Calendar |
getUtcTime(java.util.Date reportDate,
java.util.Locale userLocale)
Retrieve a UTC time from a date
|
void |
initAlarms()
init analytics alarm use to compute day aggregation
|
static boolean |
isBot(EventData data) |
static boolean |
isValidOperationAction(java.lang.String opAction) |
static java.util.Map<java.lang.String,java.util.Map<java.util.Date,java.lang.Double>> |
keptBest(java.util.Map<java.lang.String,java.util.Map<java.util.Date,java.lang.Double>> dataMap,
int nbElement,
java.lang.String othersKey)
Compute a new map by top x data and grouping other data.
|
static java.util.Map<java.lang.String,java.util.Map<java.util.Date,java.lang.Double>> |
normalizeMap(java.util.Map<java.lang.String,java.util.Map<java.util.Date,java.lang.Double>> dataMap)
Normalize a Map
|
static void |
processQueries(java.util.Map<java.lang.String,java.lang.String> ctxMap) |
void |
propertiesChange(JProperties properties)
Invoked after properties have been modified in JCMS and save on disk.
|
java.util.List<EventData> |
readEventFile(java.io.File file)
Read
EventData from a file |
void |
reinitAlarms()
ReinitAlarms (remove all analytics alarms from analytics alarm manager and init alarms)
|
void |
removeAgent(AbstractStatisticAgent agent)
remove a
AbstractStatisticAgent from agent list |
static void |
removeToDayMetric(java.util.Set<AbstractReportMetric> originalSet)
Remove today metric, because this metric is not done.
|
void |
runDayAgent()
run day agent with management of missing aggregation (manual run)
|
void |
runDayAgent(java.util.Date startDate,
java.util.Date endDate,
java.util.Set<Workspace> workspaceSet,
java.lang.String urid,
java.io.File eventDirectory,
java.util.Set<AbstractStatisticAgent> dayAgentList,
boolean scheduled,
boolean globalAnalyze)
Run day agent in the specified period
|
void |
runDayAgent(java.util.Date startDate,
java.util.Date endDate,
Workspace workspace,
java.lang.String urid,
boolean scheduled,
boolean globalAnalyze)
Run day agent in a specific period
|
void |
runDayAgentFromAlarm()
run day agent with management of missing aggregation (from an alarm).
|
void |
runPeriodAgent(java.util.Date startDate,
java.util.Date endDate,
AbstractPeriod period,
java.util.Set<Workspace> workspaceSet,
java.lang.String urid,
java.io.File eventDirectory,
java.util.Set<AbstractStatisticAgent> agentList,
boolean scheduled,
boolean globalAnalyze)
Run agent with a custom period in a specified interval
|
java.lang.String |
serializeEvent(EventData data)
Serialize an
EventData in a string |
static java.lang.String |
toJSON(java.lang.Object obj) |
void |
writeEvent(EventData data)
Write an
EventData in the file |
void |
writeEvent(java.io.File eventDirectory,
EventData data)
Write an
EventData in the file |
protected static final java.lang.String OPEN_WRAPPER
protected static final java.lang.String CLOSE_WRAPPER
public static final java.lang.String ANALYTICS_RESOLVEHOST_PROP
public static final java.lang.String Safari
public static final java.lang.String Chrome
public static final java.lang.String DOWNLOAD
public static final java.lang.String IPADDRESS
public static final java.lang.String METHODE
public static final java.lang.String REFERER
public static final java.lang.String SCHEME
public static final java.lang.String SERVERNAME
public static final java.lang.String URI
public static final java.lang.String QUERYSTRING
public static final java.lang.String SESSIONID
public static final java.lang.String USERAGENT
public static final java.lang.String ZONE
public static final java.lang.String MEMO
public static final java.lang.String NAME
public static final java.lang.String SERVERPORT
public static final java.lang.String LOCALE
public static final java.lang.String DATESTART
public static final java.lang.String DATEEND
public static final java.lang.String DATA
public static final java.lang.String DATA_TYPE
public static final java.lang.String MEMBER
public static final java.lang.String GROUPS
public static final java.lang.String PORTAL
public static final java.lang.String PORTAL_TITLE
public static final java.lang.String WORKSPACE
public static final java.lang.String CURRENTCAT
public static final java.lang.String PORTALCAT
public static final java.lang.String CTXTCAT
public static final java.lang.String PUBLICATION
public static final java.lang.String BROWSER
public static final java.lang.String OS
public static final java.lang.String COUNTRY
public static final java.lang.String LANGUAGE
public static final java.lang.String SEARCH_FULLTEXT
public static final java.lang.String SEARCH_CATEGORY
public static final java.lang.String SEARCH_GROUPS
public static final java.lang.String SEARCH_MEMBERS
public static final java.lang.String SEARCH_TYPES
public static final java.lang.String SEARCH_SORT
public static final java.lang.String SEARCH_HIST
public static final java.lang.String URID
public static final java.lang.String AUDIENCEMENT
public static final java.lang.String XFORWARD
public static final java.lang.String PRINT_VIEW
public static final java.lang.String IS_BOT
public static final java.lang.String DATA_WORKSPACES
public static final java.lang.String OLD_DATA_WORKSPACES
public static final int PATTERN_NOT_PROCESSED
public static final int PATTERN_PROCESSED_TRUE
public static final int PATTERN_PROCESSED_FALSE
public static final java.lang.String BROWSERS_PROP
public static final java.lang.String OS_PROP
public static final java.lang.String BOT_PROP
public static final org.apache.oro.text.regex.Pattern PATTERN_BOT
public static final org.apache.oro.text.regex.Pattern PATTERN_BROWSER
public static final org.apache.oro.text.regex.Pattern PATTERN_OS
public static final java.lang.String CORE
public static final java.lang.String ACCESS
public static final java.lang.String OPENAPI
public static final java.lang.String AC_SEARCH
public static final java.lang.String CSRF_ERROR
public static final java.lang.String AUTH_FAIL
public static final java.lang.String OPENAPI_UNAVAILABLE
public static final java.lang.String OPENAPI_DISABLED
public static final java.lang.String OPENAPI_ERROR
public static final java.lang.String OPENAPI_READ_ACCESS_DISABLED
public static final java.lang.String OPENAPI_READ_ACCESS_FORBIDDEN
public static final java.lang.String OPENAPI_WRITE_ACCESS_DISABLED
public static final java.lang.String OPENAPI_WRITE_ACCESS_FORBIDDEN
public static final java.lang.String OPENAPI_OK
public static AnalyticsManager getInstance()
public void propertiesChange(JProperties properties)
JPropertiesListener
You cannot alter the value received in parameters.
propertiesChange
in interface JPropertiesListener
properties
- the properties which have been modified (may not contain all JCMS properties)public void writeEvent(EventData data) throws org.codehaus.jackson.JsonGenerationException, org.codehaus.jackson.map.JsonMappingException, java.io.IOException
EventData
in the filedata
- the EventData
org.codehaus.jackson.JsonGenerationException
- Exception thrown when eventData is save as JSON dataorg.codehaus.jackson.map.JsonMappingException
- Exception thrown when eventData is save as JSON datajava.io.IOException
- Exception thrown when eventData is save as JSON datapublic void writeEvent(java.io.File eventDirectory, EventData data) throws org.codehaus.jackson.JsonGenerationException, org.codehaus.jackson.map.JsonMappingException, java.io.IOException
EventData
in the fileeventDirectory
- the events data directorydata
- the EventData
org.codehaus.jackson.JsonGenerationException
- Exception thrown when eventData is save as JSON dataorg.codehaus.jackson.map.JsonMappingException
- Exception thrown when eventData is save as JSON datajava.io.IOException
- Exception thrown when eventData is save as JSON datapublic java.lang.String serializeEvent(EventData data) throws org.codehaus.jackson.JsonGenerationException, org.codehaus.jackson.map.JsonMappingException, java.io.IOException
EventData
in a stringdata
- the EventData
org.codehaus.jackson.JsonGenerationException
- Exception thrown when eventData is save as JSON dataorg.codehaus.jackson.map.JsonMappingException
- Exception thrown when eventData is save as JSON datajava.io.IOException
- Exception thrown when eventData is save as JSON datapublic java.util.List<EventData> readEventFile(java.io.File file) throws java.io.IOException
EventData
from a filefile
- the file to readEventData
java.io.IOException
- Exception thrown when reading the filepublic java.io.File getEventDirectory()
public java.io.File getEventFile(java.io.File directory, java.util.Date date)
date
- the date used to compute the filenamedirectory
- the directory Filepublic org.codehaus.jackson.map.ObjectMapper getObjectMapper()
ObjectMapper
(cached in the class)ObjectMapper
public void addAgent(AbstractStatisticAgent agent)
AbstractStatisticAgent
to agent listagent
- the AbstractStatisticAgent
to addpublic void removeAgent(AbstractStatisticAgent agent)
AbstractStatisticAgent
from agent listagent
- the AbstractStatisticAgent
to removepublic java.util.List<AbstractStatisticAgent> getAgents()
AbstractStatisticAgent
list (a copy of internal agent list)public java.util.Map<java.lang.String,java.lang.String> getRequestCustomContextMap(javax.servlet.http.HttpServletRequest request)
Map
which will be merge with existing context if it exists before writing EventData
request
- the current HttpServletRequest
(if null, context map will be get from a ThreadLocal object)public java.util.Map<java.lang.String,java.lang.String> getThreadLocalCustomContextMap()
Map
which will be merge with existing context if it exists before writing EventData
context map will be get from a ThreadLocal objectpublic static void appendEventData(EventData eventData) throws org.codehaus.jackson.JsonGenerationException, org.codehaus.jackson.map.JsonMappingException, java.io.IOException
eventData
- the EventData
to save. Context map will be extended if getRequestCustomContextMap(HttpServletRequest)
or getThreadLocalCustomContextMap()
contains somethingorg.codehaus.jackson.JsonGenerationException
- thrown when saving EventData
org.codehaus.jackson.map.JsonMappingException
- thrown when saving EventData
java.io.IOException
- thrown when saving EventData
public static void appendEventData(EventData eventData, javax.servlet.http.HttpServletRequest request) throws org.codehaus.jackson.JsonGenerationException, org.codehaus.jackson.map.JsonMappingException, java.io.IOException
eventData
- the EventData
to save. Context map will be extended if getRequestCustomContextMap(HttpServletRequest)
or getThreadLocalCustomContextMap()
contains somethingrequest
- the current HttpServletRequest
used to get extendedContextMap. See getRequestCustomContextMap(HttpServletRequest)
for more informationorg.codehaus.jackson.JsonGenerationException
- thrown when saving EventData
org.codehaus.jackson.map.JsonMappingException
- thrown when saving EventData
java.io.IOException
- thrown when saving EventData
public static void appendEventData(EventData eventData, javax.servlet.http.HttpServletRequest request, java.io.File eventDirectory) throws org.codehaus.jackson.JsonGenerationException, org.codehaus.jackson.map.JsonMappingException, java.io.IOException
eventData
- the EventData
to save. Context map will be extended if getRequestCustomContextMap(HttpServletRequest)
or getThreadLocalCustomContextMap()
contains somethingrequest
- the current HttpServletRequest
used to get extendedContextMap getRequestCustomContextMap(HttpServletRequest)
for more informationeventDirectory
- the directory in which event should be savedorg.codehaus.jackson.JsonGenerationException
- thrown when saving EventData
org.codehaus.jackson.map.JsonMappingException
- thrown when saving EventData
java.io.IOException
- thrown when saving EventData
public static void appendPageEvent(javax.servlet.http.HttpServletRequest request, long startPageRequest) throws org.codehaus.jackson.JsonGenerationException, org.codehaus.jackson.map.JsonMappingException, java.io.IOException
request
- the current HttpServletRequest
startPageRequest
- the start time of the page requestorg.codehaus.jackson.JsonGenerationException
- thrown when saving EventData
org.codehaus.jackson.map.JsonMappingException
- thrown when saving EventData
java.io.IOException
- thrown when saving EventData
protected static void appendPageEvent(javax.servlet.http.HttpServletRequest request, long startPageRequest, long endPageRequest, long eventDate, java.io.File eventDirectory) throws org.codehaus.jackson.JsonGenerationException, org.codehaus.jackson.map.JsonMappingException, java.io.IOException
request
- the current HttpServletRequest
rstartPageRequest
- the start time of the page requestendPageRequest
- the end time of the page requesteventDate
- the Date of the eventeventDirectory
- the directory in which event should be savedorg.codehaus.jackson.JsonGenerationException
- thrown when saving EventData
org.codehaus.jackson.map.JsonMappingException
- thrown when saving EventData
java.io.IOException
- thrown when saving EventData
public static java.util.Map<java.lang.String,java.lang.String> generateAccessContextMap(javax.servlet.http.HttpServletRequest request, EventData eventData)
public static java.util.SortedSet<java.lang.String> getBrowsers(java.lang.String userAgent)
public static java.util.SortedSet<java.lang.String> getBots(java.lang.String userAgent)
public static void processQueries(java.util.Map<java.lang.String,java.lang.String> ctxMap)
public void runDayAgent(java.util.Date startDate, java.util.Date endDate, Workspace workspace, java.lang.String urid, boolean scheduled, boolean globalAnalyze)
startDate
- the start day of the periodendDate
- the end day of the periodworkspace
- Workspace
to limit analyze (null for all workspaces)urid
- the urid used in analysisscheduled
- is the run a manual run or from a schedule (alarm)globalAnalyze
- do global analyze (workspace == null in agent and report)public void runDayAgent(java.util.Date startDate, java.util.Date endDate, java.util.Set<Workspace> workspaceSet, java.lang.String urid, java.io.File eventDirectory, java.util.Set<AbstractStatisticAgent> dayAgentList, boolean scheduled, boolean globalAnalyze)
startDate
- the start day of the periodendDate
- the end day of the periodurid
- the urid used in analysisworkspaceSet
- Workspace
Set to limit analyze (null for all workspaces)eventDirectory
- the directory in which events file are presentdayAgentList
- Set
of agent to runscheduled
- is the run a manual run or from alarmglobalAnalyze
- do global analyze (workspace == null in agent and report)public void runPeriodAgent(java.util.Date startDate, java.util.Date endDate, AbstractPeriod period, java.util.Set<Workspace> workspaceSet, java.lang.String urid, java.io.File eventDirectory, java.util.Set<AbstractStatisticAgent> agentList, boolean scheduled, boolean globalAnalyze)
startDate
- the start day of the interval (also start date of the analyzed period)endDate
- the end day of the interval (if analyzed period is greater than endDate, the real end date will be the end of the period or today)period
- the AbstractPeriod
of the analysisurid
- the urid used in analysisworkspaceSet
- Workspace
Set to limit analyze (null for all workspaces)eventDirectory
- the directory in which events file are presentagentList
- Set
of agent to runscheduled
- is the run a manual run or from alarmglobalAnalyze
- do global analyze (workspace == null in agent and report)public java.util.List<AnalyzeListener> getCurrentAnalyzeListener()
List
of AnalyzeListener
public void deleteAnalyze(AnalyzeListener listener)
listener
- the AnalyzeListener
to removepublic void initAlarms()
public void reinitAlarms()
public void runDayAgentFromAlarm()
public void runDayAgent()
public static java.util.Calendar getUtcTime(java.util.Date reportDate, java.util.Locale userLocale)
reportDate
- the dateuserLocale
- the localepublic static void completeMetricObjectSet(java.util.Set<AbstractReportMetric> originalSet, java.util.Date startDate, java.util.Date endDate, java.util.Locale locale, java.lang.Class<? extends AbstractReportMetric> clazz) throws java.lang.InstantiationException, java.lang.IllegalAccessException
originalSet
- the original Set of AbstractReportMetricstartDate
- the start date of the intervalendDate
- the end date of the intervallocale
- the current locale (used to compute Calendar object)clazz
- AbstractReportMetric subclass to instantiatejava.lang.IllegalAccessException
- Exception thrown during the executionjava.lang.InstantiationException
- Exception thrown during the executionpublic static java.util.Set<AbstractReportMetric> aggregateAllUrid(java.util.Set<AbstractReportMetric> originalSet, java.lang.Class<? extends AbstractReportMetric> clazz) throws java.lang.InstantiationException, java.lang.IllegalAccessException
originalSet
- the original Set of AbstractReportMetricclazz
- AbstractReportMetric subclass to instantiatejava.lang.IllegalAccessException
- Exception thrown during the executionjava.lang.InstantiationException
- Exception thrown during the executionpublic static void aggregateKeyIntegerMap(java.util.Map<java.lang.String,java.lang.Integer> origMap, java.util.Map<java.lang.String,java.lang.Integer> mapToAdd)
public static void aggregateKeyLongMap(java.util.Map<java.lang.String,java.lang.Long> origMap, java.util.Map<java.lang.String,java.lang.Long> mapToAdd)
public static void aggregateDateKeyDoubleMap(java.util.Map<java.util.Date,java.lang.Double> origMap, java.util.Map<java.util.Date,java.lang.Double> mapToAdd)
public java.util.SortedMap<java.lang.String,java.lang.Integer> getSortedTopMap(java.util.Map<java.lang.String,java.lang.Integer> topMap, int nbMaxElt)
public java.util.SortedMap<java.lang.String,java.lang.Double> getSortedTopDoubleMap(java.util.Map<java.lang.String,java.lang.Double> topMap, int nbMaxElt)
public static java.util.Map<java.lang.String,ContentTopValue> getDeserializedContentTopMap(java.util.Map<java.lang.String,java.lang.String> contentTopMap)
ContentTopValue
contentTopMap
- the Map
Map
public static java.util.Map<java.lang.String,java.lang.String> getSerializedContentTopMap(java.util.Map<java.lang.String,ContentTopValue> contentTopMap)
ContentTopValue
to map of StringcontentTopMap
- the Map
Map
public static void aggregateKeyContentTopMap(java.util.Map<java.lang.String,ContentTopValue> origContentTopMap, java.util.Map<java.lang.String,ContentTopValue> mapToAdd)
public static java.util.SortedMap<java.lang.String,ContentTopValue> getSortedContentTopMap(java.util.Map<java.lang.String,ContentTopValue> origContentTopMap, int nbMaxElt)
public static java.lang.String getActionFromOp(int opAction)
public static boolean isValidOperationAction(java.lang.String opAction)
public static java.lang.String getUrlSubString(java.lang.String value, int maxLength)
public static java.lang.String toJSON(java.lang.Object obj)
public static void removeToDayMetric(java.util.Set<AbstractReportMetric> originalSet)
originalSet
- the AbstractReportMetric
Set
public static boolean isBot(EventData data)
public static java.util.Set<Workspace> getCompatibleWorkspaceSet()
Set
of compatible Workspace
public static java.util.Set<Workspace> getCompatibleWorkspaceSet(Member loggedMember)
loggedMember
- Member to check rightsSet
of compatible Workspace
public static java.util.Map<java.lang.String,java.util.Map<java.util.Date,java.lang.Double>> normalizeMap(java.util.Map<java.lang.String,java.util.Map<java.util.Date,java.lang.Double>> dataMap)
dataMap
- the map to normalizepublic static java.util.Map<java.lang.String,java.util.Map<java.util.Date,java.lang.Double>> keptBest(java.util.Map<java.lang.String,java.util.Map<java.util.Date,java.lang.Double>> dataMap, int nbElement, java.lang.String othersKey)
dataMap
- the data mapnbElement
- the number of non grouped elementothersKey
- the key of grouped elementprotected static MonitoredInputStream getFileMonitoredStream(java.io.File file) throws java.io.FileNotFoundException
java.io.FileNotFoundException
Copyright © 2001-2010 Jalios SA. All Rights Reserved.