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/10/07 15:58:09 UTC
svn commit: r702485 - in
/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation:
./ spring/
Author: skitching
Date: Tue Oct 7 06:58:09 2008
New Revision: 702485
URL: http://svn.apache.org/viewvc?rev=702485&view=rev
Log:
Rename recently-added class BeanBinder to ConversationBinder for clarity. The point is that it can bind *arbitrary* instances that are not DI-configured beans...
Added:
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationBinder.java (contents, props changed)
- copied, changed from r702480, myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/BeanBinder.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringConversationBinder.java (contents, props changed)
- copied, changed from r702480, myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringBeanBinder.java
Removed:
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/BeanBinder.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringBeanBinder.java
Modified:
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/spring/SpringConversationScope.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringSingleConversationScope.java
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=702485&r1=702484&r2=702485&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 Oct 7 06:58:09 2008
@@ -74,10 +74,10 @@
// when restarting the conversation.
private final ConversationContext conversationContext;
- // The object that can bind arbitrary beans to this conversation so that all calls to
- // methods on the target bean cause this conversation to become the active conversation,
+ // An object that can bind arbitrary objects to this conversation so that all calls to
+ // methods on the target object cause this conversation to become the active conversation,
// and for any other optional "entry actions" (Advices) to be applied.
- private BeanBinder beanBinder;
+ private ConversationBinder binder;
// The set of managed beans that are associated with this conversation.
private Map beans = new TreeMap();
@@ -113,14 +113,14 @@
}
/**
- * Define the (optional) beanBinder used by this instance in method bind(Object).
+ * Define the (optional) binder used by this instance in method bind(Object).
* <p>
* Expected to be called by code that creates instances of this type immediately
* after the constructor is invoked. See bind(Object) for more details.
*/
- public void setBeanBinder(BeanBinder beanBinder)
+ public void setBinder(ConversationBinder binder)
{
- this.beanBinder = beanBinder;
+ this.binder = binder;
}
/**
@@ -546,10 +546,10 @@
*/
public Object bind(Object instance)
{
- if (beanBinder == null)
+ if (binder == null)
{
throw new UnsupportedOperationException("No beanBinder instance");
}
- return beanBinder.bind(instance);
+ return binder.bind(instance);
}
}
Copied: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationBinder.java (from r702480, myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/BeanBinder.java)
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationBinder.java?p2=myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationBinder.java&p1=myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/BeanBinder.java&r1=702480&r2=702485&rev=702485&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/BeanBinder.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationBinder.java Tue Oct 7 06:58:09 2008
@@ -20,12 +20,12 @@
package org.apache.myfaces.orchestra.conversation;
/**
- * An object that is able to bind beans to a specific conversation.
+ * An object that is able to bind an arbitrary object to a specific conversation.
* <p>
* Only code that extends Orchestra to support new dependency-injection frameworks should need
* to implement this interface.
*/
-public interface BeanBinder
+public interface ConversationBinder
{
/**
* Return a proxy object that "binds" the specified instance to a specific conversation.
Propchange: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationBinder.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationBinder.java
------------------------------------------------------------------------------
svn:executable = *
Propchange: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationBinder.java
------------------------------------------------------------------------------
svn:mergeinfo =
Copied: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringConversationBinder.java (from r702480, myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringBeanBinder.java)
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringConversationBinder.java?p2=myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringConversationBinder.java&p1=myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringBeanBinder.java&r1=702480&r2=702485&rev=702485&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringBeanBinder.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringConversationBinder.java Tue Oct 7 06:58:09 2008
@@ -19,19 +19,19 @@
package org.apache.myfaces.orchestra.conversation.spring;
-import org.apache.myfaces.orchestra.conversation.BeanBinder;
+import org.apache.myfaces.orchestra.conversation.ConversationBinder;
import org.apache.myfaces.orchestra.conversation.Conversation;
/**
* Adapter class that forwards calls to the createProxyFor method of the specified
* AbstractSpringOrchestraScope instance.
*/
-class SpringBeanBinder implements BeanBinder
+class SpringConversationBinder implements ConversationBinder
{
AbstractSpringOrchestraScope scope;
Conversation c;
- public SpringBeanBinder(AbstractSpringOrchestraScope scope, Conversation c)
+ public SpringConversationBinder(AbstractSpringOrchestraScope scope, Conversation c)
{
this.scope = scope;
this.c = c;
Propchange: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringConversationBinder.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringConversationBinder.java
------------------------------------------------------------------------------
svn:executable = *
Propchange: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringConversationBinder.java
------------------------------------------------------------------------------
svn:mergeinfo =
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=702485&r1=702484&r2=702485&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 Oct 7 06:58:09 2008
@@ -148,7 +148,7 @@
public Conversation createConversation(ConversationContext context, String name)
{
Conversation conversation = new Conversation(context, name, this);
- conversation.setBeanBinder(new SpringBeanBinder(this, conversation));
+ conversation.setBinder(new SpringConversationBinder(this, conversation));
// invoke child scope classes so they can add any aspects they desire.
initAspects(conversation);
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringSingleConversationScope.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringSingleConversationScope.java?rev=702485&r1=702484&r2=702485&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringSingleConversationScope.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/SpringSingleConversationScope.java Tue Oct 7 06:58:09 2008
@@ -45,7 +45,7 @@
public Conversation createConversation(ConversationContext context, String name)
{
Conversation conversation = new Conversation(context, name, this);
- conversation.setBeanBinder(new SpringBeanBinder(this, conversation));
+ conversation.setBinder(new SpringConversationBinder(this, conversation));
return conversation;
}
}