Class DefaultPreviewSandboxWebRequestResolver

java.lang.Object
com.broadleafcommerce.data.tracking.core.preview.context.DefaultPreviewSandboxWebRequestResolver
All Implemented Interfaces:
PreviewSandboxWebRequestResolver

public class DefaultPreviewSandboxWebRequestResolver extends Object implements PreviewSandboxWebRequestResolver
The default implementation of PreviewSandboxWebRequestResolver that resolves a preview sandbox id String from a NativeWebRequest.

This resolver will look for a header named getHeaderName() to detect a preview sandbox id String. If a sandbox id is found, it will return i.

If this resolver either fails to detect a preview sandbox id, then it will return null.

Author:
Bongani Mbigi (bongani-m)
  • Field Details

  • Constructor Details

    • DefaultPreviewSandboxWebRequestResolver

      public DefaultPreviewSandboxWebRequestResolver()
  • Method Details

    • resolve

      public String resolve(org.springframework.web.context.request.NativeWebRequest webRequest)
      Description copied from interface: PreviewSandboxWebRequestResolver
      Attempts to resolve a preview sandbox id for the provided request.

      If no preview sandbox id is found this method is expected to return null.

      Specified by:
      resolve in interface PreviewSandboxWebRequestResolver
      Parameters:
      webRequest - the current web request
      Returns:
      a preview sandbox id or null
    • parseRequestHeader

      protected String parseRequestHeader(org.springframework.web.context.request.NativeWebRequest webRequest)
    • getHeaderName

      protected String getHeaderName()
    • setHeaderName

      public void setHeaderName(String headerName)