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
Get children of a
Site, Sitemap or SitemapElement
Waits for the id of the parent ametys object in request parameters.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CurrentUserProviderThe user providerprotected AmetysObjectResolverprotected RightManagerThe right managerprotected SitemapDAOThe sitemap DAOFields 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 TypeMethodDescriptionact(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) voidservice(ServiceManager smanager) Get the JSON object representing a sitesitemapElement2json(SitemapElement sitemapElement, List<String> rights) Get the JSON object representing child pages of a sitemap element.sitemaps2json(Site site, List<String> rights) Get the JSON object representing the sitemaps of a siteGet the JSON object representing all sitesMethods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_resolver
-
_sitemapDAO
The sitemap DAO -
_rightManager
The right manager -
_currentUserProvider
The user provider
-
-
Constructor Details
-
SitemapAction
public SitemapAction()
-
-
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
-
sites2json
Get the JSON object representing all sites- Parameters:
ao- The parent ametys object- Returns:
- the JSON object
-
site2json
Get the JSON object representing a site- Parameters:
site- the site- Returns:
- the JSON object
-
sitemaps2json
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
-
sitemapElement2json
protected List<Map<String,Object>> sitemapElement2json(SitemapElement sitemapElement, List<String> rights) Get the JSON object representing child pages of a sitemap element.- Parameters:
sitemapElement- The sitemap elementrights- The rights to check. Can be null or empty to ignore user rights.- Returns:
- the JSON object
-