You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sk...@apache.org on 2008/01/29 11:32:08 UTC

svn commit: r616240 - in /myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation: ./ jsf/ spring/

Author: skitching
Date: Tue Jan 29 02:32:06 2008
New Revision: 616240

URL: http://svn.apache.org/viewvc?rev=616240&view=rev
Log:
Minor additional tidyups for flash->access

Modified:
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/AccessScopeManager.java
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/Conversation.java
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationAccessLifetimeAspect.java
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationAspects.java
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/AccessScopePhaseListener.java
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/AbstractSpringOrchestraScope.java
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringConversationScope.java

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/AccessScopeManager.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/AccessScopeManager.java?rev=616240&r1=616239&r2=616240&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/AccessScopeManager.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/AccessScopeManager.java Tue Jan 29 02:32:06 2008
@@ -27,7 +27,7 @@
  * Manager to deal with page scoped beans.
  * <p>
  * Instances of this type are expected to be request-scoped, ie a new instance is used for
- * each request. The AccessedScopeManagerConfiguration object that it references can be
+ * each request. The AccessScopeManagerConfiguration object that it references can be
  * of application scope.
  * 
  * @since 1.1
@@ -68,7 +68,7 @@
 		return manager;
 	}
 
-	public AccessScopeManagerConfiguration getAccessedScopeManagerConfiguration()
+	public AccessScopeManagerConfiguration getAccessScopeManagerConfiguration()
 	{
 		return accessScopeManagerConfiguration;
 	}
@@ -103,7 +103,7 @@
 	}
 
 	/**
-	 * Suppress accessed scope for the current request, ie do not terminate conversations that are
+	 * Suppress access scope for the current request, ie do not terminate conversations that are
 	 * not accessed by this request.
 	 * <p>
 	 * This can come in useful occasionally, particularly when handling AJAX requests which

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/Conversation.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/Conversation.java?rev=616240&r1=616239&r2=616240&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/Conversation.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/Conversation.java Tue Jan 29 02:32:06 2008
@@ -43,9 +43,9 @@
  * <p>Conversation instances are typically created when an EL expression references a
  * bean whose definition indicates that it is in a conversation scope.</p>
  * 
- * <p>Conversation instances are typically destroyed:
+ * <p>A conversation instance is typically destroyed:
  * <ul>
- * <li>At the end of a request when they are marked as a "flash" conversation but
+ * <li>At the end of a request when it are marked as access-scoped but
  * no bean in the conversation scope was accessed during the just-completed request.</li>
  * <li>Via an ox:endConversation component</li>
  * <li>Via an action method calling Conversation.invalidate()</li>
@@ -195,7 +195,7 @@
 	 * Return the factory that created this conversation.
 	 * <p>
 	 * Note that this factory will have set the initial aspects of this factory, which
-	 * configure such things as the lifetime (flash, manual, etc) and conversation
+	 * configure such things as the lifetime (access, manual, etc) and conversation
 	 * timeout properties.
 	 */
 	public ConversationFactory getFactory()

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationAccessLifetimeAspect.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationAccessLifetimeAspect.java?rev=616240&r1=616239&r2=616240&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationAccessLifetimeAspect.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationAccessLifetimeAspect.java Tue Jan 29 02:32:06 2008
@@ -19,7 +19,7 @@
 package org.apache.myfaces.orchestra.conversation;
 
 /**
- * Connect the conversation to the FlashScopeManager
+ * Connect the conversation to the AccessScopeManager
  * 
  * @since 1.1
  */

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationAspects.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationAspects.java?rev=616240&r1=616239&r2=616240&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationAspects.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationAspects.java Tue Jan 29 02:32:06 2008
@@ -40,7 +40,7 @@
  * Examples of aspects that can be attached to a conversation are:
  * <ul>
  *     <li>Timeout handling</li>
