Package org.broadleafcommerce.cms.web
Class BroadleafProcessURLFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
org.broadleafcommerce.cms.web.BroadleafProcessURLFilter
- All Implemented Interfaces:
jakarta.servlet.Filter,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.EnvironmentAware,org.springframework.core.env.EnvironmentCapable,org.springframework.web.context.ServletContextAware
@Deprecated
public class BroadleafProcessURLFilter
extends org.springframework.web.filter.OncePerRequestFilter
Deprecated.
- Author:
- bpolster
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic StringDeprecated.Parameter/Attribute name for the current languagestatic StringDeprecated.Parameter/Attribute name for the current languagestatic StringDeprecated.Parameter/Attribute name for the current languagestatic StringDeprecated.Request attribute to store the current sandboxprotected BooleanDeprecated.Fields inherited from class org.springframework.web.filter.OncePerRequestFilter
ALREADY_FILTERED_SUFFIXFields inherited from class org.springframework.web.filter.GenericFilterBean
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoFilterInternal(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain filterChain) Deprecated.(non-Javadoc)intDeprecated.protected SetDeprecated.Returns a set of suffixes that can be ignored by content processing.intDeprecated.intDeprecated.Deprecated.Deprecated.voidsetCacheExpirationSeconds(int cacheExpirationSeconds) Deprecated.protected voidsetContentTime(jakarta.servlet.http.HttpServletRequest request) Deprecated.voidsetMaxCacheConcurrency(int maxCacheConcurrency) Deprecated.voidsetMaxCacheElements(int maxCacheElements) Deprecated.voidsetSandBoxPreviewEnabled(Boolean sandBoxPreviewEnabled) Deprecated.voidsetUrlProcessorList(List<URLProcessor> urlProcessorList) Deprecated.protected booleanshouldProcessURL(jakarta.servlet.http.HttpServletRequest request, String requestURI) Deprecated.Determines if the passed in URL should be processed by the content management system.Methods inherited from class org.springframework.web.filter.OncePerRequestFilter
doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatchMethods inherited from class org.springframework.web.filter.GenericFilterBean
addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
-
Field Details
-
LOCALE_VAR
Deprecated.Parameter/Attribute name for the current language -
LOCALE_CODE_PARAM
Deprecated.Parameter/Attribute name for the current language -
REQUEST_DTO
Deprecated.Parameter/Attribute name for the current language -
SANDBOX_VAR
Deprecated.Request attribute to store the current sandbox -
sandBoxPreviewEnabled
Deprecated.
-
-
Constructor Details
-
BroadleafProcessURLFilter
public BroadleafProcessURLFilter()Deprecated.
-
-
Method Details
-
doFilterInternal
public void doFilterInternal(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain filterChain) throws IOException, jakarta.servlet.ServletException Deprecated.(non-Javadoc)- Specified by:
doFilterInternalin classorg.springframework.web.filter.OncePerRequestFilter- Throws:
IOExceptionjakarta.servlet.ServletException- See Also:
-
Filter.doFilter(jakarta.servlet.ServletRequest, jakarta.servlet.ServletResponse, jakarta.servlet.FilterChain)
-
shouldProcessURL
protected boolean shouldProcessURL(jakarta.servlet.http.HttpServletRequest request, String requestURI) Deprecated.Determines if the passed in URL should be processed by the content management system. By default, this method returns false for any BLC-Admin URLs and service calls and for all common image/digital mime-types (as determined by an internal call togetIgnoreSuffixes. This check is called with thedoFilterInternalmethod to short-circuit the content processing which can be expensive for requests that do not require it.- Parameters:
requestURI- - the HttpServletRequest.getRequestURI- Returns:
- true if the
HttpServletRequestshould be processed
-
setContentTime
protected void setContentTime(jakarta.servlet.http.HttpServletRequest request) Deprecated. -
getIgnoreSuffixes
Deprecated.Returns a set of suffixes that can be ignored by content processing. The following are returned: List of suffixes ignored:".aif", ".aiff", ".asf", ".avi", ".bin", ".bmp", ".doc", ".eps", ".gif", ".hqx", ".jpg", ".jpeg", ".mid", ".midi", ".mov", ".mp3", ".mpg", ".mpeg", ".p65", ".pdf", ".pic", ".pict", ".png", ".ppt", ".psd", ".qxd", ".ram", ".ra", ".rm", ".sea", ".sit", ".stk", ".swf", ".tif", ".tiff", ".txt", ".rtf", ".vob", ".wav", ".wmf", ".xls", ".zip";
- Returns:
- set of suffixes to ignore.
-
getMaxCacheElements
public int getMaxCacheElements()Deprecated. -
setMaxCacheElements
public void setMaxCacheElements(int maxCacheElements) Deprecated. -
getCacheExpirationSeconds
public int getCacheExpirationSeconds()Deprecated. -
setCacheExpirationSeconds
public void setCacheExpirationSeconds(int cacheExpirationSeconds) Deprecated. -
getMaxCacheConcurrency
public int getMaxCacheConcurrency()Deprecated. -
setMaxCacheConcurrency
public void setMaxCacheConcurrency(int maxCacheConcurrency) Deprecated. -
getUrlProcessorList
Deprecated. -
setUrlProcessorList
Deprecated. -
getSandBoxPreviewEnabled
Deprecated. -
setSandBoxPreviewEnabled
Deprecated.
-
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. See
com.google.common.cache.CacheBuilderfor more information on these parameters.