Class EnhancedCookieGenerator
java.lang.Object
org.springframework.web.util.CookieGenerator
com.hybris.yprofile.consent.cookie.EnhancedCookieGenerator
- Direct Known Subclasses:
ConsentReferenceCookieGenerator
public class EnhancedCookieGenerator
extends org.springframework.web.util.CookieGenerator
Enhanced
CookieGenerator sets additionally header attribute -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanstatic final booleanFields inherited from class org.springframework.web.util.CookieGenerator
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCookie(javax.servlet.http.HttpServletResponse response, String cookieValue, boolean isSessionCookie) protected booleanprotected booleanprotected voidsetEnhancedCookiePath(javax.servlet.http.Cookie cookie) Sets dynamically theCookie.setPath(String)value using availableHttpServletRequest.getContextPath().voidsetHttpOnly(boolean httpOnly) Marker to choose between only cookie based session and http header as additionvoidsetUseDefaultPath(boolean useDefaultPath) Adjusts either dynamicCookie.setPath(String)or static assignment.Methods inherited from class org.springframework.web.util.CookieGenerator
addCookie, createCookie, getCookieDomain, getCookieMaxAge, getCookieName, getCookiePath, isCookieHttpOnly, isCookieSecure, removeCookie, setCookieDomain, setCookieHttpOnly, setCookieMaxAge, setCookieName, setCookiePath, setCookieSecure
-
Field Details
-
DEFAULT_HTTP_ONLY
public static final boolean DEFAULT_HTTP_ONLY- See Also:
-
DEFAULT_COOKIE_PATH
public static final boolean DEFAULT_COOKIE_PATH- See Also:
-
-
Constructor Details
-
EnhancedCookieGenerator
public EnhancedCookieGenerator()
-
-
Method Details
-
isHttpOnly
protected boolean isHttpOnly() -
setHttpOnly
public void setHttpOnly(boolean httpOnly) Marker to choose between only cookie based session and http header as addition -
canUseDefaultPath
protected boolean canUseDefaultPath() -
setUseDefaultPath
public void setUseDefaultPath(boolean useDefaultPath) Adjusts either dynamicCookie.setPath(String)or static assignment. If true a cookie path is calculated bysetEnhancedCookiePath(Cookie)method. -
addCookie
public void addCookie(javax.servlet.http.HttpServletResponse response, String cookieValue, boolean isSessionCookie) -
setEnhancedCookiePath
protected void setEnhancedCookiePath(javax.servlet.http.Cookie cookie) Sets dynamically theCookie.setPath(String)value using availableHttpServletRequest.getContextPath().
-