Class ServletFilterWrapper
java.lang.Object
org.ametys.core.servletwrapper.filter.ServletFilterWrapper
This class is a generic filter wrapping an actual
Filter
.
ServletFilterWrapper
are used to filter requests from inside the application, instead of inside the servlet engine.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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 Details
-
ServletFilterWrapper
Constructor- Parameters:
filter
- A filter to apply
-
-
Method Details
-
init
public void init(Map<String, String> parameters, ServletContext servletContext) throws ServletExceptionEnables 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
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
Destroys the filter.
-