public class StandardSiteSwitcherHandlerFactory extends Object
Constructor and Description |
---|
StandardSiteSwitcherHandlerFactory() |
Modifier and Type | Method and Description |
---|---|
static SiteSwitcherHandler |
dotMobi(String serverName)
Creates a site switcher that redirects to a
.mobi domain for normal site requests that either
originate from a mobile device or indicate a mobile site preference. |
static SiteSwitcherHandler |
dotMobi(String serverName,
Boolean tabletIsMobile)
Creates a site switcher that redirects to a
.mobi domain for normal site requests that either
originate from a mobile device or indicate a mobile site preference. |
static SiteSwitcherHandler |
mDot(String serverName)
Creates a site switcher that redirects to a
m. domain for normal site requests that either
originate from a mobile device or indicate a mobile site preference. |
static SiteSwitcherHandler |
mDot(String serverName,
Boolean tabletIsMobile)
Creates a site switcher that redirects to a
m. domain for normal site requests that either
originate from a mobile device or indicate a mobile site preference. |
static SiteSwitcherHandler |
standard(String normalServerName,
String mobileServerName,
String cookieDomain)
Creates a site switcher that redirects to a custom domain for normal site requests that either
originate from a mobile device or indicate a mobile site preference.
|
static SiteSwitcherHandler |
standard(String normalServerName,
String mobileServerName,
String cookieDomain,
Boolean tabletIsMobile)
Creates a site switcher that redirects to a custom domain for normal site requests that either
originate from a mobile device or indicate a mobile site preference.
|
static SiteSwitcherHandler |
standard(String normalServerName,
String mobileServerName,
String tabletServerName,
String cookieDomain)
Creates a site switcher that redirects to a custom domain for normal site requests that either
originate from a mobile device or indicate a mobile site preference.
|
static SiteSwitcherHandler |
urlPath(String mobilePath)
Creates a site switcher that redirects to a path on the current domain for normal site requests that either
originate from a mobile device or indicate a mobile site preference.
|
static SiteSwitcherHandler |
urlPath(String mobilePath,
String rootPath)
Creates a site switcher that redirects to a path on the current domain for normal site requests that either
originate from a mobile device or indicate a mobile site preference.
|
static SiteSwitcherHandler |
urlPath(String mobilePath,
String tabletPath,
String rootPath)
Creates a site switcher that redirects to a path on the current domain for normal site requests that either
originate from a mobile device or tablet device, or indicate a mobile or tablet site preference.
|
public static SiteSwitcherHandler mDot(String serverName)
m.
domain for normal site requests that either
originate from a mobile device or indicate a mobile site preference.
Uses a CookieSitePreferenceRepository
that saves a cookie that is shared between the two domains.public static SiteSwitcherHandler mDot(String serverName, Boolean tabletIsMobile)
m.
domain for normal site requests that either
originate from a mobile device or indicate a mobile site preference.
Uses a CookieSitePreferenceRepository
that saves a cookie that is shared between the two domains.public static SiteSwitcherHandler dotMobi(String serverName)
.mobi
domain for normal site requests that either
originate from a mobile device or indicate a mobile site preference.
Will strip off the trailing domain name when building the mobile domain
e.g. "app.com" will become "app.mobi" (the .com will be stripped).
Uses a CookieSitePreferenceRepository
that saves a cookie that is shared between the two domains.public static SiteSwitcherHandler dotMobi(String serverName, Boolean tabletIsMobile)
.mobi
domain for normal site requests that either
originate from a mobile device or indicate a mobile site preference.
Will strip off the trailing domain name when building the mobile domain
e.g. "app.com" will become "app.mobi" (the .com will be stripped).
Uses a CookieSitePreferenceRepository
that saves a cookie that is shared between the two domains.public static SiteSwitcherHandler standard(String normalServerName, String mobileServerName, String cookieDomain)
CookieSitePreferenceRepository
that saves a cookie that is shared between the two domains.normalServerName
- the 'normal' domain name e.g. "normal.com"mobileServerName
- the 'mobile domain name e.g. "mobile.com"cookieDomain
- the name to use for saving the cookiestandard(String, String, String, Boolean)
,
standard(String, String, String, String)
,
StandardSiteUrlFactory
public static SiteSwitcherHandler standard(String normalServerName, String mobileServerName, String cookieDomain, Boolean tabletIsMobile)
CookieSitePreferenceRepository
that saves a cookie that is shared between the two domains.normalServerName
- the 'normal' domain name e.g. "normal.com"mobileServerName
- the 'mobile domain name e.g. "mobile.com"cookieDomain
- the name to use for saving the cookietabletIsMobile
- true if tablets should be presented with the 'mobile' sitestandard(String, String, String)
,
standard(String, String, String, String)
,
StandardSiteUrlFactory
public static SiteSwitcherHandler standard(String normalServerName, String mobileServerName, String tabletServerName, String cookieDomain)
CookieSitePreferenceRepository
that saves a cookie that is shared between the two domains.normalServerName
- the 'normal' domain name e.g. "normal.com"mobileServerName
- the 'mobile domain name e.g. "mobile.com"tabletServerName
- the 'tablet' domain name e.g. "tablet.com"cookieDomain
- the name to use for saving the cookiestandard(String, String, String)
,
standard(String, String, String, Boolean)
,
StandardSiteUrlFactory
public static SiteSwitcherHandler urlPath(String mobilePath)
CookieSitePreferenceRepository
that saves a cookie that is stored on the root path.public static SiteSwitcherHandler urlPath(String mobilePath, String rootPath)
http://www.domain.com/myapp
,
then the root path is /myapp
.
Uses a CookieSitePreferenceRepository
that saves a cookie that is stored on the root path.public static SiteSwitcherHandler urlPath(String mobilePath, String tabletPath, String rootPath)
http://www.domain.com/myapp
,
then the root path is /myapp
.
Uses a CookieSitePreferenceRepository
that saves a cookie that is stored on the root path.