com.nurelm.nucontent.controller
Class NuSiteMgrFilter

java.lang.Object
  extended bycom.nurelm.nucontent.controller.NuSiteMgrFilter
All Implemented Interfaces:
javax.servlet.Filter

public final class NuSiteMgrFilter
extends java.lang.Object
implements javax.servlet.Filter

The purpose of this filter is to put the Site object associated with the current siteId into the request object before any NuContent page is called.

NOTE: The filter is not called when a servlet forwards a request to a view. However, the filter is called when a servlet redirects the request to a view.


Constructor Summary
NuSiteMgrFilter()
           
 
Method Summary
 void destroy()
          Take this filter out of service.
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
          Does the work of putting the current Site object into this request attribute.
 void init(javax.servlet.FilterConfig filterConfig)
          Place this filter into service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NuSiteMgrFilter

public NuSiteMgrFilter()
Method Detail

init

public void init(javax.servlet.FilterConfig filterConfig)
          throws javax.servlet.ServletException
Place this filter into service.

Specified by:
init in interface javax.servlet.Filter
Parameters:
filterConfig - The filter configuration object
Throws:
javax.servlet.ServletException - Thrown by implemented class.

destroy

public void destroy()
Take this filter out of service.

Specified by:
destroy in interface javax.servlet.Filter

doFilter

public void doFilter(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response,
                     javax.servlet.FilterChain chain)
              throws java.io.IOException,
                     javax.servlet.ServletException
Does the work of putting the current Site object into this request attribute.

Specified by:
doFilter in interface javax.servlet.Filter
Parameters:
request - The servlet request we are processing
response - The servlet response we are creating
chain - The filter chain we are processing
Throws:
java.io.IOException - if an input/output error occurs
javax.servlet.ServletException - if a servlet error occurs