net.sf.scmwebgui
Class AccessFilter

java.lang.Object
  extended by net.sf.scmwebgui.AccessFilter
All Implemented Interfaces:
javax.servlet.Filter

public class AccessFilter
extends java.lang.Object
implements javax.servlet.Filter

This filter checks that the access is valid, and provides user credentials and other context info to the following steps.

Author:
mikeshadow

Field Summary
static java.lang.String PROJECT_STRUCTURE_INIT_PARAM
          This filter's initial parameter specifies the file name used in all the projects for the multiproject
static java.lang.String REQUEST_CTX_ATTRIB
          Request attribute for RequestContext object
protected  javax.servlet.ServletContext servletCtx
           
 java.lang.String structureFileName
           
static java.lang.String SUBSCRIPTIONS_ROOT_INIT_PARAM
          This filter's initial parameter specifies the multiproject root in the filesystem
static java.lang.String USER_SESSION_ATTRIBUTE
          User session attribute
 
Constructor Summary
AccessFilter()
          Default constructor
 
Method Summary
 void destroy()
          Called by servlet container when web app is being destroyed.
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
          Filters the incoming request, logging the total process time and performing the access filter.
 void init(javax.servlet.FilterConfig cfg)
          Initializes access filter, instantiating a Multiproject object from the initial parameter "multiprojectRoot"
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROJECT_STRUCTURE_INIT_PARAM

public static final java.lang.String PROJECT_STRUCTURE_INIT_PARAM
This filter's initial parameter specifies the file name used in all the projects for the multiproject

See Also:
Constant Field Values

SUBSCRIPTIONS_ROOT_INIT_PARAM

public static final java.lang.String SUBSCRIPTIONS_ROOT_INIT_PARAM
This filter's initial parameter specifies the multiproject root in the filesystem

See Also:
Constant Field Values

USER_SESSION_ATTRIBUTE

public static final java.lang.String USER_SESSION_ATTRIBUTE
User session attribute

See Also:
Constant Field Values

REQUEST_CTX_ATTRIB

public static final java.lang.String REQUEST_CTX_ATTRIB
Request attribute for RequestContext object

See Also:
Constant Field Values

servletCtx

protected javax.servlet.ServletContext servletCtx

structureFileName

public java.lang.String structureFileName
Constructor Detail

AccessFilter

public AccessFilter()
Default constructor

Method Detail

init

public void init(javax.servlet.FilterConfig cfg)
          throws javax.servlet.ServletException
Initializes access filter, instantiating a Multiproject object from the initial parameter "multiprojectRoot"

Specified by:
init in interface javax.servlet.Filter
Parameters:
cfg - The filter configuration object
Throws:
javax.servlet.ServletException - Thrown if there's an error building the Multiproject object

destroy

public void destroy()
Called by servlet container when web app is being destroyed. This method does nothing

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
Filters the incoming request, logging the total process time and performing the access filter.

Specified by:
doFilter in interface javax.servlet.Filter
Parameters:
request -
response -
chain -
Throws:
java.io.IOException
javax.servlet.ServletException


Copyright null null. All Rights Reserved.