|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
org.broadleafcommerce.cms.web.BroadleafProcessURLFilter
@Component(value="blProcessURLFilter") public class BroadleafProcessURLFilter
This filter sets up the CMS system by setting the current sandbox, locale, time of day, and languageCode that used by content items.
After setting up content variables, it checks to see if a request can be processed by an instance of URLProcessor and if so, delegates the request to that processor. This filter creates an internal cache to quickly determine if the request should be processed by an instance of URLProcessor or be passed to the next filter in the filter chain. The cache settings (including expiration seconds, maximum elements, and concurrency) can be configured via Spring at startup. Seecom.google.common.cache.CacheBuilder for more information
on these parameters.
| Field Summary | |
|---|---|
static String |
LOCALE_CODE_PARAM
Parameter/Attribute name for the current language |
static String |
LOCALE_VAR
Parameter/Attribute name for the current language |
static String |
REQUEST_DTO
Parameter/Attribute name for the current language |
static String |
SANDBOX_VAR
Request attribute to store the current sandbox |
protected Boolean |
sandBoxPreviewEnabled
|
| Fields inherited from class org.springframework.web.filter.OncePerRequestFilter |
|---|
ALREADY_FILTERED_SUFFIX |
| Fields inherited from class org.springframework.web.filter.GenericFilterBean |
|---|
logger |
| Constructor Summary | |
|---|---|
BroadleafProcessURLFilter()
|
|
| Method Summary | |
|---|---|
void |
doFilterInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain filterChain)
(non-Javadoc) |
int |
getCacheExpirationSeconds()
|
protected Set |
getIgnoreSuffixes()
Returns a set of suffixes that can be ignored by content processing. |
int |
getMaxCacheConcurrency()
|
int |
getMaxCacheElements()
|
Boolean |
getSandBoxPreviewEnabled()
|
List<URLProcessor> |
getUrlProcessorList()
|
void |
setCacheExpirationSeconds(int cacheExpirationSeconds)
|
void |
setMaxCacheConcurrency(int maxCacheConcurrency)
|
void |
setMaxCacheElements(int maxCacheElements)
|
void |
setSandBoxPreviewEnabled(Boolean sandBoxPreviewEnabled)
|
void |
setUrlProcessorList(List<URLProcessor> urlProcessorList)
|
protected boolean |
shouldProcessURL(javax.servlet.http.HttpServletRequest request,
String requestURI)
Determines if the passed in URL should be processed by the content management system. |
| Methods inherited from class org.springframework.web.filter.OncePerRequestFilter |
|---|
doFilter, getAlreadyFilteredAttributeName, shouldNotFilter |
| Methods inherited from class org.springframework.web.filter.GenericFilterBean |
|---|
addRequiredProperty, afterPropertiesSet, destroy, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setServletContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Boolean sandBoxPreviewEnabled
public static String LOCALE_VAR
public static String LOCALE_CODE_PARAM
public static String REQUEST_DTO
public static String SANDBOX_VAR
| Constructor Detail |
|---|
public BroadleafProcessURLFilter()
| Method Detail |
|---|
public void doFilterInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain filterChain)
throws IOException,
javax.servlet.ServletException
doFilterInternal in class org.springframework.web.filter.OncePerRequestFilterIOException
javax.servlet.ServletExceptionFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
protected boolean shouldProcessURL(javax.servlet.http.HttpServletRequest request,
String requestURI)
getIgnoreSuffixes.
This check is called with the doFilterInternal method to short-circuit the content
processing which can be expensive for requests that do not require it.
requestURI - - the HttpServletRequest.getRequestURI
HttpServletRequest should be processedprotected Set getIgnoreSuffixes()
public int getMaxCacheElements()
public void setMaxCacheElements(int maxCacheElements)
public int getCacheExpirationSeconds()
public void setCacheExpirationSeconds(int cacheExpirationSeconds)
public int getMaxCacheConcurrency()
public void setMaxCacheConcurrency(int maxCacheConcurrency)
public List<URLProcessor> getUrlProcessorList()
public void setUrlProcessorList(List<URLProcessor> urlProcessorList)
public Boolean getSandBoxPreviewEnabled()
public void setSandBoxPreviewEnabled(Boolean sandBoxPreviewEnabled)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||