org.davesag.generica.servlet.filter
Class PresentationFilter

java.lang.Object
  extended byorg.davesag.generica.servlet.filter.PresentationFilter
All Implemented Interfaces:
Filter

public class PresentationFilter
extends Object
implements Filter

The PresentationFilter triggers the supplied Presenter.

Since:
Generica 1.0
Version:
CVS Revision $Id: PresentationFilter.java,v 1.4 2004/03/30 13:00:42 davesag Exp $
Author:
Dave Sag http://www.davesag.com

Constructor Summary
PresentationFilter()
           
 
Method Summary
 void destroy()
          just nulls out the instance variables.
 void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
          checks for the user key in the current session.
 void init(FilterConfig config)
          Initialise the filter with the params from the web.xml file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PresentationFilter

public PresentationFilter()
Method Detail

init

public void init(FilterConfig config)
          throws ServletException
Initialise the filter with the params from the web.xml file. The required param is "presenter".

Specified by:
init in interface Filter
Parameters:
config - The FilterConfig.
Throws:
ServletException - if could not load a presenter.

destroy

public void destroy()
just nulls out the instance variables.

Specified by:
destroy in interface Filter

doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
              throws IOException,
                     ServletException
checks for the user key in the current session. if it's there then checks the class of the user against the userClass provided and bounces to the login page if the correct user type is not logged in.

Specified by:
doFilter in interface Filter
Parameters:
request - The ServletRequest
response - The ServletResponse
chain - The FilterChain
Throws:
IOException - if some IO problem happens.
ServletException - if some any other kind of problem happens.


Dave Sag Generica API version 0.5.9 - (prerelease) Copyright 2003 - 2004 Dave Sag.