|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.code.rees.scope.struts2.ConversationInterceptor
public class ConversationInterceptor
This interceptor uses an InjectionConversationProcessor to process conversation states and scopes.
| Field Summary | |
|---|---|
protected HttpConversationContextManagerProvider |
contextManagerProvider
|
static String |
CONVERSATION_EXCEPTION_ID_STACK_KEY
In the case of an invalid id result, this key can be used to retrieve the offending conversation ID from the ValueStack. |
static String |
CONVERSATION_EXCEPTION_KEY
This key can be used in a message resource bundle to specify a message in the case of a an unexpected error occurring during conversation processing and also to map results as this will be the result value. |
static String |
CONVERSATION_EXCEPTION_NAME_STACK_KEY
In the case of an invalid id result, this key can be used to retrieve the offending conversation's name from the ValueStack. |
static String |
CONVERSATION_ID_EXCEPTION_KEY
This key can be used in a message resource bundle to specify a message in the case of a user submitting a request with an invalid conversation ID (i.e. |
protected static Pattern |
ID_PARAM_PATTERN
|
protected static String |
ID_PARAM_REGEX
|
protected ConversationProcessor |
processor
|
protected ScopeContainer |
scopeContainer
|
| Constructor Summary | |
|---|---|
ConversationInterceptor()
|
|
| Method Summary | |
|---|---|
protected void |
cleanupParamIds(Map<String,Object> parameters)
removes the conversation ids from the parameter map so that they are excluded from further parameter processing |
void |
destroy()
|
protected void |
handleConversationErrorAware(com.opensymphony.xwork2.ActionProxy proxy,
String errorMessage)
This provides extra functionality over placing on stack in that it allows for easily propagating the error through a redirect using a static result param: |
protected String |
handleIdException(com.opensymphony.xwork2.ActionInvocation invocation,
ConversationIdException cie)
Handles logging and UI messages for ConversationIdExceptions |
protected String |
handleUnexpectedException(com.opensymphony.xwork2.ActionInvocation invocation,
ConversationException ce)
Handles logging and UI messages for ConversationExceptions |
void |
init()
|
String |
intercept(com.opensymphony.xwork2.ActionInvocation invocation)
|
void |
setScopeContainerProvider(ScopeContainerProvider scopeContainerProvider)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CONVERSATION_ID_EXCEPTION_KEY
public static final String CONVERSATION_EXCEPTION_KEY
Of course, we don't expect that this will happen ;)
public static final String CONVERSATION_EXCEPTION_NAME_STACK_KEY
ValueStack.
This value can then be referenced in a message with the expression ${conversation.name}
public static final String CONVERSATION_EXCEPTION_ID_STACK_KEY
ValueStack.
This value can then be referenced in a message with the expression ${conversation.id}
protected static final String ID_PARAM_REGEX
protected static final Pattern ID_PARAM_PATTERN
protected HttpConversationContextManagerProvider contextManagerProvider
protected ConversationProcessor processor
protected ScopeContainer scopeContainer
| Constructor Detail |
|---|
public ConversationInterceptor()
| Method Detail |
|---|
public void setScopeContainerProvider(ScopeContainerProvider scopeContainerProvider)
public void destroy()
destroy in interface com.opensymphony.xwork2.interceptor.Interceptorpublic void init()
init in interface com.opensymphony.xwork2.interceptor.Interceptor
public String intercept(com.opensymphony.xwork2.ActionInvocation invocation)
throws Exception
intercept in interface com.opensymphony.xwork2.interceptor.InterceptorExceptionprotected void cleanupParamIds(Map<String,Object> parameters)
parameters - a map of the request parameters
protected String handleIdException(com.opensymphony.xwork2.ActionInvocation invocation,
ConversationIdException cie)
invocation - cie -
protected String handleUnexpectedException(com.opensymphony.xwork2.ActionInvocation invocation,
ConversationException ce)
invocation - ce -
protected void handleConversationErrorAware(com.opensymphony.xwork2.ActionProxy proxy,
String errorMessage)
<param name="conversationError">${conversationError}</param>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||