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 Summary
Fields Modifier and Type Field Description protected static String
DEFAULT_HEADER_CART_VERSION
-
Constructor Summary
Constructors Constructor Description HeaderRequestCartVersionResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getHeaderName()
Gets the header name to check the version for.Optional<Integer>
resolveCartVersion(javax.servlet.http.HttpServletRequest request)
Determines the client's cart version based off of some attribute of the request.
-
-
-
Field Detail
-
DEFAULT_HEADER_CART_VERSION
protected static final String DEFAULT_HEADER_CART_VERSION
- See Also:
- Constant Field Values
-
-
Method Detail
-
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 interfaceRequestCartVersionResolver
- 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
-
-