public class GetSitesAction extends ServiceableAction
Site
.Modifier and Type | Field and Description |
---|---|
protected AmetysObjectResolver |
_ametysResolver
Ametys resolver
|
protected GroupDirectoryContextHelper |
_groupDirectoryContextHelper
The group directory context helper
|
protected GroupDirectoryDAO |
_groupDirectoryDAO
The group directory DAO
|
protected PopulationContextHelper |
_populationContextHelper
The population context helper
|
protected RightManager |
_rightManager
The rights manager
|
protected SiteConfigurationExtensionPoint |
_siteConfiguration
Site configuration
|
protected SiteManager |
_siteManager
The site manager
|
protected SiteTypesExtensionPoint |
_siteTypeExtensionPoint
Site type EP
|
protected UserPopulationDAO |
_userPopulationDAO
The user population DAO
|
protected CurrentUserProvider |
_userProvider
The current user provider
|
manager
EMPTY_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, setupLogger
protected 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 Serviceable
service
in class ServiceableAction
ServiceException
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
Exception
protected 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)