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
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
FieldsModifier and TypeFieldDescriptionprotected PageHelperThe page cache helper.protected ServiceExtensionPointThe service extension point.protected SiteManagerThe site manager.Fields inherited from class org.apache.cocoon.acting.ServiceableAction
managerFields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP - 
Constructor Summary
Constructors - 
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(SitemapElement pages, Map<String, Long> values) Process statistics on a sitemap elementprotected 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) voidservice(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:
 servicein interfaceServiceable- Overrides:
 servicein 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 sitemap element- Parameters:
 pages- The sitemap element (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
 
 -