Package org.ametys.web.cocoon
Class SitemapAction
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.cocoon.acting.AbstractAction
-
- org.apache.cocoon.acting.ServiceableAction
-
- org.ametys.web.cocoon.SitemapAction
-
- All Implemented Interfaces:
Component,LogEnabled,Serviceable,Action
public class SitemapAction extends ServiceableAction
Get children of aSite,SitemaporPagesContainerWaits for the id of the parent ametys object in request parameters.
-
-
Field Summary
Fields Modifier and Type Field Description protected CurrentUserProvider_currentUserProviderThe user providerprotected AmetysObjectResolver_resolverprotected RightManager_rightManagerThe right managerprotected SitemapDAO_sitemapDAOThe sitemap DAO-
Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
-
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
-
Constructor Summary
Constructors Constructor Description SitemapAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mapact(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters)protected List<Map<String,Object>>pagescontainer2json(PagesContainer pageContainer, List<String> rights)Get the JSON object representing child pages of a page container.voidservice(ServiceManager smanager)protected Map<String,Object>site2json(Site site)Get the JSON object representing a siteprotected List<Map<String,Object>>sitemaps2json(Site site, List<String> rights)Get the JSON object representing the sitemaps of a siteprotected List<Map<String,Object>>sites2json(TraversableAmetysObject ao)Get the JSON object representing all sites-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_resolver
protected AmetysObjectResolver _resolver
-
_sitemapDAO
protected SitemapDAO _sitemapDAO
The sitemap DAO
-
_rightManager
protected RightManager _rightManager
The right manager
-
_currentUserProvider
protected CurrentUserProvider _currentUserProvider
The user provider
-
-
Constructor Detail
-
SitemapAction
public SitemapAction()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- 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
-
sites2json
protected List<Map<String,Object>> sites2json(TraversableAmetysObject ao)
Get the JSON object representing all sites- Parameters:
ao- The parent ametys object- Returns:
- the JSON object
-
site2json
protected Map<String,Object> site2json(Site site)
Get the JSON object representing a site- Parameters:
site- the site- Returns:
- the JSON object
-
sitemaps2json
protected List<Map<String,Object>> sitemaps2json(Site site, List<String> rights)
Get the JSON object representing the sitemaps of a site- Parameters:
site- the siterights- The rights to check. Can be null or empty to ignore user rights.- Returns:
- the JSON object
-
pagescontainer2json
protected List<Map<String,Object>> pagescontainer2json(PagesContainer pageContainer, List<String> rights)
Get the JSON object representing child pages of a page container.- Parameters:
pageContainer- The page containerrights- The rights to check. Can be null or empty to ignore user rights.- Returns:
- the JSON object
-
-