Class ServletFilterWrapper
- java.lang.Object
-
- org.ametys.core.servletwrapper.filter.ServletFilterWrapper
-
public class ServletFilterWrapper extends Object
This class is a generic filter wrapping an actualFilter
.ServletFilterWrapper
are used to filter requests from inside the application, instead of inside the servlet engine.
-
-
Constructor Summary
Constructors Constructor Description ServletFilterWrapper(Filter filter)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
Destroys the filter.void
doFilter(Map objectModel, Redirector redirect)
Applies the filter.void
init(Map<String,String> parameters, ServletContext servletContext)
Enables to init config parameters using a FilterConfig.
-
-
-
Constructor Detail
-
ServletFilterWrapper
public ServletFilterWrapper(Filter filter)
Constructor- Parameters:
filter
- A filter to apply
-
-
Method Detail
-
init
public void init(Map<String,String> parameters, ServletContext servletContext) throws ServletException
Enables to init config parameters using a FilterConfig.- Parameters:
parameters
- a map containing all filter parameters.servletContext
- the servlet context.- Throws:
ServletException
- if the underlying Filter fails to initialize.
-
doFilter
public void doFilter(Map objectModel, Redirector redirect) throws ServletException, IOException
Applies the filter.- Parameters:
objectModel
- the Cocoon's object model.redirect
- the Cocoon's redirector.- Throws:
ServletException
- if the underlying Filter fails to process the request.IOException
- if the underlying Filter fails to process the request.
-
destroy
public void destroy()
Destroys the filter.
-
-