Package org.ametys.web
Class WebHelper
java.lang.Object
org.ametys.web.WebHelper
Helper for web
-
Method Summary
Modifier and TypeMethodDescriptionstatic Site
Retrieves the site from an observationEvent
.
This method search in the events' arguments to find :
ObservationConstants.ARGS_SITE
ObservationConstants.ARGS_PAGE
ObservationConstants.ARGS_ZONE_ITEM
ObservationConstants.ARGS_ACL_CONTEXT
object
if it's instance ofSiteAwareAmetysObject
static String
getSiteName
(Request request) Get the site name from the request.static String
getSiteName
(Request request, AmetysObject object) Get the site name from a object or current request.
-
Method Details
-
getSiteName
Get the site name from the request. The site name is searched in the following order: the 'siteName' request parameter, the 'site' request attribute, the 'siteName' request attribute.- Parameters:
request
- the request. Cannot be null.- Returns:
- the site name or
null
if not found
-
getSiteName
Get the site name from a object or current request. The site name is searched in the following order: the Ametys object, the 'siteName' request parameter, the 'site' request attribute, the 'siteName' request attribute.- Parameters:
request
- the request. Cannot be null.object
- the object. Can be null.- Returns:
- the site name or
null
if not found
-
findSite
Retrieves the site from an observationEvent
.
This method search in the events' arguments to find :
ObservationConstants.ARGS_SITE
ObservationConstants.ARGS_PAGE
ObservationConstants.ARGS_ZONE_ITEM
ObservationConstants.ARGS_ACL_CONTEXT
object
if it's instance ofSiteAwareAmetysObject
- Parameters:
event
- theEvent
.- Returns:
- the current site or null if not found.
-