public class BroadleafRequestContext extends Object
BroadleafRequestProcessor}
Modifier and Type | Field and Description |
---|---|
protected BroadleafCurrency |
broadleafCurrency |
protected Currency |
javaCurrency |
protected Locale |
javaLocale |
protected Locale |
locale |
protected javax.servlet.http.HttpServletRequest |
request |
protected javax.servlet.http.HttpServletResponse |
response |
protected SandBox |
sandbox |
protected Site |
site |
protected Theme |
theme |
protected org.springframework.web.context.request.WebRequest |
webRequest |
Constructor and Description |
---|
BroadleafRequestContext() |
Modifier and Type | Method and Description |
---|---|
BroadleafCurrency |
getBroadleafCurrency() |
static BroadleafRequestContext |
getBroadleafRequestContext() |
Currency |
getJavaCurrency()
Returns the java.util.Currency constructed from the org.broadleafcommerce.common.currency.domain.BroadleafCurrency
|
Locale |
getJavaLocale()
Returns the java.util.Locale constructed from the org.broadleafcommerce.common.locale.domain.Locale.
|
Locale |
getLocale() |
javax.servlet.http.HttpServletRequest |
getRequest()
Gets the current request on the context
|
static Map<String,String[]> |
getRequestParameterMap() |
String |
getRequestURIWithoutContext() |
javax.servlet.http.HttpServletResponse |
getResponse()
Returns the response for the context
|
SandBox |
getSandbox() |
Site |
getSite() |
Theme |
getTheme() |
org.springframework.web.context.request.WebRequest |
getWebRequest()
Returns the generic request for use outside of servlets (like in Portlets).
|
static boolean |
hasLocale() |
boolean |
isProductionSandbox() |
boolean |
isSecure() |
void |
setBroadleafCurrency(BroadleafCurrency broadleafCurrency) |
static void |
setBroadleafRequestContext(BroadleafRequestContext broadleafRequestContext) |
void |
setLocale(Locale locale) |
void |
setRequest(javax.servlet.http.HttpServletRequest request)
Sets the current request on the context.
|
void |
setResponse(javax.servlet.http.HttpServletResponse response)
Sets the response on the context
|
void |
setSandbox(SandBox sandbox) |
void |
setSite(Site site) |
void |
setTheme(Theme theme) |
void |
setWebRequest(org.springframework.web.context.request.WebRequest webRequest)
Sets the generic request on the context.
|
protected javax.servlet.http.HttpServletRequest request
protected javax.servlet.http.HttpServletResponse response
protected org.springframework.web.context.request.WebRequest webRequest
protected SandBox sandbox
protected Locale locale
protected BroadleafCurrency broadleafCurrency
protected Site site
protected Theme theme
protected Locale javaLocale
protected Currency javaCurrency
public static BroadleafRequestContext getBroadleafRequestContext()
public static void setBroadleafRequestContext(BroadleafRequestContext broadleafRequestContext)
public static boolean hasLocale()
public javax.servlet.http.HttpServletRequest getRequest()
public void setRequest(javax.servlet.http.HttpServletRequest request)
setWebRequest(WebRequest)
by wrapping
request in a ServletWebRequest
.request
- public javax.servlet.http.HttpServletResponse getResponse()
public void setResponse(javax.servlet.http.HttpServletResponse response)
response
- public void setWebRequest(org.springframework.web.context.request.WebRequest webRequest)
ServletWebRequest
then
setRequest(HttpServletRequest)
will be invoked as well with the native underlying HttpServletRequest
passed as a parameter.
ServletWebRequest
then an attempt is made to set the response
(note that this could be null if the ServletWebRequest was not instantiated with both the HttpServletRequest
and HttpServletResponse
webRequest
- public org.springframework.web.context.request.WebRequest getWebRequest()
setRequest(HttpServletRequest)
#setWebRequest(WebRequest)}
public Site getSite()
public void setSite(Site site)
public SandBox getSandbox()
public void setSandbox(SandBox sandbox)
public Locale getLocale()
public Locale getJavaLocale()
public Currency getJavaCurrency()
public void setLocale(Locale locale)
public String getRequestURIWithoutContext()
public boolean isSecure()
public boolean isProductionSandbox()
public Theme getTheme()
public void setTheme(Theme theme)
public BroadleafCurrency getBroadleafCurrency()
public void setBroadleafCurrency(BroadleafCurrency broadleafCurrency)
Copyright © 2013. All rights reserved.