org.apache.myfaces.orchestra.conversation
Class FlashScopeManager

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

public final class FlashScopeManager
extends java.lang.Object

Manager to deal with page scoped beans.

Instances of this type are expected to be request-scoped, ie a new instance is used for each request. The FlashScopeManagerConfiguration object that it references can be of application scope.


Constructor Summary
FlashScopeManager()
           
 
Method Summary
 void addConversationAccess(java.lang.String conversationName)
          Add a conversation to the list of accessed conversations.
 FlashScopeManagerConfiguration getFlashScopeManagerConfiguration()
           
static FlashScopeManager getInstance()
           
 boolean isConversationAccessed(java.lang.String name)
           
 boolean isIgnoreRequest()
           
 void setFlashScopeManagerConfiguration(FlashScopeManagerConfiguration flashScopeManagerConfiguration)
           
 void setIgnoreRequest()
          Suppress flash scope for the current request, ie do not terminate conversations that are not accessed by this request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlashScopeManager

public FlashScopeManager()
Method Detail

getInstance

public static FlashScopeManager getInstance()

getFlashScopeManagerConfiguration

public FlashScopeManagerConfiguration getFlashScopeManagerConfiguration()

setFlashScopeManagerConfiguration

public void setFlashScopeManagerConfiguration(FlashScopeManagerConfiguration flashScopeManagerConfiguration)

addConversationAccess

public final void addConversationAccess(java.lang.String conversationName)
Add a conversation to the list of accessed conversations.

Notice: this method is final for performance reasons.

This method is expected to be called via AOP proxies wrapped around each conversation-scoped bean; any invocation of a method on such a bean causes the conversation associated with that bean to be added to the accessed list here.


isIgnoreRequest

public boolean isIgnoreRequest()

setIgnoreRequest

public void setIgnoreRequest()
Suppress flash scope for the current request, ie do not terminate conversations that are not accessed by this request.

This can come in useful occasionally, particularly when handling AJAX requests which only access some of the beans associated with the current view.


isConversationAccessed

public boolean isConversationAccessed(java.lang.String name)


Copyright 2007 The Apache Software Foundation. All Rights Reserved.