Class HeaderRequestPaymentLockInfoResolver

java.lang.Object
com.broadleafcommerce.paymenttransaction.web.service.HeaderRequestPaymentLockInfoResolver
All Implemented Interfaces:
RequestPaymentLockInfoResolver

public class HeaderRequestPaymentLockInfoResolver extends Object implements RequestPaymentLockInfoResolver
Resolves the lock type and id of the payment that are provided via request headers.
Author:
Chris Kittrell (ckittrell)
  • Field Details

  • Constructor Details

    • HeaderRequestPaymentLockInfoResolver

      public HeaderRequestPaymentLockInfoResolver()
  • Method Details

    • resolveLockToken

      public Optional<String> resolveLockToken(jakarta.servlet.http.HttpServletRequest request)
      Description copied from interface: RequestPaymentLockInfoResolver
      Resolves the payment lock token from an attribute of the request.
      Specified by:
      resolveLockToken in interface RequestPaymentLockInfoResolver
      Parameters:
      request - the request to examine to determine the client's payment lock token
      Returns:
      the payment lock token, or empty if unavailable
    • resolveLockTokens

      public Map<String,String> resolveLockTokens(jakarta.servlet.http.HttpServletRequest request)
      Description copied from interface: RequestPaymentLockInfoResolver
      Resolves the payment lock tokens from an attribute of the request.
      Specified by:
      resolveLockTokens in interface RequestPaymentLockInfoResolver
      Parameters:
      request - the request to examine to determine the client's payment lock tokens
      Returns:
      the payment lock tokens, or an empty map if unavailable
    • parseLockTokens

      protected Map<String,String> parseLockTokens(String headerValue)
    • getPaymentLockTokenHeaderName

      protected String getPaymentLockTokenHeaderName()
      Gets the header name to check the payment lock for.
      Returns:
      the payment version lock name
    • getPaymentLockTokensHeaderName

      protected String getPaymentLockTokensHeaderName()
      Gets the header name to check the payment locks for.
      Returns:
      the payment locks header name
    • getObjectMapper

      protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
    • setObjectMapper

      @Autowired public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)