Package org.ametys.web.repository.site
Class SearchSitesAction
- java.lang.Object
 - 
- org.apache.avalon.framework.logger.AbstractLogEnabled
 - 
- org.apache.cocoon.acting.AbstractAction
 - 
- org.apache.cocoon.acting.ServiceableAction
 - 
- org.ametys.web.repository.site.SearchSitesAction
 
 
 
 
 
- 
- All Implemented Interfaces:
 Component,LogEnabled,Serviceable,Action
public class SearchSitesAction extends ServiceableAction
This action is used by the edition.select-site widget for searching sites from a query string 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classSearchSitesAction.SiteTitleExpressionSite title expression 
- 
Field Summary
Fields Modifier and Type Field Description protected I18nUtils_i18nUtilsI18N Utilsprotected AmetysObjectResolver_resolverAmetys resolverprotected RightManager_rightManagerAmetys resolverprotected SiteManager_siteManagerThe site managerprotected SiteTypesExtensionPoint_siteTypesEPThe site types EPprotected CurrentUserProvider_userProviderUser provider- 
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 SearchSitesAction() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private long_sharedContentsSize(Site site, String currentSiteName)Mapact(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters)protected booleancanRead(Site site, Request request)Determines if the current user has a read access on sitevoidservice(ServiceManager smanager)protected Map<String,Object>site2json(Request request, Site site, String currentSiteName, boolean readAccessOnly, boolean sharedSitesOnly)Convert page to JSON object- 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger 
 - 
 
 - 
 
- 
- 
Field Detail
- 
_siteManager
protected SiteManager _siteManager
The site manager 
- 
_siteTypesEP
protected SiteTypesExtensionPoint _siteTypesEP
The site types EP 
- 
_i18nUtils
protected I18nUtils _i18nUtils
I18N Utils 
- 
_resolver
protected AmetysObjectResolver _resolver
Ametys resolver 
- 
_rightManager
protected RightManager _rightManager
Ametys resolver 
- 
_userProvider
protected CurrentUserProvider _userProvider
User provider 
 - 
 
- 
Constructor Detail
- 
SearchSitesAction
public SearchSitesAction()
 
 - 
 
- 
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
 
- 
site2json
protected Map<String,Object> site2json(Request request, Site site, String currentSiteName, boolean readAccessOnly, boolean sharedSitesOnly)
Convert page to JSON object- Parameters:
 request- the requestsite- The site to convertcurrentSiteName- the current site namereadAccessOnly- true to get site on read access onlysharedSitesOnly- true to get shared site only- Returns:
 - The site as JSON object
 
 
- 
_sharedContentsSize
private long _sharedContentsSize(Site site, String currentSiteName)
 
 - 
 
 -