public class GetSitesAction extends ServiceableAction
Site.| Modifier and Type | Field and Description | 
|---|---|
| protected AmetysObjectResolver | _ametysResolverAmetys resolver | 
| protected GroupDirectoryContextHelper | _groupDirectoryContextHelperThe group directory context helper | 
| protected GroupDirectoryDAO | _groupDirectoryDAOThe group directory DAO | 
| protected PopulationContextHelper | _populationContextHelperThe population context helper | 
| protected RightManager | _rightManagerThe rights manager | 
| protected SiteConfigurationExtensionPoint | _siteConfigurationSite configuration | 
| protected SiteManager | _siteManagerThe site manager | 
| protected SiteTypesExtensionPoint | _siteTypeExtensionPointSite type EP | 
| protected UserPopulationDAO | _userPopulationDAOThe user population DAO | 
| protected CurrentUserProvider | _userProviderThe current user provider | 
managerEMPTY_MAP| Constructor and Description | 
|---|
| GetSitesAction() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected List<Map<String,Object>> | _childSites2json(Request request,
                Site site,
                String currentSiteName,
                int depth,
                boolean readAccessOnly,
                boolean sharedSitesOnly)Child site to JSON | 
| protected AmetysObjectIterable<Site> | _getRootSites(String id)Get root sites | 
| protected List<Map<String,Object>> | _rootSite2json(Request request,
              Site site,
              String currentSiteName,
              boolean recursive,
              boolean readAccessOnly,
              boolean sharedSitesOnly,
              UserIdentity user)Retrieves the JSON for a root site | 
| private long | _sharedContentsSize(Site site,
                   String currentSiteName) | 
| protected Map<String,Object> | _site2json(Request request,
          Site site,
          String currentSiteName,
          int depth,
          boolean readAccessOnly,
          boolean sharedSitesOnly)Site to JSON | 
| protected Map<String,Object> | _site2json(Site site)Get the JSON representation of a site | 
| Map | act(Redirector redirector,
   SourceResolver resolver,
   Map objectModel,
   String source,
   Parameters parameters) | 
| protected boolean | canRead(Site site,
       Request request)Determines if the current user has a read access on site | 
| void | service(ServiceManager smanager) | 
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerprotected SiteManager _siteManager
protected RightManager _rightManager
protected CurrentUserProvider _userProvider
protected PopulationContextHelper _populationContextHelper
protected GroupDirectoryContextHelper _groupDirectoryContextHelper
protected UserPopulationDAO _userPopulationDAO
protected GroupDirectoryDAO _groupDirectoryDAO
protected SiteTypesExtensionPoint _siteTypeExtensionPoint
protected SiteConfigurationExtensionPoint _siteConfiguration
protected AmetysObjectResolver _ametysResolver
public GetSitesAction()
public void service(ServiceManager smanager) throws ServiceException
service in interface Serviceableservice in class ServiceableActionServiceExceptionpublic Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
Exceptionprotected AmetysObjectIterable<Site> _getRootSites(String id)
id - Optionnal root idprotected List<Map<String,Object>> _rootSite2json(Request request, Site site, String currentSiteName, boolean recursive, boolean readAccessOnly, boolean sharedSitesOnly, UserIdentity user)
request - The requestsite - The root sitecurrentSiteName - The name of the current siterecursive - True to handle child sitesreadAccessOnly - Only read access sitesharedSitesOnly - Only shared sitesuser - The current userprotected List<Map<String,Object>> _childSites2json(Request request, Site site, String currentSiteName, int depth, boolean readAccessOnly, boolean sharedSitesOnly)
request - The requestsite - The root sitecurrentSiteName - The name of the current sitedepth - The depth from the root sitereadAccessOnly - Only read access sitesharedSitesOnly - Only shared sitesprotected Map<String,Object> _site2json(Request request, Site site, String currentSiteName, int depth, boolean readAccessOnly, boolean sharedSitesOnly)
request - The requestsite - The root sitecurrentSiteName - The name of the current sitedepth - The depth from the root sitereadAccessOnly - Only read access sitesharedSitesOnly - Only shared sitesprotected Map<String,Object> _site2json(Site site)
site - The siteprivate long _sharedContentsSize(Site site, String currentSiteName)