|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.portlet.filter.GenericPortletFilterBean
org.springframework.portlet.filter.DelegatingPortletFilterProxy
public class DelegatingPortletFilterProxy
| Field Summary |
|---|
| Fields inherited from class org.springframework.portlet.filter.GenericPortletFilterBean |
|---|
logger |
| Constructor Summary | |
|---|---|
DelegatingPortletFilterProxy()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Subclasses may override this to perform custom filter shutdown. |
protected void |
destroyDelegate(javax.portlet.filter.PortletFilter delegate)
Destroy the PortletFilter delegate. |
void |
doFilter(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response,
javax.portlet.filter.FilterChain chain)
|
void |
doFilter(javax.portlet.EventRequest request,
javax.portlet.EventResponse response,
javax.portlet.filter.FilterChain chain)
|
void |
doFilter(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response,
javax.portlet.filter.FilterChain chain)
|
void |
doFilter(javax.portlet.ResourceRequest request,
javax.portlet.ResourceResponse response,
javax.portlet.filter.FilterChain chain)
|
protected org.springframework.context.ApplicationContext |
findWebApplicationContext()
Retrieve a WebApplicationContext from the PortletContext
attribute with the configured name. |
protected String |
getTargetBeanName()
Return the name of the target bean in the Spring application context. |
protected void |
initDelegate(boolean require)
Initialize the PortletFilter delegate, defined as bean the given Spring application context. |
protected void |
initFilterBean()
Subclasses may override this to perform custom initialization. |
protected void |
invokeDelegate(javax.portlet.filter.ActionFilter delegate,
javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response,
javax.portlet.filter.FilterChain filterChain)
Actually invoke the delegate ActionFilter with the given request and response. |
protected void |
invokeDelegate(javax.portlet.filter.EventFilter delegate,
javax.portlet.EventRequest request,
javax.portlet.EventResponse response,
javax.portlet.filter.FilterChain filterChain)
Actually invoke the delegate EventFilter with the given request and response. |
protected void |
invokeDelegate(javax.portlet.filter.RenderFilter delegate,
javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response,
javax.portlet.filter.FilterChain filterChain)
Actually invoke the delegate RenderFilter with the given request and response. |
protected void |
invokeDelegate(javax.portlet.filter.ResourceFilter delegate,
javax.portlet.ResourceRequest request,
javax.portlet.ResourceResponse response,
javax.portlet.filter.FilterChain filterChain)
Actually invoke the delegate ResourceFilter with the given request and response. |
protected boolean |
isTargetFilterLifecycle()
Return whether to invoke the PortletFilter.init and
PortletFilter.destroy lifecycle methods on the target bean. |
void |
setTargetBeanName(String targetBeanName)
Set the name of the target bean in the Spring application context. |
void |
setTargetFilterLifecycle(boolean targetFilterLifecycle)
Set whether to invoke the PortletFilter.init and
PortletFilter.destroy lifecycle methods on the target bean. |
| Methods inherited from class org.springframework.portlet.filter.GenericPortletFilterBean |
|---|
addRequiredProperty, afterPropertiesSet, getFilterConfig, getFilterName, getPortletContext, init, initBeanWrapper, setBeanName, setPortletContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.portlet.filter.PortletFilter |
|---|
init |
| Constructor Detail |
|---|
public DelegatingPortletFilterProxy()
| Method Detail |
|---|
public void setTargetBeanName(String targetBeanName)
By default, the filter-name as specified for the
DelegatingFilterProxy in web.xml will be used.
protected String getTargetBeanName()
public void setTargetFilterLifecycle(boolean targetFilterLifecycle)
PortletFilter.init and
PortletFilter.destroy lifecycle methods on the target bean.
Default is "false"; target beans usually rely on the Spring application context for managing their lifecycle. Setting this flag to "true" means that the portlet container will control the lifecycle of the target PortletFilter, with this proxy delegating the corresponding calls.
protected boolean isTargetFilterLifecycle()
PortletFilter.init and
PortletFilter.destroy lifecycle methods on the target bean.
protected void initFilterBean()
throws javax.portlet.PortletException
GenericPortletFilterBeanNote: This method will be called from standard filter initialization as well as filter bean initialization in a Spring application context. Filter name and PortletContext will be available in both cases.
This default implementation is empty.
initFilterBean in class GenericPortletFilterBeanjavax.portlet.PortletException - if subclass initialization failsGenericPortletFilterBean.getFilterName(),
GenericPortletFilterBean.getPortletContext()
public void doFilter(javax.portlet.ResourceRequest request,
javax.portlet.ResourceResponse response,
javax.portlet.filter.FilterChain chain)
throws IOException,
javax.portlet.PortletException
doFilter in interface javax.portlet.filter.ResourceFilterIOException
javax.portlet.PortletException
public void doFilter(javax.portlet.EventRequest request,
javax.portlet.EventResponse response,
javax.portlet.filter.FilterChain chain)
throws IOException,
javax.portlet.PortletException
doFilter in interface javax.portlet.filter.EventFilterIOException
javax.portlet.PortletException
public void doFilter(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response,
javax.portlet.filter.FilterChain chain)
throws IOException,
javax.portlet.PortletException
doFilter in interface javax.portlet.filter.RenderFilterIOException
javax.portlet.PortletException
public void doFilter(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response,
javax.portlet.filter.FilterChain chain)
throws IOException,
javax.portlet.PortletException
doFilter in interface javax.portlet.filter.ActionFilterIOException
javax.portlet.PortletExceptionpublic void destroy()
GenericPortletFilterBeanNote: This method will be called from standard filter destruction as well as filter bean destruction in a Spring application context.
This default implementation is empty.
destroy in interface javax.portlet.filter.PortletFilterdestroy in interface org.springframework.beans.factory.DisposableBeandestroy in class GenericPortletFilterBeanprotected org.springframework.context.ApplicationContext findWebApplicationContext()
WebApplicationContext from the PortletContext
attribute with the configured name. The
WebApplicationContext must have already been loaded and stored in the
PortletContext before this filter gets initialized (or invoked).
Subclasses may override this method to provide a different
WebApplicationContext retrieval strategy.
null if not found#getContextAttribute()
protected void initDelegate(boolean require)
throws javax.portlet.PortletException
The default implementation fetches the bean from the application context
and calls the standard PortletFilter.init method on it, passing
in the FilterConfig of this PortletFilter proxy.
wac - the root application context
javax.portlet.PortletException - if thrown by the PortletFiltergetTargetBeanName(),
isTargetFilterLifecycle(),
GenericPortletFilterBean.getFilterConfig(),
javax.portlet.PortletFilter#init(javax.portlet.FilterConfig)
protected void invokeDelegate(javax.portlet.filter.ActionFilter delegate,
javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response,
javax.portlet.filter.FilterChain filterChain)
throws javax.portlet.PortletException,
IOException
delegate - the delegate ActionFilterrequest - the current action requestresponse - the current action responsefilterChain - the current FilterChain
javax.portlet.PortletException - if thrown by the PortletFilter
IOException - if thrown by the PortletFilter
protected void invokeDelegate(javax.portlet.filter.EventFilter delegate,
javax.portlet.EventRequest request,
javax.portlet.EventResponse response,
javax.portlet.filter.FilterChain filterChain)
throws javax.portlet.PortletException,
IOException
delegate - the delegate EventFilterrequest - the current Event requestresponse - the current Event responsefilterChain - the current FilterChain
javax.portlet.PortletException - if thrown by the PortletFilter
IOException - if thrown by the PortletFilter
protected void invokeDelegate(javax.portlet.filter.RenderFilter delegate,
javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response,
javax.portlet.filter.FilterChain filterChain)
throws javax.portlet.PortletException,
IOException
delegate - the delegate RenderFilterrequest - the current Render requestresponse - the current Render responsefilterChain - the current FilterChain
javax.portlet.PortletException - if thrown by the PortletFilter
IOException - if thrown by the PortletFilter
protected void invokeDelegate(javax.portlet.filter.ResourceFilter delegate,
javax.portlet.ResourceRequest request,
javax.portlet.ResourceResponse response,
javax.portlet.filter.FilterChain filterChain)
throws javax.portlet.PortletException,
IOException
delegate - the delegate ResourceFilterrequest - the current Resource requestresponse - the current Resource responsefilterChain - the current FilterChain
javax.portlet.PortletException - if thrown by the PortletFilter
IOException - if thrown by the PortletFilterprotected void destroyDelegate(javax.portlet.filter.PortletFilter delegate)
PortletFilter.destroy on it.
delegate - the PortletFilter delegate (never null)isTargetFilterLifecycle(),
javax.portlet.PortletFilter#destroy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||