public class SitemapAction extends ServiceableAction
Site
, Sitemap
or PagesContainer
Waits for the id of the parent ametys object in request parameters.Modifier and Type | Field and Description |
---|---|
protected CurrentUserProvider |
_currentUserProvider
The user provider
|
protected AmetysObjectResolver |
_resolver
|
protected RightManager |
_rightManager
The right manager
|
protected SitemapDAO |
_sitemapDAO
The sitemap DAO
|
manager
EMPTY_MAP
Constructor and Description |
---|
SitemapAction() |
Modifier and Type | Method and Description |
---|---|
Map |
act(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.
|
void |
service(ServiceManager smanager) |
protected Map<String,Object> |
site2json(Site site)
Get the JSON object representing a site
|
protected List<Map<String,Object>> |
sitemaps2json(Site site,
List<String> rights)
Get the JSON object representing the sitemaps of a site
|
protected List<Map<String,Object>> |
sites2json(TraversableAmetysObject ao)
Get the JSON object representing all sites
|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
protected AmetysObjectResolver _resolver
protected SitemapDAO _sitemapDAO
protected RightManager _rightManager
protected CurrentUserProvider _currentUserProvider
public SitemapAction()
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 List<Map<String,Object>> sites2json(TraversableAmetysObject ao)
ao
- The parent ametys objectprotected Map<String,Object> site2json(Site site)
site
- the siteprotected List<Map<String,Object>> sitemaps2json(Site site, List<String> rights)
site
- the siterights
- The rights to check. Can be null or empty to ignore user rights.protected List<Map<String,Object>> pagescontainer2json(PagesContainer pageContainer, List<String> rights)
pageContainer
- The page containerrights
- The rights to check. Can be null or empty to ignore user rights.