A Spring MVC interceptor that, on preHandle, delegates to a
SitePreferenceHandler
to resolve the SitePreference of the user that originated the web request.
The resolved SitePreference is exported as a request attribute under the well-known name of
SitePreferenceHandler.CURRENT_SITE_PREFERENCE_ATTRIBUTE
.
Request handlers such as @Controllers and views may then access the currentSitePreference to vary their control and rendering logic, respectively.
Note: do not use this interceptor in conjunction with the SiteSwitcherHandlerInterceptor, as the switcher internally delegates to a
SitePreferenceHandler
as part of its own workflow.
This interceptor should only be used when site switching is not needed but site preference management is still desired.