public class SiteStatisticsAction extends ServiceableAction
Site
, such as :Modifier and Type | Field and Description |
---|---|
protected PageHelper |
_pageCacheHelper
The page cache helper.
|
protected ServiceExtensionPoint |
_serviceExtPt
The service extension point.
|
protected SiteManager |
_siteManager
The site manager.
|
manager
EMPTY_MAP
Constructor and Description |
---|
SiteStatisticsAction() |
Modifier and Type | Method and Description |
---|---|
protected Map<String,Object> |
_contents2json(Site site)
Statistics on contents
|
protected void |
_processContents(Site site,
Map<String,Long> values)
Process the contents of the site to gather information on them
|
protected void |
_processPages(PagesContainer pages,
Map<String,Long> values)
Process statistics on a pages container
|
protected void |
_processResources(TraversableAmetysObject resourceContainer,
HashMap<String,Long> values)
Process statistics on a resources
|
protected Map<String,Object> |
_resources2json(Site site)
Statistics on resources
|
protected Map<String,Object> |
_sitemap2json(Sitemap sitemap)
Statistics on sitemap
|
Map |
act(Redirector redirector,
SourceResolver resolver,
Map objectModel,
String source,
Parameters parameters) |
void |
service(ServiceManager sManager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
protected SiteManager _siteManager
protected ServiceExtensionPoint _serviceExtPt
protected PageHelper _pageCacheHelper
public SiteStatisticsAction()
public void service(ServiceManager sManager) throws ServiceException
service
in interface Serviceable
service
in class ServiceableAction
ServiceException
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
Exception
protected Map<String,Object> _contents2json(Site site) throws RepositoryException
site
- the siteRepositoryException
- if an error occursprotected void _processContents(Site site, Map<String,Long> values) throws RepositoryException
site
- the sitevalues
- the information on the contentsRepositoryException
- if an error occurs on the repositoryprotected Map<String,Object> _resources2json(Site site)
site
- the siteprotected Map<String,Object> _sitemap2json(Sitemap sitemap)
sitemap
- the sitemapprotected void _processPages(PagesContainer pages, Map<String,Long> values)
pages
- The pages container (page or sitemap)values
- The valuesprotected void _processResources(TraversableAmetysObject resourceContainer, HashMap<String,Long> values)
resourceContainer
- The resources containervalues
- The values