Package com.google.code.rees.scope.conversation

Examples of com.google.code.rees.scope.conversation.ConversationAdapter


    @Override
    public boolean preHandle(HttpServletRequest request,
            HttpServletResponse response, Object handler) throws Exception {
        ConversationContextManager contextManager = conversationContextManagerFactory
                .getManager(request);
        ConversationAdapter adapter = new SpringConversationAdapter(request,
                (HandlerMethod) handler, contextManager);
        conversationManager.processConversations(adapter);
        return true;
    }
View Full Code Here


     * passes in a {@link SpringConversationAdapter}.
     */
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        ConversationContextManager contextManager = conversationContextManagerFactory.getManager(request);
        ConversationAdapter adapter = new SpringConversationAdapter(request, (HandlerMethod) handler, contextManager);
        conversationManager.processConversations(adapter);
        return true;
    }
View Full Code Here

     
      try {
       
        HttpServletRequest request = (HttpServletRequest) invocation.getInvocationContext().get(StrutsStatics.HTTP_REQUEST);
          ConversationContextManager contextManager = this.conversationContextManagerProvider.getManager(request);
          final ConversationAdapter adapter = new StrutsConversationAdapter(invocation, contextManager);
       
        this.conversationProcessor.processConversations(adapter);
       
        invocation.addPreResultListener(new PreResultListener() {
          @Override
          public void beforeResult(ActionInvocation invocation, String resultCode) {
            adapter.executePostProcessors();
            invocation.getStack().getContext().put(StrutsScopeConstants.CONVERSATION_ID_MAP_STACK_KEY, adapter.getViewContext());
          }
            });
           
            return invocation.invoke();
       
View Full Code Here

     
      try {
       
        HttpServletRequest request = (HttpServletRequest) invocation.getInvocationContext().get(StrutsStatics.HTTP_REQUEST);
          ConversationContextManager contextManager = contextManagerProvider.getManager(request);
          final ConversationAdapter adapter = new StrutsConversationAdapter(invocation, contextManager);
       
        processor.processConversations(adapter);
       
        invocation.addPreResultListener(new PreResultListener() {
          @Override
          public void beforeResult(ActionInvocation invocation, String resultCode) {
            adapter.executePostProcessors();
            invocation.getStack().getContext().put(StrutsScopeConstants.CONVERSATION_ID_MAP_STACK_KEY, adapter.getViewContext());
          }
            });
           
            return invocation.invoke();
       
View Full Code Here

    @Test
    public void testProcessScopes() {

        ConversationManager cManager = EasyMock
                .createMock(ConversationManager.class);
        ConversationAdapter cAdapter = EasyMock
                .createMock(ConversationAdapter.class);
        cManager.processConversations(cAdapter);
        EasyMock.expectLastCall();
        EasyMock.replay(cManager);
View Full Code Here

      try {
       
        ActionContext actionContext = invocation.getInvocationContext();
        HttpServletRequest request = (HttpServletRequest) actionContext.get(StrutsStatics.HTTP_REQUEST);
          ConversationContextManager contextManager = contextManagerProvider.getManager(request);
          final ConversationAdapter adapter = new StrutsConversationAdapter(invocation, contextManager);
       
        processor.processConversations(adapter);
       
        invocation.addPreResultListener(new PreResultListener() {
          @Override
          public void beforeResult(ActionInvocation invocation, String resultCode) {
            adapter.executePostProcessors();
            invocation.getStack().getContext().put(StrutsScopeConstants.CONVERSATION_ID_MAP_STACK_KEY, adapter.getViewContext());
          }
            });
       
        this.cleanupParamIds(actionContext.getParameters());
           
View Full Code Here

    @Test
    public void testProcessScopes() {

        ConversationManager cManager = EasyMock
                .createMock(ConversationManager.class);
        ConversationAdapter cAdapter = EasyMock
                .createMock(ConversationAdapter.class);
        cManager.processConversations(cAdapter);
        EasyMock.expectLastCall();
        EasyMock.replay(cManager);
View Full Code Here

     * passes in a {@link SpringConversationAdapter}.
     */
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        ConversationContextManager contextManager = conversationContextManagerProvider.getManager(request);
        ConversationAdapter adapter = new SpringConversationAdapter(request, (HandlerMethod) handler, contextManager);
        conversationProcessor.processConversations(adapter);
        return true;
    }
View Full Code Here

*/
public abstract class StrutsSpringScopeTestCase<T> extends StrutsSpringTest<T> {
 
  @Override
  public void beforeResult(ActionInvocation invocation, String resultCode) {
      final ConversationAdapter adapter = ConversationAdapter.getAdapter();
      ConversationAdapter.setAdapter(new ConversationAdapter() {

      private static final long serialVersionUID = 1L;

      @Override
      public Object getAction() {
        return adapter.getAction();
      }

      @Override
      public String getActionId() {
        return adapter.getActionId();
      }

      @Override
      public Map<String, String> getRequestContext() {
        return adapter.getRequestContext();
      }

      @Override
      public ConversationContext beginConversation(
          String conversationName, long maxIdleTimeMillis) {
        return adapter.beginConversation(conversationName, maxIdleTimeMillis);
      }

      @Override
      public ConversationContext getConversationContext(
          String conversationName, String conversationId) {
        return adapter.getConversationContext(conversationName, conversationId);
      }

      @Override
      public ConversationContext endConversation(String conversationName,
          String conversationId) {
        return adapter.endConversation(conversationName, conversationId);
      }
     
      @Override
      public void doCleanup() {
        conversationAdapter.set(adapter);
View Full Code Here

*/
public abstract class StrutsScopeTestCase<T> extends StrutsTest<T> {
 
  @Override
  public void beforeResult(ActionInvocation invocation, String resultCode) {
      final ConversationAdapter adapter = ConversationAdapter.getAdapter();;
      ConversationAdapter.setAdapter(new ConversationAdapter() {

      private static final long serialVersionUID = 1L;

      @Override
      public Object getAction() {
        return adapter.getAction();
      }

      @Override
      public String getActionId() {
        return adapter.getActionId();
      }

      @Override
      public Map<String, String> getRequestContext() {
        return adapter.getRequestContext();
      }

      @Override
      public ConversationContext beginConversation(
          String conversationName, long maxIdleTimeMillis) {
        return adapter.beginConversation(conversationName, maxIdleTimeMillis);
      }

      @Override
      public ConversationContext getConversationContext(
          String conversationName, String conversationId) {
        return adapter.getConversationContext(conversationName, conversationId);
      }

      @Override
      public ConversationContext endConversation(String conversationName,
          String conversationId) {
        return adapter.endConversation(conversationName, conversationId);
      }
     
      @Override
      public void doCleanup() {
        conversationAdapter.set(adapter);
View Full Code Here

TOP

Related Classes of com.google.code.rees.scope.conversation.ConversationAdapter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.