- *     <li>Flash Scope handling</li>
+ *     <li>Access-scope handling</li>
  * </ul>
  */
 public class ConversationAspects

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/AccessScopePhaseListener.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/AccessScopePhaseListener.java?rev=616240&r1=616239&r2=616240&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/AccessScopePhaseListener.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/AccessScopePhaseListener.java Tue Jan 29 02:32:06 2008
@@ -32,9 +32,9 @@
 import org.apache.myfaces.orchestra.conversation.ConversationManager;
 
 /**
- * Handle Flash conversations.
+ * Handle access-scoped conversations.
  * <p>
- * At the end of request processing, delete any flash-scope conversations for which no
+ * At the end of request processing, delete any access-scope conversations for which no
  * bean in that scope has been accessed during the request.
  * 
  * @since 1.1
@@ -56,23 +56,23 @@
 	}
 
 	/**
-	 * Invalidates any conversation with aspect {@link ConversationFlashLifetimeAspect}
+	 * Invalidates any conversation with aspect {@link ConversationAccessLifetimeAspect}
 	 * which has not been accessed during a http request
 	 */
 	protected void invalidateAccessScopedConversations(String viewId)
 	{
-		AccessScopeManager accessedManager = AccessScopeManager.getInstance();
-		if (accessedManager.isIgnoreRequest())
+		AccessScopeManager accessManager = AccessScopeManager.getInstance();
+		if (accessManager.isIgnoreRequest())
 		{
 			return;
 		}
 
-		if (accessedManager.getAccessedScopeManagerConfiguration() != null)
+		if (accessManager.getAccessScopeManagerConfiguration() != null)
 		{
-			Set ignoredViewIds = accessedManager.getAccessedScopeManagerConfiguration().getIgnoreViewIds();
+			Set ignoredViewIds = accessManager.getAccessScopeManagerConfiguration().getIgnoreViewIds();
 			if (ignoredViewIds != null && ignoredViewIds.contains(viewId))
 			{
-				// The flash configuration has explicitly stated that no conversations should be
+				// The scope configuration has explicitly stated that no conversations should be
 				// terminated when processing this specific view, so just return.
 				// 
 				// Special "ignored views" are useful when dealing with things like nested
@@ -93,9 +93,9 @@
 		{
 			Conversation conversation = (Conversation) iterConversations.next();
 			
-			// This conversation has "flash" scope if it has an attached Aspect
-			// of type ConversationFlashLifetimeAspect. All other conversations
-			// are not flash-scoped and should be ignored here.
+			// This conversation has "access" scope if it has an attached Aspect
+			// of type ConversationAccessLifetimeAspect. All other conversations
+			// are not access-scoped and should be ignored here.
 			ConversationAccessLifetimeAspect aspect =
 				(ConversationAccessLifetimeAspect)
 					conversation.getAspect(ConversationAccessLifetimeAspect.class);

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/AbstractSpringOrchestraScope.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/AbstractSpringOrchestraScope.java?rev=616240&r1=616239&r2=616240&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/AbstractSpringOrchestraScope.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/AbstractSpringOrchestraScope.java Tue Jan 29 02:32:06 2008
@@ -373,9 +373,9 @@
         //
         // This handles the case where two different beans declare themselves
         // as belonging to the same named conversation but with different scope
-        // objects. Allowing that would be nasty as the conversation
-        // properties (eg flash or manual) would depend upon which bean
-        // got created first; some other ConversationFactory would have
+        // objects. Allowing that would be nasty, as the conversation
+        // properties (eg lifetime of access or manual) would depend upon which
+        // bean got created first; some other ConversationFactory would have
         // created the conversation using its configured properties then
         // we are now adding to that conversation a bean that really wants
         // the conversation properties defined on this ConversationFactory.

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringConversationScope.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringConversationScope.java?rev=616240&r1=616239&r2=616240&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringConversationScope.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringConversationScope.java Tue Jan 29 02:32:06 2008
@@ -63,7 +63,7 @@
  * The following properties can be defined on a scope and then apply to any conversation that is created
  * to hold a bean of this scope:
  * <ul>
- * <li>lifetime: may be "manual" or "flash". If not specified, then defaults to "manual".</li>
+ * <li>lifetime: may be "manual" or "access". If not specified, then defaults to "manual".</li>
  * <li>timeout: a time period (in minutes) after which inactive conversations are terminated.
  * If not specified, then inactive conversations are never automatically terminated.</li>
  * </ul>
@@ -112,9 +112,12 @@
 	}
 
 	/**
-	 * Must be one of "manual", "access" or "flash".
+	 * Must be one of "manual" or "access".
 	 * <p>
 	 * Defaults to "manual".
+	 * <p>
+	 * Note that "flash" is also supported as an alias for "access", for
+	 * reasons of backwards compatibility with release 1.0.
 	 */
 	public void setLifetime(String lifetime)
 	{
@@ -179,7 +182,7 @@
 	/**
 	 * Mark the specified conversation as having been accessed.
 	 * <p>
-	 * This affects conversation timeouts, and the removal of flash conversations.
+	 * This affects conversation timeouts, and the removal of access-scoped conversations.
 	 */
 	protected void notifyAccessConversation(Conversation conversation)
 	{