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 class
SearchSitesAction.SiteTitleExpression
Site title expression
-
Field Summary
Fields Modifier and Type Field Description protected I18nUtils
_i18nUtils
I18N Utilsprotected AmetysObjectResolver
_resolver
Ametys resolverprotected RightManager
_rightManager
Ametys resolverprotected SiteManager
_siteManager
The site managerprotected SiteTypesExtensionPoint
_siteTypesEP
The site types EPprotected CurrentUserProvider
_userProvider
User 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)
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 sitevoid
service(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:
service
in interfaceServiceable
- Overrides:
service
in 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)
-
-