@Service(value="blBroadleafContextUtil") public class BroadleafContextUtil extends Object
Some resource handlers need a valid site, theme, or sandbox to be available when serving request.
This component provides the establishThinRequestContext()
method for that purpose.
Modifier and Type | Field and Description |
---|---|
protected DeployBehaviorUtil |
deployBehaviorUtil |
protected BroadleafSandBoxResolver |
sbResolver |
protected BroadleafSiteResolver |
siteResolver |
protected BroadleafThemeResolver |
themeResolver |
protected boolean |
versioningEnabled |
Constructor and Description |
---|
BroadleafContextUtil() |
Modifier and Type | Method and Description |
---|---|
void |
clearThinRequestContext() |
void |
establishThinRequestContext()
Creates a BroadleafRequestContext with supported values populated
|
protected void |
establishThinRequestContextInternal(boolean includeTheme,
boolean includeSandBox)
Adds request and site to the BroadleafRequestContext
If includeTheme is true then also adds the Theme.
|
void |
establishThinRequestContextWithoutSandBox()
Creates a BroadleafRequestContext without a Sandbox
|
void |
establishThinRequestContextWithoutThemeOrSandbox()
Creates a BroadleafRequestContext without a Theme or Sandbox
|
protected String |
getContextName(javax.servlet.http.HttpServletRequest request) |
protected org.springframework.security.core.context.SecurityContext |
readSecurityContextFromSession(javax.servlet.http.HttpSession httpSession) |
protected BroadleafSiteResolver siteResolver
protected BroadleafSandBoxResolver sbResolver
protected BroadleafThemeResolver themeResolver
protected DeployBehaviorUtil deployBehaviorUtil
protected boolean versioningEnabled
public void establishThinRequestContext()
public void establishThinRequestContextWithoutSandBox()
public void establishThinRequestContextWithoutThemeOrSandbox()
protected void establishThinRequestContextInternal(boolean includeTheme, boolean includeSandBox)
includeTheme
- includeSandBox
- public void clearThinRequestContext()
protected String getContextName(javax.servlet.http.HttpServletRequest request)
protected org.springframework.security.core.context.SecurityContext readSecurityContextFromSession(javax.servlet.http.HttpSession httpSession)
Copyright © 2022. All rights reserved.