Package org.ametys.web.site
Class SiteStatisticsGenerator
-
- All Implemented Interfaces:
Poolable,Recyclable,Disposable,Component,LogEnabled,Serviceable,Generator,SitemapModelComponent,XMLProducer
public class SiteStatisticsGenerator extends ServiceableGenerator
Provides some statistics about aSite, such as :
- Number of pages
- Number of live contents
- Number of orphaned contents
- Number of external contents
-
-
Field Summary
Fields Modifier and Type Field Description protected PageHelper_pageCacheHelperThe page cache helper.protected ServiceExtensionPoint_serviceExtPtThe service extension point.protected SiteManager_siteManagerThe site manager.-
Fields inherited from class org.apache.cocoon.generation.ServiceableGenerator
manager
-
Fields inherited from class org.apache.cocoon.generation.AbstractGenerator
objectModel, parameters, resolver, source
-
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
-
-
Constructor Summary
Constructors Constructor Description SiteStatisticsGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void_processPages(PagesContainer pages, Map<String,Long> values)private void_processResources(TraversableAmetysObject resourceContainer, HashMap<String,Long> values)private void_saxContents(Site site)private void_saxResources(Site site)protected void_saxSitemap(Sitemap sitemap)SAX statistics on a sitemap.voidgenerate()protected voidsaxSite(Site site)SAX statistics on a site.voidservice(ServiceManager sManager)-
Methods inherited from class org.apache.cocoon.generation.ServiceableGenerator
dispose
-
Methods inherited from class org.apache.cocoon.generation.AbstractGenerator
recycle, setup
-
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
setConsumer, setContentHandler, setLexicalHandler
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
-
-
-
-
Field Detail
-
_siteManager
protected SiteManager _siteManager
The site manager.
-
_serviceExtPt
protected ServiceExtensionPoint _serviceExtPt
The service extension point.
-
_pageCacheHelper
protected PageHelper _pageCacheHelper
The page cache helper.
-
-
Constructor Detail
-
SiteStatisticsGenerator
public SiteStatisticsGenerator()
-
-
Method Detail
-
service
public void service(ServiceManager sManager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classServiceableGenerator- Throws:
ServiceException
-
generate
public void generate() throws IOException, SAXException, ProcessingException
-
saxSite
protected void saxSite(Site site) throws SAXException, ProcessingException
SAX statistics on a site.- Parameters:
site- the site to SAX statistics on.- Throws:
SAXException- if an error occurs while saxingProcessingException- if an error occurs
-
_saxSitemap
protected void _saxSitemap(Sitemap sitemap) throws SAXException
SAX statistics on a sitemap.- Parameters:
sitemap- the sitemap to SAX statistics on.- Throws:
SAXException- if an error occurs while saxing
-
_processPages
private void _processPages(PagesContainer pages, Map<String,Long> values)
-
_saxContents
private void _saxContents(Site site) throws SAXException, RepositoryException
- Throws:
SAXExceptionRepositoryException
-
_saxResources
private void _saxResources(Site site) throws SAXException
- Throws:
SAXException
-
_processResources
private void _processResources(TraversableAmetysObject resourceContainer, HashMap<String,Long> values)
-
-