Class ScriptFilter
java.lang.Object
org.craftercms.engine.scripting.impl.ScriptFilter
- All Implemented Interfaces:
javax.servlet.Filter
Servlet filter that passes the request through a series of scripts that act as filters too.
- Author:
- avasquez
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
void
doFilter
(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain originalChain) protected boolean
excludeFilter
(String requestUri, String[] excludes) protected List<ScriptFilter.FilterMapping>
protected javax.servlet.FilterChain
getScriptFilterChain
(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.FilterChain chain) protected boolean
includeFilter
(String requestUri, String[] includes) void
init
(javax.servlet.FilterConfig filterConfig) void
setCacheTemplate
(org.craftercms.core.util.cache.CacheTemplate cacheTemplate) void
setDisableVariableRestrictions
(boolean disableVariableRestrictions) void
setExcludedUrls
(String[] excludedUrls) void
setPathMatcher
(org.springframework.util.PathMatcher pathMatcher) void
setPluginService
(PluginService pluginService)
-
Field Details
-
FILTER_KEY
- See Also:
-
SCRIPT_KEY
- See Also:
-
INCLUDE_MAPPINGS_KEY
- See Also:
-
EXCLUDE_MAPPINGS_KEY
- See Also:
-
FILTER_MAPPINGS_CACHE_KEY
- See Also:
-
pathMatcher
protected org.springframework.util.PathMatcher pathMatcher -
disableVariableRestrictions
protected boolean disableVariableRestrictions -
pluginService
-
excludedUrlsMatcher
protected org.springframework.security.web.util.matcher.RequestMatcher excludedUrlsMatcher
-
-
Constructor Details
-
ScriptFilter
public ScriptFilter()
-
-
Method Details
-
setCacheTemplate
public void setCacheTemplate(org.craftercms.core.util.cache.CacheTemplate cacheTemplate) -
setPathMatcher
public void setPathMatcher(org.springframework.util.PathMatcher pathMatcher) -
setDisableVariableRestrictions
public void setDisableVariableRestrictions(boolean disableVariableRestrictions) -
setPluginService
-
setExcludedUrls
-
init
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException - Specified by:
init
in interfacejavax.servlet.Filter
- Throws:
javax.servlet.ServletException
-
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain originalChain) throws IOException, javax.servlet.ServletException - Specified by:
doFilter
in interfacejavax.servlet.Filter
- Throws:
IOException
javax.servlet.ServletException
-
getScriptFilterChain
protected javax.servlet.FilterChain getScriptFilterChain(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.FilterChain chain) -
destroy
public void destroy()- Specified by:
destroy
in interfacejavax.servlet.Filter
-
getFilterMappings
-
excludeFilter
-
includeFilter
-