Class BroadleafSandBoxResolverImpl

java.lang.Object
org.broadleafcommerce.common.web.BroadleafSandBoxResolverImpl
All Implemented Interfaces:
BroadleafSandBoxResolver

@Component("blSandBoxResolver") public class BroadleafSandBoxResolverImpl extends Object implements BroadleafSandBoxResolver
Responsible for determining the SandBox to use for the current request. SandBox's are used to store a user's changes to products, content-items, etc. until they are ready to be pushed to production. If a request is being served with a SandBox parameter, it indicates that the user wants to see the site as if their changes were applied.
Author:
bpolster
  • Field Details

    • sandBoxPreviewEnabled

      protected Boolean sandBoxPreviewEnabled
      Property used to disable sandbox mode. Some implementations will want to turn off sandboxes in production.
    • SANDBOX_VAR

      public static String SANDBOX_VAR
      Request attribute to store the current sandbox
    • CLIENT_TIMEZONE

      public static final String CLIENT_TIMEZONE
      See Also:
    • crossAppAuthService

      @Autowired(required=false) @Qualifier("blCrossAppAuthService") protected CrossAppAuthService crossAppAuthService
  • Constructor Details

    • BroadleafSandBoxResolverImpl

      public BroadleafSandBoxResolverImpl()
  • Method Details

    • resolveSandBox

      public SandBox resolveSandBox(javax.servlet.http.HttpServletRequest request, Site site)
      Determines the current sandbox based on other parameters on the request such as the blSandBoxId parameters. If the getSandBoxPreviewEnabled(), then this method will not return a user SandBox.
      Specified by:
      resolveSandBox in interface BroadleafSandBoxResolver
    • resolveSandBox

      public SandBox resolveSandBox(org.springframework.web.context.request.WebRequest request, Site site)
      Description copied from interface: BroadleafSandBoxResolver
      Resolve the sandbox for the given site and request
      Specified by:
      resolveSandBox in interface BroadleafSandBoxResolver
      Returns:
      the sandbox for the current request
    • getSandBoxPreviewEnabled

      public Boolean getSandBoxPreviewEnabled()
      Sets whether or not the site can be viewed in preview mode.
      Returns:
    • setSandBoxPreviewEnabled

      public void setSandBoxPreviewEnabled(Boolean sandBoxPreviewEnabled)