com.elasticpath.cmweb.filters
Class CmUserSessionFilter

java.lang.Object
  extended by com.elasticpath.cmweb.filters.CmUserSessionFilter
All Implemented Interfaces:
javax.servlet.Filter, org.springframework.beans.factory.InitializingBean

public class CmUserSessionFilter
extends java.lang.Object
implements javax.servlet.Filter, org.springframework.beans.factory.InitializingBean

This filter makes sure to set the valid cmUser instance into the cmUserSession
after acegi security framework's successful authentication.


Constructor Summary
CmUserSessionFilter()
           
 
Method Summary
 void afterPropertiesSet()
          Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).
 void destroy()
          Destroy the filter.
 void doFilter(javax.servlet.ServletRequest inRequest, javax.servlet.ServletResponse inResponse, javax.servlet.FilterChain inFilterChain)
          Filter the request.
 void init(javax.servlet.FilterConfig arg0)
          Initialize the filter.
 void setCmUserService(CmUserService cmUserService)
          Set the CmUserService.
 void setRequestHelper(RequestHelper requestHelper)
          Sets the requestHelper instance.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmUserSessionFilter

public CmUserSessionFilter()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).

Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception - on error

destroy

public void destroy()
Destroy the filter.

Specified by:
destroy in interface javax.servlet.Filter

doFilter

public void doFilter(javax.servlet.ServletRequest inRequest,
                     javax.servlet.ServletResponse inResponse,
                     javax.servlet.FilterChain inFilterChain)
              throws java.io.IOException,
                     javax.servlet.ServletException
Filter the request.

Specified by:
doFilter in interface javax.servlet.Filter
Parameters:
inRequest - the request
inResponse - the response
inFilterChain - the filter chain
Throws:
java.io.IOException - in case of error
javax.servlet.ServletException - in case of error

init

public void init(javax.servlet.FilterConfig arg0)
          throws javax.servlet.ServletException
Initialize the filter.

Specified by:
init in interface javax.servlet.Filter
Parameters:
arg0 - not used
Throws:
javax.servlet.ServletException - in case of error.

setCmUserService

public void setCmUserService(CmUserService cmUserService)
Set the CmUserService.

Parameters:
cmUserService - the CmUser service

setRequestHelper

public void setRequestHelper(RequestHelper requestHelper)
Sets the requestHelper instance.

Parameters:
requestHelper - -the requesthelper instance.