org.broadleafcommerce.common.web
Class BroadleafSandBoxResolverImpl

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

@Component(value="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 Summary
static String SANDBOX_VAR
          Request attribute to store the current sandbox
protected  Boolean sandBoxPreviewEnabled
          Property used to disable sandbox mode.
 
Constructor Summary
BroadleafSandBoxResolverImpl()
           
 
Method Summary
 Boolean getSandBoxPreviewEnabled()
          Sets whether or not the site can be viewed in preview mode.
 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.
 void setSandBoxPreviewEnabled(Boolean sandBoxPreviewEnabled)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

Constructor Detail

BroadleafSandBoxResolverImpl

public BroadleafSandBoxResolverImpl()
Method Detail

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

getSandBoxPreviewEnabled

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

Returns:

setSandBoxPreviewEnabled

public void setSandBoxPreviewEnabled(Boolean sandBoxPreviewEnabled)


Copyright © 2012. All Rights Reserved.