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 SummaryFields Modifier and Type Field Description protected static StringDEFAULT_HEADER_CART_VERSION
 - 
Constructor SummaryConstructors Constructor Description HeaderRequestCartVersionResolver()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetHeaderName()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_VERSIONprotected static final String DEFAULT_HEADER_CART_VERSION - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
resolveCartVersionpublic Optional<Integer> resolveCartVersion(javax.servlet.http.HttpServletRequest request) Description copied from interface:RequestCartVersionResolverDetermines the client's cart version based off of some attribute of the request.- Specified by:
- resolveCartVersionin interface- RequestCartVersionResolver
- Parameters:
- request- the request to examine to determine the client's cart version
- Returns:
- the cart version, or empty if unavailable
 
 - 
getHeaderNameprotected String getHeaderName() Gets the header name to check the version for.- Returns:
- the cart version header name
 
 
- 
 
-