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
This action is used by the edition.select-site widget for searching sites from a query string
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
Site title expression -
Field Summary
Modifier and TypeFieldDescriptionprotected I18nUtils
I18N Utilsprotected AmetysObjectResolver
Ametys resolverprotected RightManager
Ametys resolverprotected SiteManager
The site managerprotected SiteTypesExtensionPoint
The site types EPprotected CurrentUserProvider
User providerFields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionact
(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) protected boolean
Determines if the current user has a read access on sitevoid
service
(ServiceManager smanager) site2json
(Request request, Site site, String currentSiteName, boolean readAccessOnly, boolean sharedSitesOnly) Convert page to JSON objectMethods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_siteManager
The site manager -
_siteTypesEP
The site types EP -
_i18nUtils
I18N Utils -
_resolver
Ametys resolver -
_rightManager
Ametys resolver -
_userProvider
User provider
-
-
Constructor Details
-
SearchSitesAction
public SearchSitesAction()
-
-
Method Details
-
service
- 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
-
canRead
Determines if the current user has a read access on site- Parameters:
site
- the siterequest
- the request- Returns:
- true if current user has read access
-