org.apache.myfaces.orchestra.conversation
Class ConversationUtils

java.lang.Object
  extended by org.apache.myfaces.orchestra.conversation.ConversationUtils

public final class ConversationUtils
extends java.lang.Object

Some helpers usable for public use


Method Summary
static void ensureConversationRedirect(java.lang.String conversationName, java.lang.String redirectViewId)
          If no conversation with name conversationName is active a redirect to redirectViewId will be issued.
static java.lang.Object invalidateAndRestart(Conversation conversation)
          End and restart the given conversation.
static java.lang.Object invalidateAndRestartCurrent()
          End and restart the current conversation.
static void invalidateIfExists(java.lang.String name)
          Invalidates a conversation if it exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

invalidateAndRestart

public static java.lang.Object invalidateAndRestart(Conversation conversation)
End and restart the given conversation.

In contrast to Conversation.invalidateAndRestart() this method returns a new instance of the "controller bean" for the given conversation.

The "controller bean" is the one you configured in your dependency injection framework.


invalidateAndRestartCurrent

public static java.lang.Object invalidateAndRestartCurrent()
End and restart the current conversation.

In contrast to invalidateAndRestart(Conversation) this method returns a new instance of the "current bean".


ensureConversationRedirect

public static void ensureConversationRedirect(java.lang.String conversationName,
                                              java.lang.String redirectViewId)
If no conversation with name conversationName is active a redirect to redirectViewId will be issued.

If redirectViewId starts with an slash ('/') the context path will be added.


invalidateIfExists

public static void invalidateIfExists(java.lang.String name)
Invalidates a conversation if it exists.



Copyright 2007 The Apache Software Foundation. All Rights Reserved.