public class StandardSitePreferenceHandler extends Object implements SitePreferenceHandler
SitePreferenceHandler.CURRENT_SITE_PREFERENCE_ATTRIBUTE
.
This allows handler mappings and view resolvers further down the line to vary their logic by site preference.CURRENT_SITE_PREFERENCE_ATTRIBUTE
Constructor and Description |
---|
StandardSitePreferenceHandler(SitePreferenceRepository sitePreferenceRepository)
Creates a new site preference handler.
|
Modifier and Type | Method and Description |
---|---|
SitePreference |
handleSitePreference(HttpServletRequest request,
HttpServletResponse response)
Handle the site preference aspect of the web request.
|
public StandardSitePreferenceHandler(SitePreferenceRepository sitePreferenceRepository)
sitePreferenceRepository
- the store for recording user site preferencepublic SitePreference handleSitePreference(HttpServletRequest request, HttpServletResponse response)
SitePreferenceHandler
Device
that originated the request.
After handling, the resolved site preference is available as a request attribute
.handleSitePreference
in interface SitePreferenceHandler
request
- the web requestresponse
- the web response