public class CookieSitePreferenceRepository extends CookieGenerator implements SitePreferenceRepository
DEFAULT_COOKIE_MAX_AGE, DEFAULT_COOKIE_PATH, logger
Constructor and Description |
---|
CookieSitePreferenceRepository()
Creates a cookie-based SitePreferenceRepository.
|
CookieSitePreferenceRepository(String cookieDomain)
Creates a cookie-based SitePreferenceRepository with a custom domain value.
|
Modifier and Type | Method and Description |
---|---|
SitePreference |
loadSitePreference(HttpServletRequest request)
Load the user's site preference.
|
void |
saveSitePreference(SitePreference preference,
HttpServletRequest request,
HttpServletResponse response)
Save the user's site preference.
|
addCookie, createCookie, getCookieDomain, getCookieMaxAge, getCookieName, getCookiePath, isCookieHttpOnly, isCookieSecure, removeCookie, setCookieDomain, setCookieHttpOnly, setCookieMaxAge, setCookieName, setCookiePath, setCookieSecure
public CookieSitePreferenceRepository()
org.springframework.mobile.device.site.CookiteSitePreferenceRepository.SITE_PREFERENCE
public CookieSitePreferenceRepository(String cookieDomain)
.app.com
.public void saveSitePreference(SitePreference preference, HttpServletRequest request, HttpServletResponse response)
SitePreferenceRepository
saveSitePreference
in interface SitePreferenceRepository
public SitePreference loadSitePreference(HttpServletRequest request)
SitePreferenceRepository
loadSitePreference
in interface SitePreferenceRepository