public class StandardSiteSwitcherHandler extends java.lang.Object implements SiteSwitcherHandler
| Constructor and Description |
|---|
StandardSiteSwitcherHandler(SiteUrlFactory normalSiteUrlFactory,
SiteUrlFactory mobileSiteUrlFactory,
SiteUrlFactory tabletSiteUrlFactory,
SitePreferenceHandler sitePreferenceHandler,
java.lang.Boolean tabletIsMobile)
Creates a new site switcher handler
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
handleSiteSwitch(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles the site switching aspect of the web request.
|
public StandardSiteSwitcherHandler(SiteUrlFactory normalSiteUrlFactory, SiteUrlFactory mobileSiteUrlFactory, SiteUrlFactory tabletSiteUrlFactory, SitePreferenceHandler sitePreferenceHandler, java.lang.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(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
SiteSwitcherHandlerhandleSiteSwitch in interface SiteSwitcherHandlerrequest - current HTTP requestresponse - current HTTP responsejava.io.IOException