org.apache.myfaces.custom.conversation
Class Conversation

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

public class Conversation
extends java.lang.Object

handle conversation related stuff like beans

Author:
imario@apache.org

Constructor Summary
protected Conversation(java.lang.String name, boolean persistence)
           
 
Method Summary
 void endConversation(boolean regularEnd)
          end this conversation
inform all beans implementing the ConversationListener about the conversation end free all beans
 java.lang.Object getBean(java.lang.String name)
           
 java.lang.String getName()
          the conversation name
 PersistenceManager getPersistenceManager()
           
 boolean hasBean(java.lang.Object instance)
          returns true if we hold the given instance
 boolean hasBean(java.lang.String name)
          Iterate all beans associated to this context
 boolean isPersistence()
          returns true if this conversation hold the persistence manager (aka EntityManager)
 void putBean(javax.faces.context.FacesContext context, java.lang.String name, java.lang.Object value)
          Add the given valueBinding to the context map.
 java.lang.Object removeBean(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Conversation

protected Conversation(java.lang.String name,
                       boolean persistence)
Method Detail

putBean

public void putBean(javax.faces.context.FacesContext context,
                    java.lang.String name,
                    java.lang.Object value)
Add the given valueBinding to the context map.
This will also resolve the value of the binding.


getName

public java.lang.String getName()
the conversation name


endConversation

public void endConversation(boolean regularEnd)
end this conversation


hasBean

public boolean hasBean(java.lang.String name)
Iterate all beans associated to this context

Returns:
Iterator of Map.Entry elements public Iterator iterateBeanEntries() { return beans.entrySet().iterator(); }

getBean

public java.lang.Object getBean(java.lang.String name)

removeBean

public java.lang.Object removeBean(java.lang.String name)

isPersistence

public boolean isPersistence()
returns true if this conversation hold the persistence manager (aka EntityManager)


getPersistenceManager

public PersistenceManager getPersistenceManager()

hasBean

public boolean hasBean(java.lang.Object instance)
returns true if we hold the given instance



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