com.opensymphony.webwork.interceptor
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Field Summary | |
|---|---|
static String |
actionErrorsSessionKey
|
static String |
actionMessagesSessionKey
|
static String |
fieldErrorsSessionKey
|
static String |
NONE
|
static String |
RETRIEVE_MODE
|
static String |
STORE_MODE
|
| Constructor Summary | |
|---|---|
MessageStoreInterceptor()
|
|
| Method Summary | |
|---|---|
protected void |
after(ActionInvocation invocation,
String result)
Handle the storing of field errors / action messages / field errors, which is done after action invocation, and the operationMode is in 'STORE'. |
protected void |
before(ActionInvocation invocation)
Handle the retrieving of field errors / action messages / field errors, which is done before action invocation, and the operationMode is 'RETRIEVE'. |
void |
destroy()
No operation. |
boolean |
getAllowRequestParameterSwitch()
Returns true if the request parameter (default to operationMode) is used to decide which mode this interceptor should operates in. |
String |
getOperationModel()
Returns the operation mode this interceptor is operating in (valid values are) STORE RETRIEVE NONE (this is the default) |
protected String |
getRequestOperationMode(ActionInvocation invocation)
Get the operationMode through request paramter, if allowRequestParameterSwitch
is 'true', else it simply returns 'NONE', meaning its neither in the 'STORE_MODE' nor
'RETRIEVE_MODE'. |
String |
getRequestParameterSwitch()
Returns the request parameter string that is used to determine the mode this interceptor should operatoes in. |
void |
init()
No operatio9n. |
String |
intercept(ActionInvocation invocation)
Intercept the incomming request and store messages into HttpSession / retrieve messages from HttpSession / do nothing depending on the mode this interceptor is operating in. |
protected Collection |
mergeCollection(Collection col1,
Collection col2)
Merge col1 and col2 and return the composite
Collection. |
protected Map |
mergeMap(Map map1,
Map map2)
Merge map1 and map2 and return the composite
Map |
void |
setAllowRequestParameterSwitch(boolean allowRequestParameterSwitch)
If true allows request parameter (default to operationMode) to decide which mode this interceptor should operates in. |
void |
setOperationMode(String operationMode)
Set the operation mode this interceptor is operating in (valid values are) STORE RETRIEVE NONE (this is the default) |
void |
setRequestParameterSwitch(String requestParameterSwitch)
Set the request parameter string that is used to determine the mode this interceptor should operates in . |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String STORE_MODE
public static final String RETRIEVE_MODE
public static final String NONE
public static String fieldErrorsSessionKey
public static String actionErrorsSessionKey
public static String actionMessagesSessionKey
| Constructor Detail |
|---|
public MessageStoreInterceptor()
| Method Detail |
|---|
public void setAllowRequestParameterSwitch(boolean allowRequestParameterSwitch)
allowRequestParameterSwitch - public boolean getAllowRequestParameterSwitch()
public void setRequestParameterSwitch(String requestParameterSwitch)
requestParameterSwitch - #setRequestParameterSwitch}public String getRequestParameterSwitch()
#setRequestParameterSwitch}public void setOperationMode(String operationMode)
operationMode - public String getOperationModel()
public void destroy()
destroy in interface Interceptorpublic void init()
init in interface Interceptorpublic String intercept(ActionInvocation invocation) throws Exception
intercept in interface InterceptorException - any system-level error, as defined in Action.execute().protected void before(ActionInvocation invocation) throws Exception
operationMode is 'RETRIEVE'.
invocation -
Exceptionprotected void after(ActionInvocation invocation, String result) throws Exception
operationMode is in 'STORE'.
invocation - result -
Exceptionprotected String getRequestOperationMode(ActionInvocation invocation)
allowRequestParameterSwitch
is 'true', else it simply returns 'NONE', meaning its neither in the 'STORE_MODE' nor
'RETRIEVE_MODE'.
protected Collection mergeCollection(Collection col1, Collection col2)
col1 and col2 and return the composite
Collection.
col1 - col2 -
protected Map mergeMap(Map map1, Map map2)
map1 and map2 and return the composite
Map
map1 - map2 -
|
WebWork Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||