org.apache.myfaces.custom.conversation
Class ConversationContext

java.lang.Object
  extended by org.apache.myfaces.custom.conversation.ConversationContext

public class ConversationContext
extends java.lang.Object

The ConversationContext handles all conversations within the current context

Author:
imario@apache.org

Constructor Summary
protected ConversationContext(long id)
           
 
Method Summary
 void attachPersistence()
          attach all conversations to their underlaying persistence
 void detachPersistence()
          detach all conversations from their underlaying persistence
protected  void endConversation(Conversation conversation, boolean regularEnd)
          End the given conversation
 void endConversation(java.lang.String name, boolean regularEnd)
          End the conversation with given name.
This also automatically closes all nested conversations.
 java.lang.Object findBean(java.lang.String name)
          find the bean named name in the conversation stack
 Conversation findConversation(java.lang.Object instance)
          find the conversation which holds the given instance
 Conversation getConversation(java.lang.String name)
          get a conversation by name
 Conversation getCurrentConversation()
          Get the current conversation.
 long getId()
           
 long getLastAccess()
           
 PersistenceManager getPersistenceManager()
          find the persistence manager in the conversation stack
 boolean hasConversation(java.lang.String name)
          check if the given conversation exists
 boolean hasConversations()
          see if there is a conversation
 void purgePersistence()
          detach all conversations from their underlaying persistence
 void shutdownContext()
           
 void startConversation(java.lang.String name, boolean persistence)
          Start a conversation if not already started.
All nested conversations (if any) are closed if the conversation already existed.
protected  void touch()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConversationContext

protected ConversationContext(long id)
Method Detail

touch

protected void touch()

getLastAccess

public long getLastAccess()

shutdownContext

public void shutdownContext()

startConversation

public void startConversation(java.lang.String name,
                              boolean persistence)
Start a conversation if not already started.
All nested conversations (if any) are closed if the conversation already existed.

Parameters:
name -

endConversation

protected void endConversation(Conversation conversation,
                               boolean regularEnd)
End the given conversation


endConversation

public void endConversation(java.lang.String name,
                            boolean regularEnd)
End the conversation with given name.
This also automatically closes all nested conversations.


getCurrentConversation

public Conversation getCurrentConversation()
Get the current conversation. The current conversation is the one last seen by the startConversation tag.


hasConversations

public boolean hasConversations()
see if there is a conversation


hasConversation

public boolean hasConversation(java.lang.String name)
check if the given conversation exists


getConversation

public Conversation getConversation(java.lang.String name)
get a conversation by name


findConversation

public Conversation findConversation(java.lang.Object instance)
find the conversation which holds the given instance


findBean

public java.lang.Object findBean(java.lang.String name)
find the bean named name in the conversation stack


getPersistenceManager

public PersistenceManager getPersistenceManager()
find the persistence manager in the conversation stack


detachPersistence

public void detachPersistence()
detach all conversations from their underlaying persistence


purgePersistence

public void purgePersistence()
detach all conversations from their underlaying persistence


attachPersistence

public void attachPersistence()
attach all conversations to their underlaying persistence


getId

public long getId()


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.