com.dakuupa.struts.crud
Class AbstractUserInterceptor<A extends CrudAction,M extends CrudModel>

java.lang.Object
  extended by com.dakuupa.struts.crud.AbstractUserInterceptor<A,M>
Type Parameters:
A - the action class. Must extend CrudAction
M - the model class. Must extend CrudModel -sets username in model.getUser() -gets instances of action and model -can check if URI contains string (i.e.: see what page user is on)
All Implemented Interfaces:
com.opensymphony.xwork2.interceptor.Interceptor, Serializable

public abstract class AbstractUserInterceptor<A extends CrudAction,M extends CrudModel>
extends Object
implements com.opensymphony.xwork2.interceptor.Interceptor

Author:
etwilliams Abstract class for dealing with Users
See Also:
Serialized Form

Field Summary
static String ACCESS_ERROR
           
protected  A action
           
protected  Logger logger
           
protected  M model
           
static String PATH_ADMIN
           
static String PATH_MOBILE
           
static String PATH_SECURE
           
protected  javax.servlet.http.HttpServletRequest request
           
 
Constructor Summary
AbstractUserInterceptor()
           
 
Method Summary
 boolean checkPathForString(String searchStr)
           
 void destroy()
           
abstract  String doIntercept(com.opensymphony.xwork2.ActionInvocation invocation)
           
 void init()
           
 String intercept(com.opensymphony.xwork2.ActionInvocation invocation)
           
 void prepare(com.opensymphony.xwork2.ActionInvocation invocation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected Logger logger

action

protected A extends CrudAction action

model

protected M extends CrudModel model

request

protected javax.servlet.http.HttpServletRequest request

ACCESS_ERROR

public static final String ACCESS_ERROR
See Also:
Constant Field Values

PATH_ADMIN

public static final String PATH_ADMIN
See Also:
Constant Field Values

PATH_SECURE

public static final String PATH_SECURE
See Also:
Constant Field Values

PATH_MOBILE

public static final String PATH_MOBILE
See Also:
Constant Field Values
Constructor Detail

AbstractUserInterceptor

public AbstractUserInterceptor()
Method Detail

intercept

public String intercept(com.opensymphony.xwork2.ActionInvocation invocation)
                 throws Exception
Specified by:
intercept in interface com.opensymphony.xwork2.interceptor.Interceptor
Throws:
Exception

prepare

public final void prepare(com.opensymphony.xwork2.ActionInvocation invocation)

doIntercept

public abstract String doIntercept(com.opensymphony.xwork2.ActionInvocation invocation)
                            throws Exception
Throws:
Exception

checkPathForString

public boolean checkPathForString(String searchStr)

destroy

public void destroy()
Specified by:
destroy in interface com.opensymphony.xwork2.interceptor.Interceptor

init

public void init()
Specified by:
init in interface com.opensymphony.xwork2.interceptor.Interceptor


Copyright © 2012. All Rights Reserved.