|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.custom.conversation.ConversationManager
public class ConversationManager
The manager will deal with the various contexts in the current session. A new context will be created if the current window has none associated.
Field Summary | |
---|---|
static java.lang.String |
CONVERSATION_CONTEXT_PARAM
|
Constructor Summary | |
---|---|
protected |
ConversationManager()
|
Method Summary | |
---|---|
protected void |
attachPersistence()
|
protected void |
checkContextTimeout()
|
protected void |
createBeanElevator()
Create the BeanElevator used to find a bean within the different contexts and elevate it into the conversation scope. You can configure it in your web.xml using the init parameter named org.apache.myfaces.conversation.BEAN_ELEVATOR |
protected static ConversationManager |
createConversationManager()
|
protected void |
createMessager()
Create the Messager used to inform the user about anomalies. The factory can be configured in your web.xml using the init parameter named org.apache.myfaces.conversation.MESSAGER |
protected PersistenceManager |
createPersistenceManager()
create a persistence manager |
protected void |
destroyConversationContext(java.lang.Long conversationContextId)
Destroy the given conversation context |
protected void |
detachPersistence()
|
void |
endConversation(java.lang.String name,
boolean regularEnd)
End a conversation |
Conversation |
findConversation(java.lang.Object instance)
Find the conversation which holds the given instance |
Conversation |
getConversation(java.lang.String name)
Get the conversation with the given name |
ConversationBeanElevator |
getConversationBeanElevator()
the bean elevator used to get beans int the conversation scope |
protected ConversationContext |
getConversationContext()
Get the current conversation context. |
protected ConversationContext |
getConversationContext(java.lang.Long conversationContextId)
Get the conversation context for the given id |
protected java.lang.Long |
getConversationContextId()
Get the current, or create a new unique conversationContextId. The current conversationContextId will retrieved from the request parameters, if we cant find it there a new one will be created. |
static ConversationManager |
getInstance()
Get the conversation manager |
static ConversationManager |
getInstance(javax.faces.context.FacesContext context)
Get the conversation manager |
static ConversationManager |
getInstance(javax.servlet.http.HttpSession session)
Get the conversation manager from the http session. |
protected ConversationMessager |
getMessager()
Get the Messager used to inform the user about anomalies. The factory can be configured in your web.xml using the init parameter named org.apache.myfaces.conversation.MESSAGER |
protected ConversationContext |
getOrCreateConversationContext(java.lang.Long conversationContextId)
Get the conversation context for the given id. |
PersistenceManager |
getPersistenceManager()
get the persistence manager responsible for the current conversation |
protected PersistenceManagerFactory |
getPersistenceManagerFactory()
Get the persistenceManagerFactory. The factory can be configured in your web.xml using the init parameter named org.apache.myfaces.conversation.PERSISTENCE_MANAGER_FACTORY |
boolean |
hasConversation(java.lang.String name)
check if the given conversation is active |
boolean |
hasConversationContext()
check if we have a conversation context |
protected void |
purgePersistence()
|
void |
startConversation(java.lang.String name,
boolean persistence)
Start a conversation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CONVERSATION_CONTEXT_PARAM
Constructor Detail |
---|
protected ConversationManager()
Method Detail |
---|
public static ConversationManager getInstance()
public static ConversationManager getInstance(javax.faces.context.FacesContext context)
protected static ConversationManager createConversationManager()
public static ConversationManager getInstance(javax.servlet.http.HttpSession session)
protected java.lang.Long getConversationContextId()
protected ConversationContext getConversationContext(java.lang.Long conversationContextId)
protected ConversationContext getOrCreateConversationContext(java.lang.Long conversationContextId)
protected void destroyConversationContext(java.lang.Long conversationContextId)
public void startConversation(java.lang.String name, boolean persistence)
ConversationContext.startConversation(String, boolean)
public void endConversation(java.lang.String name, boolean regularEnd)
ConversationContext.endConversation(String, boolean)
public Conversation getConversation(java.lang.String name)
public Conversation findConversation(java.lang.Object instance)
public boolean hasConversation(java.lang.String name)
protected ConversationContext getConversationContext()
public boolean hasConversationContext()
public PersistenceManager getPersistenceManager()
protected PersistenceManager createPersistenceManager()
protected ConversationMessager getMessager()
org.apache.myfaces.conversation.MESSAGER
protected void createMessager()
org.apache.myfaces.conversation.MESSAGER
protected void createBeanElevator()
org.apache.myfaces.conversation.BEAN_ELEVATOR
protected PersistenceManagerFactory getPersistenceManagerFactory()
org.apache.myfaces.conversation.PERSISTENCE_MANAGER_FACTORY
protected void attachPersistence()
protected void detachPersistence()
protected void purgePersistence()
protected void checkContextTimeout()
public ConversationBeanElevator getConversationBeanElevator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |