public class StandardSiteSwitcherHandler extends Object implements SiteSwitcherHandler
| Constructor and Description |
|---|
StandardSiteSwitcherHandler(SiteUrlFactory normalSiteUrlFactory,
SiteUrlFactory mobileSiteUrlFactory,
SiteUrlFactory tabletSiteUrlFactory,
SitePreferenceHandler sitePreferenceHandler,
Boolean tabletIsMobile)
Creates a new site switcher handler
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
handleSiteSwitch(HttpServletRequest request,
HttpServletResponse response)
Handles the site switching aspect of the web request.
|
public StandardSiteSwitcherHandler(SiteUrlFactory normalSiteUrlFactory, SiteUrlFactory mobileSiteUrlFactory, SiteUrlFactory tabletSiteUrlFactory, SitePreferenceHandler sitePreferenceHandler, Boolean tabletIsMobile)
normalSiteUrlFactory - the factory for a "normal" site URL e.g. http://app.commobileSiteUrlFactory - the factory for a "mobile" site URL e.g. http://m.app.comtabletSiteUrlFactory - the factory for a "tablet" site URL e.g. http://app.com/tabletsitePreferenceHandler - the handler for the user site preferencetabletIsMobile - true if tablets should be redirected to the mobile sitepublic boolean handleSiteSwitch(HttpServletRequest request, HttpServletResponse response) throws IOException
SiteSwitcherHandlerhandleSiteSwitch in interface SiteSwitcherHandlerrequest - current HTTP requestresponse - current HTTP responseIOException