Class HeaderRequestCartVersionResolver

java.lang.Object
com.broadleafcommerce.cartoperation.web.service.HeaderRequestCartVersionResolver
All Implemented Interfaces:
RequestCartVersionResolver

public class HeaderRequestCartVersionResolver extends Object implements RequestCartVersionResolver
Resolves the cart version from a request header.
Author:
Jacob Mitash
  • Field Details

  • Constructor Details

    • HeaderRequestCartVersionResolver

      public HeaderRequestCartVersionResolver()
  • Method Details

    • resolveCartVersion

      public Optional<Integer> resolveCartVersion(javax.servlet.http.HttpServletRequest request)
      Description copied from interface: RequestCartVersionResolver
      Determines the client's cart version based off of some attribute of the request.
      Specified by:
      resolveCartVersion in interface RequestCartVersionResolver
      Parameters:
      request - the request to examine to determine the client's cart version
      Returns:
      the cart version, or empty if unavailable
    • getHeaderName

      protected String getHeaderName()
      Gets the header name to check the version for.
      Returns:
      the cart version header name