Package org.ametys.web.site
Class SiteStatisticsAction
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.acting.AbstractAction
org.apache.cocoon.acting.ServiceableAction
org.ametys.web.site.SiteStatisticsAction
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
,Action
- Direct Known Subclasses:
GlobalStatisticsAction
Provides some statistics about a
Site
, such as :- Number of pages
- Number of live contents
- Number of orphaned contents
- Number of external contents
-
Field Summary
Modifier and TypeFieldDescriptionprotected PageHelper
The page cache helper.protected ServiceExtensionPoint
The service extension point.protected SiteManager
The site manager.Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription_contents2json
(Site site) Statistics on contentsprotected void
_processContents
(Site site, Map<String, Long> values) Process the contents of the site to gather information on themprotected void
_processPages
(PagesContainer pages, Map<String, Long> values) Process statistics on a pages containerprotected void
_processResources
(TraversableAmetysObject resourceContainer, HashMap<String, Long> values) Process statistics on a resources_resources2json
(Site site) Statistics on resources_sitemap2json
(Sitemap sitemap) Statistics on sitemapact
(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) void
service
(ServiceManager sManager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_siteManager
The site manager. -
_serviceExtPt
The service extension point. -
_pageCacheHelper
The page cache helper.
-
-
Constructor Details
-
SiteStatisticsAction
public SiteStatisticsAction()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableAction
- Throws:
ServiceException
-
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception - Throws:
Exception
-
_contents2json
Statistics on contents- Parameters:
site
- the site- Returns:
- the statistics on contents
- Throws:
javax.jcr.RepositoryException
- if an error occurs
-
_processContents
protected void _processContents(Site site, Map<String, Long> values) throws javax.jcr.RepositoryExceptionProcess the contents of the site to gather information on them- Parameters:
site
- the sitevalues
- the information on the contents- Throws:
javax.jcr.RepositoryException
- if an error occurs on the repository
-
_resources2json
Statistics on resources- Parameters:
site
- the site- Returns:
- the statistics on resources
-
_sitemap2json
Statistics on sitemap- Parameters:
sitemap
- the sitemap- Returns:
- the statistics on sitemap
-
_processPages
Process statistics on a pages container- Parameters:
pages
- The pages container (page or sitemap)values
- The values
-
_processResources
protected void _processResources(TraversableAmetysObject resourceContainer, HashMap<String, Long> values) Process statistics on a resources- Parameters:
resourceContainer
- The resources containervalues
- The values
-