Class CartCookieProperties

java.lang.Object
com.broadleafcommerce.cartoperation.web.autoconfigure.CartCookieProperties

@Validated @ConfigurationProperties("broadleaf.cartoperation.cart-cookie") public class CartCookieProperties extends Object
Author:
Phillip Verheyden (phillipuniverse), Jeff Fischer, Chris Kittrell (ckittrell)
  • Constructor Details

    • CartCookieProperties

      public CartCookieProperties()
  • Method Details

    • getCookieName

      public String getCookieName()
      Name of the cart cookie. If applicationIdIncludedInCookieName is true, then the provided applicationId will be appended to the end of the cookie name.
    • getCookieSameSiteValue

      public String getCookieSameSiteValue()
      The value to use for the SameSite attribute on the cart cookie. Can be "None", "Lax", or "Strict".
    • isApplicationIdIncludedInCookieName

      @Deprecated public boolean isApplicationIdIncludedInCookieName()
      Deprecated.
      In favor of discriminatedIdIncludedInCookieName. The new property is named generically and uses either application or customer context ID based on cart data. If discriminatorIdIncludedInCookieName is not set, the system will fall back to this deprecated property for backward compatibility. This may be removed in a future release.
      Whether or not the applicationId should be appended to the cart cookie name. This should be used if the cookies of different applications cannot be distinguished by their domain. For example, if a request param is used to resolve the application, then the cookies will be accessible via the same domain and therefore it's required that the application id is appended to the cookie name so that we can resolve the correct cart for that application.
    • getDiscriminatedIdIncludedInCookieName

      public Boolean getDiscriminatedIdIncludedInCookieName()
      Whether the cart discriminator ID should be appended to the cart cookie name. This should be used if the cookies of different contexts cannot be distinguished by their domain. For example, if a request param is used to resolve the application, then the cookies will be accessible via the same domain. In this instance it's required that a discriminator ID is appended to the cookie name so that we can resolve the correct cart for that context. If this is not set, it will use the value of the deprecated property applicationIdIncludedInCookieName.
    • getCartTtl

      public Duration getCartTtl()
      Specifies how long the cart cookie should be considered active.
    • getJwt

      public CartCookieProperties.Jwt getJwt()
    • setCookieName

      public void setCookieName(String cookieName)
      Name of the cart cookie. If applicationIdIncludedInCookieName is true, then the provided applicationId will be appended to the end of the cookie name.
    • setCookieSameSiteValue

      public void setCookieSameSiteValue(String cookieSameSiteValue)
      The value to use for the SameSite attribute on the cart cookie. Can be "None", "Lax", or "Strict".
    • setApplicationIdIncludedInCookieName

      @Deprecated public void setApplicationIdIncludedInCookieName(boolean applicationIdIncludedInCookieName)
      Deprecated.
      In favor of discriminatedIdIncludedInCookieName. The new property is named generically and uses either application or customer context ID based on cart data. If discriminatorIdIncludedInCookieName is not set, the system will fall back to this deprecated property for backward compatibility. This may be removed in a future release.
      Whether or not the applicationId should be appended to the cart cookie name. This should be used if the cookies of different applications cannot be distinguished by their domain. For example, if a request param is used to resolve the application, then the cookies will be accessible via the same domain and therefore it's required that the application id is appended to the cookie name so that we can resolve the correct cart for that application.
    • setDiscriminatedIdIncludedInCookieName

      public void setDiscriminatedIdIncludedInCookieName(Boolean discriminatedIdIncludedInCookieName)
      Whether the cart discriminator ID should be appended to the cart cookie name. This should be used if the cookies of different contexts cannot be distinguished by their domain. For example, if a request param is used to resolve the application, then the cookies will be accessible via the same domain. In this instance it's required that a discriminator ID is appended to the cookie name so that we can resolve the correct cart for that context. If this is not set, it will use the value of the deprecated property applicationIdIncludedInCookieName.
    • setCartTtl

      public void setCartTtl(Duration cartTtl)
      Specifies how long the cart cookie should be considered active.
    • setJwt

      public void setJwt(CartCookieProperties.Jwt jwt)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object