com.google.code.rees.scope.struts2
Class StrutsConversationAdapter

java.lang.Object
  extended by com.google.code.rees.scope.conversation.ConversationAdapter
      extended by com.google.code.rees.scope.struts2.StrutsConversationAdapter
All Implemented Interfaces:
Serializable

public class StrutsConversationAdapter
extends ConversationAdapter

Struts2 implementation of the ConversationAdapter.

Author:
rees.byars
See Also:
Serialized Form

Field Summary
protected  com.opensymphony.xwork2.ActionContext actionContext
           
protected  ConversationContextManager conversationContextManager
           
protected  com.opensymphony.xwork2.ActionInvocation invocation
           
protected  javax.servlet.http.HttpServletRequest request
           
protected  Map<String,String> requestContext
           
 
Fields inherited from class com.google.code.rees.scope.conversation.ConversationAdapter
conversationAdapter, postProcessorFactory, postProcessors, viewContext
 
Constructor Summary
StrutsConversationAdapter(com.opensymphony.xwork2.ActionInvocation invocation, ConversationContextManager conversationContextManager)
           
 
Method Summary
 ConversationContext beginConversation(String conversationName, long maxIdleTimeMillis)
          begins a new conversation, returning the context for the new conversation
 ConversationContext endConversation(String conversationName, String conversationId)
          Removes the conversation from the session, returning the context
 Object getAction()
          The controller instance, such as a Struts2 action class or a Spring MVC controller
 String getActionId()
          A string identifying the current action.
 ConversationContext getConversationContext(String conversationName, String conversationId)
          Returns a ConversationContext for the given name and ID
 Map<String,String> getRequestContext()
          Returns a map containing, at a minimum, conversation name/id key/value pairs for the current request.
 
Methods inherited from class com.google.code.rees.scope.conversation.ConversationAdapter
addPostProcessor, cleanup, doCleanup, executePostProcessors, getAdapter, getViewContext, setAdapter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

conversationContextManager

protected ConversationContextManager conversationContextManager

invocation

protected com.opensymphony.xwork2.ActionInvocation invocation

actionContext

protected com.opensymphony.xwork2.ActionContext actionContext

request

protected javax.servlet.http.HttpServletRequest request

requestContext

protected Map<String,String> requestContext
Constructor Detail

StrutsConversationAdapter

public StrutsConversationAdapter(com.opensymphony.xwork2.ActionInvocation invocation,
                                 ConversationContextManager conversationContextManager)
Method Detail

getAction

public Object getAction()
The controller instance, such as a Struts2 action class or a Spring MVC controller

Specified by:
getAction in class ConversationAdapter
Returns:

getActionId

public String getActionId()
A string identifying the current action. The convention employed by the DefaultConversationArbitrator is the name of the controller method being executed.

Specified by:
getActionId in class ConversationAdapter
Returns:

getRequestContext

public Map<String,String> getRequestContext()
Returns a map containing, at a minimum, conversation name/id key/value pairs for the current request.

Specified by:
getRequestContext in class ConversationAdapter
Returns:

beginConversation

public ConversationContext beginConversation(String conversationName,
                                             long maxIdleTimeMillis)
begins a new conversation, returning the context for the new conversation

Specified by:
beginConversation in class ConversationAdapter
Returns:

getConversationContext

public ConversationContext getConversationContext(String conversationName,
                                                  String conversationId)
Returns a ConversationContext for the given name and ID

Specified by:
getConversationContext in class ConversationAdapter
Returns:

endConversation

public ConversationContext endConversation(String conversationName,
                                           String conversationId)
Removes the conversation from the session, returning the context

Specified by:
endConversation in class ConversationAdapter


Copyright © 2012-2013. All Rights Reserved.