Class EnhancedCookieGenerator

java.lang.Object
org.springframework.web.util.CookieGenerator
de.hybris.platform.yacceleratorstorefront.security.cookie.EnhancedCookieGenerator
Direct Known Subclasses:
CartRestoreCookieGenerator, CookieNotificationCookieGenerator, CustomerLocationCookieGenerator

public class EnhancedCookieGenerator extends org.springframework.web.util.CookieGenerator
Enhanced CookieGenerator sets additionally header attribute "Set-Cookie"
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final boolean
     
    static final boolean
     
    static final String
     

    Fields inherited from class org.springframework.web.util.CookieGenerator

    logger
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addCookie(javax.servlet.http.HttpServletResponse response, String cookieValue)
     
    protected boolean
     
    protected boolean
     
    void
    removeCookie(javax.servlet.http.HttpServletResponse response)
     
    protected void
    setEnhancedCookiePath(javax.servlet.http.Cookie cookie)
    Sets dynamically the Cookie.setPath(String) value using available HttpServletRequest.getContextPath().
    void
    setHttpOnly(boolean httpOnly)
    Marker to choose between only cookie based session and http header as addition
    void
    setUseDefaultPath(boolean useDefaultPath)
    Adjusts either dynamic Cookie.setPath(String) or static assignment.

    Methods inherited from class org.springframework.web.util.CookieGenerator

    createCookie, getCookieDomain, getCookieMaxAge, getCookieName, getCookiePath, isCookieHttpOnly, isCookieSecure, setCookieDomain, setCookieHttpOnly, setCookieMaxAge, setCookieName, setCookiePath, setCookieSecure

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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 dynamic Cookie.setPath(String) or static assignment. If true a cookie path is calculated by setEnhancedCookiePath(Cookie) method.
    • addCookie

      public void addCookie(javax.servlet.http.HttpServletResponse response, String cookieValue)
      Overrides:
      addCookie in class org.springframework.web.util.CookieGenerator
    • setEnhancedCookiePath

      protected void setEnhancedCookiePath(javax.servlet.http.Cookie cookie)
      Sets dynamically the Cookie.setPath(String) value using available HttpServletRequest.getContextPath().
    • removeCookie

      public void removeCookie(javax.servlet.http.HttpServletResponse response)
      Overrides:
      removeCookie in class org.springframework.web.util.CookieGenerator