Package com.jalios.jcms.analytics
Class AnalyticsManager
java.lang.Object
com.jalios.jcms.ChannelListener
com.jalios.jcms.analytics.AnalyticsManager
- All Implemented Interfaces:
PluginComponent,JPropertiesListener,Comparable
AnalyticsManager use for JCMS analytics
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classclassclassclassclassstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final org.apache.oro.text.regex.Patternstatic final org.apache.oro.text.regex.Patternstatic final intstatic final org.apache.oro.text.regex.Patternstatic final intstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic String[]static String[]static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class com.jalios.jcms.ChannelListener
order -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAgent(AbstractStatisticAgent agent) add aAbstractStatisticAgentto agent listvoidaddEventDataListener(EventDataListener listener) static Set<AbstractReportMetric> aggregateAllUrid(Set<AbstractReportMetric> originalSet, Class<? extends AbstractReportMetric> clazz) Aggregate all urid report in global report (day by day)static voidstatic voidaggregateKeyContentTopMap(Map<String, ContentTopValue> origContentTopMap, Map<String, ContentTopValue> mapToAdd) static voidstatic voidstatic voidappendEventData(EventData eventData) Append a data eventstatic voidappendEventData(EventData eventData, javax.servlet.http.HttpServletRequest request) Append a data eventstatic voidappendPageEvent(javax.servlet.http.HttpServletRequest request, long startPageRequest) Append a page event (like previous page stat mechanism)protected static voidappendPageEvent(javax.servlet.http.HttpServletRequest request, long startPageRequest, long endPageRequest, long eventDate) Append a page event (like previous page stat mechanism)booleanstatic voidcompleteMetricObjectSet(Set<AbstractReportMetric> originalSet, Date startDate, Date endDate, Locale locale, Class<? extends AbstractReportMetric> clazz) Update the provided set with some empty report metric instance if any are missing in specified intervalstatic RatioSeriesUtil method use in analytics display (to avoid lambda in JSP)voiddeleteAnalyze(AnalyzeListener listener) booleanstatic StringencodeContentTopValueMapForJsonCsv(Map<String, ContentTopValue> valueMap, String idColumnName, String secondColumnName, String valueColumnName, String userLang, Class<?> keyClass) static StringencodeContentTopValueMapForJsonCsv(Map<String, ContentTopValue> valueMap, String idColumnName, String secondColumnName, String valueColumnName, String userLang, String keyType) static StringencodeForJsonCsv(String userLang, PieChart chart) static StringencodeForJsonCsv(String userLang, ZoneId zoneId, TimeChart chart) static StringencodeForJsonCsv(Map<String, Integer> valueMap, String idColumnName, String secondColumnName, String valueColumnName, String userLang, Class<?> keyClass) static StringencodeForJsonCsv(Map<String, Integer> valueMap, String idColumnName, String secondColumnName, String valueColumnName, String userLang, String keyType) generateAccessContextMap(javax.servlet.http.HttpServletRequest request, EventData eventData) static StringgetActionFromOp(int opAction) GetAbstractStatisticAgentlist (a copy of internal agent list)longindicate when ajax display must be used in report displaySet<Class<? extends AbstractReportMetric>> intgetBrowsers(String userAgent) Get compatible workspaces for analyze (workspace model are ignored) (without any right check)getCompatibleWorkspaceSet(Member loggedMember) Get compatible workspaces for analyze (workspace model are ignored)Retrieve the current analyze listenerintstatic Map<String, ContentTopValue> getDeserializedContentTopMap(Map<String, String> contentTopMap) Convert a Map of String to map ofContentTopValuegetEventDataProvider(StatisticContext context) static AnalyticsManagercom.fasterxml.jackson.databind.ObjectMapperget theObjectMapper(cached in the class)getRequestCustomContextMap(javax.servlet.http.HttpServletRequest request) getSerializedContentTopMap(Map<String, ContentTopValue> contentTopMap) Convert a Map ofContentTopValueto map of Stringstatic SortedMap<String, ContentTopValue> getSortedContentTopMap(Map<String, ContentTopValue> origContentTopMap) static SortedMap<String, ContentTopValue> getSortedContentTopMap(Map<String, ContentTopValue> origContentTopMap, int nbMaxElt) getSortedTopDoubleMap(Map<String, Double> topMap) getSortedTopDoubleMap(Map<String, Double> topMap, int nbMaxElt) getSortedTopMap(Map<String, Integer> topMap) getSortedTopMap(Map<String, Integer> topMap, int nbMaxElt) static StringgetUrlSubString(String value, int maxLength) static CalendargetUtcTime(Date reportDate, Locale userLocale) Retrieve a UTC time from a datevoidCalled when the channel is finalizedvoidinit analytics alarmsstatic booleanbooleanbooleanstatic booleanisSearchRequest(String uri, String queryString) static booleanisValidOperationAction(String opAction) Compute a new map by top x data and grouping other data.Normalize a Map<String, Map<Date, Double>> Map to have value in percentage day by daystatic Set<AbstractReportMetric> prepareMetricSet(Set<AbstractReportMetric> originalSet, Date startDate, Date endDate, Locale locale, Class<?> clazz) static voidprocessQueries(Map<String, String> ctxMap) voidpropertiesChange(JProperties properties) Invoked after properties have been modified in JCMS and save on disk.voidpurgeReports(MetricFrequency frequency, Date purgeLimit) voidReinitAlarms (remove all analytics alarms from analytics alarm manager and init alarms)voidremove aAbstractStatisticAgentfrom agent listbooleanremoveEventDataListener(EventDataListener listener) voidstatic voidremoveToDayMetric(Set<AbstractReportMetric> originalSet) Remove today metric, because this metric is not done.voidvoidvoidrun day agent with management of missing aggregation (manual run)voidrunDayAgent(Date startDate, Date endDate, Workspace workspace, String urid, boolean scheduled, boolean globalAnalyze) Run day agent in a specific periodvoidrunDayAgent(Date startDate, Date endDate, Workspace workspace, String urid, boolean scheduled, boolean globalAnalyze, Date ignoreBeforeDate) Run day agent in a specific periodvoidrunDayAgent(Date startDate, Date endDate, Set<Workspace> workspaceSet, String urid, Set<AbstractStatisticAgent> dayAgentList, boolean scheduled, boolean globalAnalyze) Run day agent in the specified periodvoidrunDayAgent(Date startDate, Date endDate, Set<Workspace> workspaceSet, String urid, Set<AbstractStatisticAgent> dayAgentList, boolean scheduled, boolean globalAnalyze, Date ignoreBeforeDate) Run day agent in the specified periodvoidrun day agent with management of missing aggregation (from an alarm).voidrunPeriodAgent(Date startDate, Date endDate, AbstractPeriod period, Set<Workspace> workspaceSet, String urid, Set<AbstractStatisticAgent> agentList, boolean scheduled, boolean globalAnalyze) Run agent with a custom period in a specified intervalvoidrunPeriodAgent(Date startDate, Date endDate, AbstractPeriod period, Set<Workspace> workspaceSet, String urid, Set<AbstractStatisticAgent> agentList, boolean scheduled, boolean globalAnalyze, Date ignoreBeforeDate) Run agent with a custom period in a specified intervalvoidrunPurge()serializeEvent(EventData data) Serialize anEventDatain a stringstatic Stringstatic TimeChartSeriestoWeeklyDisplaySeries(TimeChartSeries series, Date beginDate, Date endDate) Methods inherited from class com.jalios.jcms.ChannelListener
compareTo, equals, getOrder, init, initAfterStartup, initAfterStoreLoad, initBeforeHibernateFactoryBuild, initBeforeStoreLoad
-
Field Details
-
STORAGE_HANDLER_PROP_PREFIX
- See Also:
-
JCMS_ANALYTICS_ALARM_MANAGER
- See Also:
-
ANALYTICS_CONTEXT_MAP
- See Also:
-
CSV_COLUMN_PREFIX
- See Also:
-
ANALYTICS_RESOLVEHOST_PROP
- See Also:
-
SAFARI
- See Also:
-
CHROME
- See Also:
-
DOWNLOAD
- See Also:
-
IPADDRESS
- See Also:
-
METHODE
- See Also:
-
REFERER
- See Also:
-
SCHEME
- See Also:
-
SERVERNAME
- See Also:
-
URI
- See Also:
-
CONTEXT_PATH
- See Also:
-
APP_URI
- See Also:
-
QUERYSTRING
- See Also:
-
SESSIONID
- See Also:
-
USERAGENT
- See Also:
-
ZONE
- See Also:
-
MEMO
- See Also:
-
NAME
- See Also:
-
SERVERPORT
- See Also:
-
LOCALE
- See Also:
-
DATESTART
- See Also:
-
DATEEND
- See Also:
-
DATA
- See Also:
-
DATA_TYPE
- See Also:
-
MEMBER
- See Also:
-
GROUPS
- See Also:
-
PORTAL
- See Also:
-
PORTAL_TITLE
- See Also:
-
PORTAL_REDIRECT
- See Also:
-
WORKSPACE
- See Also:
-
CURRENTCAT
- See Also:
-
PORTALCAT
- See Also:
-
CTXTCAT
- See Also:
-
PUBLICATION
- See Also:
-
BELONGS_TO_WORKSPACE
- See Also:
-
BROWSER
- See Also:
-
OS
- See Also:
-
COUNTRY
- See Also:
-
LANGUAGE
- See Also:
-
SEARCH_MODE
- See Also:
-
SEARCH_FULLTEXT
- See Also:
-
SEARCH_CATEGORY
- See Also:
-
SEARCH_GROUPS
- See Also:
-
SEARCH_MEMBERS
- See Also:
-
SEARCH_TYPES
- See Also:
-
SEARCH_SORT
- See Also:
-
SEARCH_HIST
- See Also:
-
URID
- See Also:
-
AUDIENCEMENT
- See Also:
-
XFORWARD
- See Also:
-
PRINT_VIEW
- See Also:
-
AUTHENTICATION_HANDLER
- See Also:
-
IS_BOT
- See Also:
-
DATA_WORKSPACES
- See Also:
-
OLD_DATA_WORKSPACES
- See Also:
-
WF_ID
- See Also:
-
PSTATUS
- See Also:
-
OLD_WF_ID
- See Also:
-
OLD_PSTATUS
- See Also:
-
PATTERN_NOT_PROCESSED
public static final int PATTERN_NOT_PROCESSED- See Also:
-
PATTERN_PROCESSED_TRUE
public static final int PATTERN_PROCESSED_TRUE- See Also:
-
PATTERN_PROCESSED_FALSE
public static final int PATTERN_PROCESSED_FALSE- See Also:
-
BROWSERS_PROP
-
OS_PROP
-
BOT_PROP
-
PATTERN_BOT
public static final org.apache.oro.text.regex.Pattern PATTERN_BOT -
PATTERN_BROWSER
public static final org.apache.oro.text.regex.Pattern PATTERN_BROWSER -
PATTERN_OS
public static final org.apache.oro.text.regex.Pattern PATTERN_OS -
CORE
- See Also:
-
ACCESS
- See Also:
-
USAGE
- See Also:
-
OPENAPI
- See Also:
-
PUSH
- See Also:
-
SEARCH_TYPE_KEY
- See Also:
-
AC_SEARCH_TYPE
- See Also:
-
NORMAL_SEARCH_TYPE
- See Also:
-
NONE_SEARCH_TYPE
- See Also:
-
CSRF_ERROR
- See Also:
-
AUTH_FAIL
- See Also:
-
OPENAPI_UNAVAILABLE
- See Also:
-
OPENAPI_DISABLED
- See Also:
-
OPENAPI_ERROR
- See Also:
-
OPENAPI_READ_ACCESS_DISABLED
- See Also:
-
OPENAPI_READ_ACCESS_FORBIDDEN
- See Also:
-
OPENAPI_WRITE_ACCESS_DISABLED
- See Also:
-
OPENAPI_WRITE_ACCESS_FORBIDDEN
- See Also:
-
OPENAPI_GLOBAL_DATA_WRITE_DISABLED
- See Also:
-
OPENAPI_OK
- See Also:
-
SEARCH_ALLOWED_QS
-
SEARCH_ALLOWED_URI
-
dayAgentConfiguration
-
-
Method Details
-
getInstance
-
isDisable
public boolean isDisable() -
isEventDataProcessing
public boolean isEventDataProcessing() -
addEventDataListener
-
removeEventDataListener
-
getEventDataListenerSet
-
getBatchSize
public int getBatchSize() -
getDateRangeInMonths
public int getDateRangeInMonths() -
propertiesChange
Description copied from interface:JPropertiesListenerInvoked after properties have been modified in JCMS and save on disk.You cannot alter the value received in parameters.
Note that properties parameter may be null, a limited set of site properties, or all site properties.
To check that a property has been modified, reload the "current" property instead using
channel.getPropertiesorchannel.getProperty.- Specified by:
propertiesChangein interfaceJPropertiesListener- Parameters:
properties- the properties which have been submitted to change
-
displayAnonymousVisitorData
public boolean displayAnonymousVisitorData() -
checkRequirements
public boolean checkRequirements() -
serializeEvent
Serialize anEventDatain a string- Parameters:
data- theEventData- Returns:
- the JSON value
- Throws:
IOException- Exception thrown when eventData is save as JSON data
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()get theObjectMapper(cached in the class)- Returns:
- the
ObjectMapper
-
addAgent
add aAbstractStatisticAgentto agent list- Parameters:
agent- theAbstractStatisticAgentto add
-
removeAgent
remove aAbstractStatisticAgentfrom agent list- Parameters:
agent- theAbstractStatisticAgentto remove
-
getAgents
GetAbstractStatisticAgentlist (a copy of internal agent list)- Returns:
- the copy of internal agent list
-
getRequestCustomContextMap
- Parameters:
request- the currentHttpServletRequest(if null, context map will be get from a ThreadLocal object)- Returns:
- the context Map
-
getThreadLocalCustomContextMap
Get the contextMapwhich will be merge with existing context if it exists before writingEventDatacontext map will be get from a ThreadLocal object- Returns:
- the context Map
-
removeThreadLocalCustomContextMap
public void removeThreadLocalCustomContextMap() -
appendEventData
Append a data event- Parameters:
eventData- theEventDatato save. Context map will be extended ifgetRequestCustomContextMap(HttpServletRequest)orgetThreadLocalCustomContextMap()contains something- Throws:
IOException- thrown when savingEventData
-
appendEventData
public static void appendEventData(EventData eventData, javax.servlet.http.HttpServletRequest request) throws IOException Append a data event- Parameters:
eventData- theEventDatato save. Context map will be extended ifgetRequestCustomContextMap(HttpServletRequest)orgetThreadLocalCustomContextMap()contains somethingrequest- the currentHttpServletRequestused to get extendedContextMapgetRequestCustomContextMap(HttpServletRequest)for more information- Throws:
IOException- thrown when savingEventData
-
appendPageEvent
public static void appendPageEvent(javax.servlet.http.HttpServletRequest request, long startPageRequest) throws IOException Append a page event (like previous page stat mechanism)- Parameters:
request- the currentHttpServletRequeststartPageRequest- the start time of the page request- Throws:
IOException- thrown when savingEventData
-
appendPageEvent
protected static void appendPageEvent(javax.servlet.http.HttpServletRequest request, long startPageRequest, long endPageRequest, long eventDate) throws IOException Append a page event (like previous page stat mechanism)- Parameters:
request- the currentHttpServletRequestrstartPageRequest- the start time of the page requestendPageRequest- the end time of the page requesteventDate- the Date of the event- Throws:
IOException- thrown when savingEventData
-
generateAccessContextMap
-
getBrowsers
-
getBots
-
processQueries
-
isSearchRequest
-
runDayAgent
public void runDayAgent(Date startDate, Date endDate, Workspace workspace, String urid, boolean scheduled, boolean globalAnalyze) Run day agent in a specific period- Parameters:
startDate- the start day of the periodendDate- the end day of the periodworkspace-Workspaceto 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)
-
runDayAgent
public void runDayAgent(Date startDate, Date endDate, Workspace workspace, String urid, boolean scheduled, boolean globalAnalyze, Date ignoreBeforeDate) Run day agent in a specific period- Parameters:
startDate- the start day of the periodendDate- the end day of the periodworkspace-Workspaceto 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)ignoreBeforeDate- the date used to lower limit of files used for analyze (may be null for no lower limit)
-
runDayAgent
public void runDayAgent(Date startDate, Date endDate, Set<Workspace> workspaceSet, String urid, Set<AbstractStatisticAgent> dayAgentList, boolean scheduled, boolean globalAnalyze) Run day agent in the specified period- Parameters:
startDate- the start day of the periodendDate- the end day of the periodworkspaceSet-WorkspaceSet to limit analyze (null for all workspaces)urid- the urid used in analysisdayAgentList-Setof agent to runscheduled- is the run a manual run or from alarmglobalAnalyze- do global analyze (workspace == null in agent and report)
-
runDayAgent
public void runDayAgent(Date startDate, Date endDate, Set<Workspace> workspaceSet, String urid, Set<AbstractStatisticAgent> dayAgentList, boolean scheduled, boolean globalAnalyze, Date ignoreBeforeDate) Run day agent in the specified period- Parameters:
startDate- the start day of the periodendDate- the end day of the periodworkspaceSet-WorkspaceSet to limit analyze (null for all workspaces)urid- the urid used in analysisdayAgentList-Setof agent to runscheduled- is the run a manual run or from alarmglobalAnalyze- do global analyze (workspace == null in agent and report)ignoreBeforeDate- the date used to lower limit of files used for analyze (may be null for no lower limit)
-
runPeriodAgent
public void runPeriodAgent(Date startDate, Date endDate, AbstractPeriod period, Set<Workspace> workspaceSet, String urid, Set<AbstractStatisticAgent> agentList, boolean scheduled, boolean globalAnalyze) Run agent with a custom period in a specified interval- Parameters:
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- theAbstractPeriodof the analysisworkspaceSet-WorkspaceSet to limit analyze (null for all workspaces)urid- the urid used in analysisagentList-Setof agent to runscheduled- is the run a manual run or from alarmglobalAnalyze- do global analyze (workspace == null in agent and report)
-
runPeriodAgent
public void runPeriodAgent(Date startDate, Date endDate, AbstractPeriod period, Set<Workspace> workspaceSet, String urid, Set<AbstractStatisticAgent> agentList, boolean scheduled, boolean globalAnalyze, Date ignoreBeforeDate) Run agent with a custom period in a specified interval- Parameters:
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- theAbstractPeriodof the analysisworkspaceSet-WorkspaceSet to limit analyze (null for all workspaces)urid- the urid used in analysisagentList-Setof agent to runscheduled- is the run a manual run or from alarmglobalAnalyze- do global analyze (workspace == null in agent and report)ignoreBeforeDate- the date used to lower limit of files used for analyze (may be null for no lower limit)
-
getCurrentAnalyzeListener
Retrieve the current analyze listener- Returns:
- the
ListofAnalyzeListener
-
deleteAnalyze
- Parameters:
listener- theAnalyzeListenerto remove
-
initAlarms
public void initAlarms()init analytics alarms -
reinitAlarms
public void reinitAlarms()ReinitAlarms (remove all analytics alarms from analytics alarm manager and init alarms) -
runCompress
public void runCompress() -
runPurge
public void runPurge() -
runAggregateWeeklyData
public void runAggregateWeeklyData() -
purgeReports
-
getAllSubClasses
-
runDayAgentFromAlarm
public void runDayAgentFromAlarm()run day agent with management of missing aggregation (from an alarm). -
runDayAgent
public void runDayAgent()run day agent with management of missing aggregation (manual run) -
getIgnoreBeforeDate
-
getUtcTime
Retrieve a UTC time from a date- Parameters:
reportDate- the dateuserLocale- the locale- Returns:
- the UTC time
-
completeMetricObjectSet
public static void completeMetricObjectSet(Set<AbstractReportMetric> originalSet, Date startDate, Date endDate, Locale locale, Class<? extends AbstractReportMetric> clazz) throws ReflectiveOperationException Update the provided set with some empty report metric instance if any are missing in specified interval- Parameters:
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 instantiate- Throws:
ReflectiveOperationException- Exception thrown during the execution
-
prepareMetricSet
public static Set<AbstractReportMetric> prepareMetricSet(Set<AbstractReportMetric> originalSet, Date startDate, Date endDate, Locale locale, Class<?> clazz) -
toWeeklyDisplaySeries
public static TimeChartSeries toWeeklyDisplaySeries(TimeChartSeries series, Date beginDate, Date endDate) -
aggregateAllUrid
public static Set<AbstractReportMetric> aggregateAllUrid(Set<AbstractReportMetric> originalSet, Class<? extends AbstractReportMetric> clazz) throws ReflectiveOperationException Aggregate all urid report in global report (day by day)- Parameters:
originalSet- the original Set of AbstractReportMetricclazz- AbstractReportMetric subclass to instantiate- Returns:
- the new Set with report aggregated
- Throws:
ReflectiveOperationException- Exception thrown during the execution
-
aggregateKeyIntegerMap
-
aggregateKeyLongMap
-
aggregateDateKeyDoubleMap
-
getSortedTopMap
-
getSortedTopMap
-
getSortedTopDoubleMap
-
getSortedTopDoubleMap
-
getDeserializedContentTopMap
public static Map<String,ContentTopValue> getDeserializedContentTopMap(Map<String, String> contentTopMap) Convert a Map of String to map ofContentTopValue -
getSerializedContentTopMap
public static Map<String,String> getSerializedContentTopMap(Map<String, ContentTopValue> contentTopMap) Convert a Map ofContentTopValueto map of String -
aggregateKeyContentTopMap
public static void aggregateKeyContentTopMap(Map<String, ContentTopValue> origContentTopMap, Map<String, ContentTopValue> mapToAdd) -
getSortedContentTopMap
public static SortedMap<String,ContentTopValue> getSortedContentTopMap(Map<String, ContentTopValue> origContentTopMap, int nbMaxElt) -
getSortedContentTopMap
public static SortedMap<String,ContentTopValue> getSortedContentTopMap(Map<String, ContentTopValue> origContentTopMap) -
getActionFromOp
-
isValidOperationAction
-
getUrlSubString
-
toJSON
-
removeToDayMetric
Remove today metric, because this metric is not done.- Parameters:
originalSet- theAbstractReportMetricSet
-
isBot
-
getCompatibleWorkspaceSet
Get compatible workspaces for analyze (workspace model are ignored) (without any right check) -
getCompatibleWorkspaceSet
Get compatible workspaces for analyze (workspace model are ignored) -
normalizeMap
Normalize a Map<String, Map<Date, Double>> Map to have value in percentage day by day- Parameters:
dataMap- the map to normalize- Returns:
- the new normalized Map
-
keptBest
public static Map<String,Map<Date, keptBestDouble>> (Map<String, Map<Date, Double>> dataMap, int nbElement, String othersKey) Compute a new map by top x data and grouping other data.- Parameters:
dataMap- the data mapnbElement- the number of non grouped elementothersKey- the key of grouped element- Returns:
- the new map with grouped data
-
getAjaxDisplayMinimumPeriod
public long getAjaxDisplayMinimumPeriod()indicate when ajax display must be used in report display- Returns:
- the mininum period between the begin and end date of report display to use ajax asynchronous rendering.
-
createRatioSeries
public static RatioSeries createRatioSeries(Map<String, Integer> map, String prefix, String userLang) Util method use in analytics display (to avoid lambda in JSP)- Parameters:
map- the inputMapprefix- the prefix to use for labeluserLang- the userLang used to get serie's label- Returns:
- the
RatioSeries
-
getEventDataProvider
-
encodeForJsonCsv
public static String encodeForJsonCsv(String userLang, PieChart chart) throws com.fasterxml.jackson.core.JsonGenerationException, com.fasterxml.jackson.databind.JsonMappingException, IOException - Throws:
com.fasterxml.jackson.core.JsonGenerationExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionIOException
-
encodeForJsonCsv
public static String encodeForJsonCsv(String userLang, ZoneId zoneId, TimeChart chart) throws com.fasterxml.jackson.core.JsonGenerationException, com.fasterxml.jackson.databind.JsonMappingException, IOException - Throws:
com.fasterxml.jackson.core.JsonGenerationExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionIOException
-
encodeForJsonCsv
public static String encodeForJsonCsv(Map<String, Integer> valueMap, String idColumnName, String secondColumnName, String valueColumnName, String userLang, Class<?> keyClass) throws com.fasterxml.jackson.core.JsonGenerationException, com.fasterxml.jackson.databind.JsonMappingException, IOException- Throws:
com.fasterxml.jackson.core.JsonGenerationExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionIOException
-
encodeForJsonCsv
public static String encodeForJsonCsv(Map<String, Integer> valueMap, String idColumnName, String secondColumnName, String valueColumnName, String userLang, String keyType) throws com.fasterxml.jackson.core.JsonGenerationException, com.fasterxml.jackson.databind.JsonMappingException, IOException- Throws:
com.fasterxml.jackson.core.JsonGenerationExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionIOException
-
encodeContentTopValueMapForJsonCsv
public static String encodeContentTopValueMapForJsonCsv(Map<String, ContentTopValue> valueMap, String idColumnName, String secondColumnName, String valueColumnName, String userLang, Class<?> keyClass) throws com.fasterxml.jackson.core.JsonGenerationException, com.fasterxml.jackson.databind.JsonMappingException, IOException- Throws:
com.fasterxml.jackson.core.JsonGenerationExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionIOException
-
encodeContentTopValueMapForJsonCsv
public static String encodeContentTopValueMapForJsonCsv(Map<String, ContentTopValue> valueMap, String idColumnName, String secondColumnName, String valueColumnName, String userLang, String keyType) throws com.fasterxml.jackson.core.JsonGenerationException, com.fasterxml.jackson.databind.JsonMappingException, IOException- Throws:
com.fasterxml.jackson.core.JsonGenerationExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionIOException
-
handleFinalize
public void handleFinalize()Description copied from class:ChannelListenerCalled when the channel is finalized- Overrides:
handleFinalizein classChannelListener
-