org.springframework.batch.admin.web.filter
Class ParameterUnpackerFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
org.springframework.batch.admin.web.filter.ParameterUnpackerFilter
- All Implemented Interfaces:
- javax.servlet.Filter, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.web.context.ServletContextAware
public class ParameterUnpackerFilter
- extends org.springframework.web.filter.OncePerRequestFilter
| Fields inherited from class org.springframework.web.filter.OncePerRequestFilter |
ALREADY_FILTERED_SUFFIX |
| Fields inherited from class org.springframework.web.filter.GenericFilterBean |
logger |
| 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 |
ParameterUnpackerFilter
public ParameterUnpackerFilter()
setPutEmptyParamsInPath
public void setPutEmptyParamsInPath(boolean putEmptyParamsInPath)
- Flag to say that empty parameter value signal their name should be used
as a path parameter. E.g.
/context/path?unpack_foo goes to
context/path/foo.
- Parameters:
putEmptyParamsInPath - the flag value to set (defaults to false)
setDelimiter
public void setDelimiter(String delimiter)
- Parameters:
delimiter - the delimiter used to separate parameter names from
values
setPrefix
public void setPrefix(String prefix)
- Parameters:
prefix - the prefix for parameter names that need to be unpacked
doFilterInternal
protected void doFilterInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain filterChain)
throws javax.servlet.ServletException,
IOException
- Specified by:
doFilterInternal in class org.springframework.web.filter.OncePerRequestFilter
- Throws:
javax.servlet.ServletException
IOException
extractPathKeys
protected Collection<? extends String> extractPathKeys(String paramName,
String delimiter)
unpack
protected Map<String,String[]> unpack(String paramName,
String delimiter)
Copyright © 2013. All Rights Reserved.