public class StatManager extends java.lang.Object implements JcmsConstants, JPropertiesListener
Modifier and Type | Class and Description |
---|---|
static class |
StatManager.StatFileComparator
Extract Date from File Name then compare two file dates
|
Modifier and Type | Field and Description |
---|---|
protected static java.util.Map |
analyseMap |
static long |
MAX_REQUEST_DURATION |
static long |
REQUEST_TIMEOUT |
static java.lang.String |
REVISION |
static long |
SESSION_TIMEOUT |
static java.lang.String |
STAT_FILE_PATTERN |
protected static org.apache.oro.text.regex.Pattern[][] |
STAT_IGNORE_PATTERN |
static java.lang.String |
STAT_REPORT_PATTERN |
static ReadWriteAccessController |
statrwac |
ADATE_SEARCH, ADMIN_NOTES_PROP, ADVANCED_TAB, ARCHIVES_DIR, ASCII_WIDTH, CATEGORY_TAB, CDATE_SEARCH, COMMON_ALARM, CONTENT_TAB, COOKIE_MAX_AGE, CTRL_TOPIC_INTERNAL, CTRL_TOPIC_REF, CTRL_TOPIC_VALUE, CTRL_TOPIC_WRITE, CUSTOM_PROP, DOCCHOOSER_HEIGHT, DOCCHOOSER_WIDTH, DOCS_DIR, EDATE_SEARCH, EMAIL_REGEXP, ERROR_MSG, FORBIDDEN_FILE_ACCESS, FORBIDDEN_REDIRECT, FORCE_REDIRECT, ICON_ARCHIVE, ICON_LOCK, ICON_LOCK_STRONG, ICON_WARN, ICON_WH_BOOK_CLOSED, ICON_WH_BOOK_OPEN, INFORMATION_MSG, JALIOS_JUNIT_PROP, JCMS_CADDY, JCMS_MSG_LIST, JSYNC_DOWNLOAD_DIR, JSYNC_SYNC_ALARM, LOG_FILE, LOG_TOPIC_SECURITY, LOGGER_PROP, LOGGER_XMLPROP, MBR_PHOTO_DIR, MDATE_SEARCH, MONITOR_XML, OP_CREATE, OP_CREATE_STR, OP_DEEP_COPY, OP_DEEP_COPY_STR, OP_DEEP_DELETE, OP_DEEP_DELETE_STR, OP_DELETE, OP_DELETE_STR, OP_MERGE, OP_MERGE_STR, OP_UPDATE, OP_UPDATE_STR, PDATE_SEARCH, PHOTO_DIR, PHOTO_ICON, PHOTO_ICON_HEIGHT, PHOTO_ICON_WIDTH, PHOTO_LARGE, PHOTO_LARGE_HEIGHT, PHOTO_LARGE_WIDTH, PHOTO_NORMAL, PHOTO_NORMAL_HEIGHT, PHOTO_NORMAL_WIDTH, PHOTO_SMALL, PHOTO_SMALL_HEIGHT, PHOTO_SMALL_WIDTH, PHOTO_TINY, PHOTO_TINY_HEIGHT, PHOTO_TINY_WIDTH, PREVIOUS_TAB, PRINT_VIEW, PRIVATE_FILE_ACCESS, PUBLIC_FILE_ACCESS, READ_RIGHT_TAB, SDATE_SEARCH, SEARCHENGINE_ALARM, SESSION_AUTHORIZED_FILENAMES_SET, STATS_REPORT_DIR, STATUS_PROP, STORE_XML, TEMPLATE_TAB, THUMBNAIL_LARGE_HEIGHT, THUMBNAIL_LARGE_WIDTH, THUMBNAIL_SMALL_HEIGHT, THUMBNAIL_SMALL_WIDTH, TYPES_ICON_ALT_PROP, TYPES_ICON_SUFFIX_PROP, TYPES_ICON_TITLE_PROP, TYPES_PREFIX_PROP, TYPES_THUMB_SUFFIX_PROP, UDATE_SEARCH, UPDATE_RIGHT_TAB, UPLOAD_DIR, URL_REGEXP, WARNING_MSG, WEBAPP_PROP, WFEXPRESS_ALARM, WFREMINDER_ALARM, WORKFLOW_TAB, WORKFLOW_XML
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR
Modifier and Type | Method and Description |
---|---|
static StatHandler |
analyse(StatReport report,
Member loggedMember,
boolean join)
Analyse a report of stats from now - report.periodicity
|
static StatHandler |
analyse(StatReport report,
Member loggedMember,
boolean join,
long oldDate,
long nowDate)
Analyse a report of stats from olddate to nowdate
|
static void |
analyseAndRender(StatReport report,
Member loggedMember)
Analyse and Render a report of stats
|
static void |
analyseAndRender(StatReport report,
Member loggedMember,
long oldDate,
long nowDate)
Analyse and Render a report of stats
|
static void |
appendStatEntry(javax.servlet.http.HttpServletRequest request,
long startPageRequest)
Append a stat entry (called byte doStats.jsp)
|
static void |
appendStatEntry(javax.servlet.http.HttpServletRequest request,
long startPageRequest,
long endPageRequest)
Append a stat entry (called byte doStats.jsp)
|
protected static StatHandler |
buildStatHandler(long oldDate,
long nowDate,
PortalElement report)
Build the StatHandler
|
static boolean |
canAnalyze() |
static boolean |
canAnalyze(StatReport report,
Member member)
Check if analyse can be done on this report.
|
static boolean |
canAnalyze(StatReport report,
Member member,
StatHandler statHandler)
Check if analyse can be done on this report.
|
static boolean |
canResolveHost() |
static boolean |
canStat() |
static void |
checkRequestDuration(javax.servlet.http.HttpServletRequest req,
long startPageRequest)
This method warn if a request duration is too long
|
static StatListener |
createStatListener(PortletStat portlet,
PortalElement report)
Instanciate a StatListener from a given portlet calling StatPolicy hooks
|
static StatListener |
createStatListener(PortletStat portlet,
PortalElement report,
java.lang.String clazzstr)
Instanciate a StatListener from a given portlet without any other check
|
protected static java.lang.String |
dataToString(Data data) |
protected static java.lang.String |
dataToString(Data[] data) |
static java.util.Map |
getAllReport()
Build a [Map of Workspace] > [Map of Report] > [Set of Report Version]
|
static java.util.Map |
getAllReport(Workspace workspace)
Return all the Files representing a given report for a given workspace
|
static java.util.Set |
getAllReport(Workspace workspace,
StatReport report)
Return all the Files representing a given report for a given workspace
|
static java.util.Set |
getExistingStatFiles(long oldDate,
long nowDate)
Return the list of stat files that exist between date1 and date2.
|
static org.apache.oro.text.regex.Pattern[][] |
getIgnorePattern(Channel channel)
Return all the Pattern to find stat line to escape.
|
static StatManager |
getInstance() |
static java.util.Date |
getReportDate(java.lang.String reportName) |
static long |
getRequestTimeOut() |
static long |
getSessionTimeOut() |
static StatAnalyser |
getStatAnalyser(StatReport report,
boolean remove)
Return and remove the StatAnalyser of the given Report
|
static java.util.Set |
getStatPortletSet(PortalElement portal)
Get all portletStat under the given PortalElement
|
static java.lang.String |
getStatReportDirectory(java.lang.String workspaceId,
java.lang.String reportId)
Return the directory where to generate all the stats
|
static java.lang.String |
getStatReportFile(long date)
Return the directory where to generate all the stats
|
static MonitoredInputStream |
getStatStream(long oldDate,
long nowDate)
Return the MonitoredInputStream of stat files that exist between date1 and
date2.
|
static java.util.Set |
getWorkspaceSet(StatReport report)
Get all the workspace to use for this report.
|
void |
init() |
static boolean |
isGlobalReport(StatReport report)
Indicate if the Report is a Channel Report or a Workspace Report Look for
channel properties definition.
|
static void |
lockAnalyse(boolean lock,
StatReport report,
StatAnalyser analyser)
Lock the analyse for a given report.
|
static boolean |
matchPattern(StatEntry entry)
Check if the StatEntry match a pattern.
|
void |
propertiesChange(JProperties properties)
Invoked after properties have been modified in JCMS and save on disk.
|
static void |
render(StatHandler statHandler,
StatReport report,
Member member)
Render the statsReport.jsp to an HTMLFile
|
protected static void |
renderPortlet(StatHandler statHandler,
PortalElement portlet,
Member loggedMember,
java.lang.String statDirectory,
java.lang.String jspKey,
java.lang.String jsp,
java.lang.String html,
Workspace workspace)
Try to render a Portlet from a JSP to an html file The rendering folder
should be created
|
void |
scheduleAlarm() |
public static final java.lang.String REVISION
public static final java.lang.String STAT_FILE_PATTERN
public static final java.lang.String STAT_REPORT_PATTERN
public static final long SESSION_TIMEOUT
public static final long REQUEST_TIMEOUT
public static final long MAX_REQUEST_DURATION
protected static org.apache.oro.text.regex.Pattern[][] STAT_IGNORE_PATTERN
public static final ReadWriteAccessController statrwac
protected static final java.util.Map analyseMap
public static StatManager getInstance()
public void init()
public void scheduleAlarm()
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 static void checkRequestDuration(javax.servlet.http.HttpServletRequest req, long startPageRequest)
req
- the ServletRequeststartPageRequest
- the starting page requestpublic static void appendStatEntry(javax.servlet.http.HttpServletRequest request, long startPageRequest) throws java.io.IOException
request
- the requeststartPageRequest
- the starting time of this pagejava.io.IOException
public static void appendStatEntry(javax.servlet.http.HttpServletRequest request, long startPageRequest, long endPageRequest) throws java.io.IOException
request
- the requeststartPageRequest
- the starting time of this pagejava.io.IOException
protected static java.lang.String dataToString(Data data)
protected static java.lang.String dataToString(Data[] data)
public static org.apache.oro.text.regex.Pattern[][] getIgnorePattern(Channel channel)
channel
- public static boolean matchPattern(StatEntry entry)
entry
- public static StatAnalyser getStatAnalyser(StatReport report, boolean remove)
report
- public static StatHandler analyse(StatReport report, Member loggedMember, boolean join) throws java.lang.Exception
report
- the StatReportloggedMember
- the Member doing analysejoin
- Should wait end of analysejava.lang.Exception
public static StatHandler analyse(StatReport report, Member loggedMember, boolean join, long oldDate, long nowDate) throws java.lang.Exception
report
- the StatReportloggedMember
- the Member doing analysejoin
- Should wait end of analysenowDate
- the analyse datejava.lang.Exception
public static void analyseAndRender(StatReport report, Member loggedMember) throws java.lang.Exception
report
- the StatReportloggedMember
- the Member doing analysejava.lang.Exception
public static void analyseAndRender(StatReport report, Member loggedMember, long oldDate, long nowDate) throws java.lang.Exception
report
- the StatReportloggedMember
- the Member doing analysenowDate
- the starting datejava.lang.Exception
public static void lockAnalyse(boolean lock, StatReport report, StatAnalyser analyser)
lock
- the action to do : lock or unlockreport
- the report to work withanalyser
- the analyser doing the jobpublic static boolean canAnalyze(StatReport report, Member member)
report
- member
- public static boolean canAnalyze(StatReport report, Member member, StatHandler statHandler)
report
- member
- statHandler
- protected static void renderPortlet(StatHandler statHandler, PortalElement portlet, Member loggedMember, java.lang.String statDirectory, java.lang.String jspKey, java.lang.String jsp, java.lang.String html, Workspace workspace) throws java.lang.Exception
java.lang.Exception
public static void render(StatHandler statHandler, StatReport report, Member member)
statHandler
- protected static StatHandler buildStatHandler(long oldDate, long nowDate, PortalElement report) throws java.lang.Exception
oldDate
- nowDate
- report
- java.lang.Exception
public static java.lang.String getStatReportDirectory(java.lang.String workspaceId, java.lang.String reportId)
public static java.lang.String getStatReportFile(long date)
date
- public static java.util.Date getReportDate(java.lang.String reportName)
public static java.util.Set getAllReport(Workspace workspace, StatReport report)
workspace
- report
- public static java.util.Map getAllReport(Workspace workspace)
workspace
- public static java.util.Map getAllReport()
public static StatListener createStatListener(PortletStat portlet, PortalElement report)
portlet
- public static StatListener createStatListener(PortletStat portlet, PortalElement report, java.lang.String clazzstr)
portlet
- public static MonitoredInputStream getStatStream(long oldDate, long nowDate)
oldDate
- the date from which the analyse startnowDate
- the date from which the analyse endpublic static java.util.Set getExistingStatFiles(long oldDate, long nowDate)
oldDate
- the date from which the analyse startnowDate
- the date from which the analyse endpublic static java.util.Set getStatPortletSet(PortalElement portal)
portal
- public static java.util.Set getWorkspaceSet(StatReport report)
report
- the report to work withpublic static boolean isGlobalReport(StatReport report)
report
- public static long getSessionTimeOut()
public static long getRequestTimeOut()
public static boolean canAnalyze()
public static boolean canStat()
public static boolean canResolveHost()
Copyright © 2001-2010 Jalios SA. All Rights Reserved.