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/20 13:18:37 UTC

svn commit: r706235 - /myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/

Author: skitching
Date: Mon Oct 20 04:18:36 2008
New Revision: 706235

URL: http://svn.apache.org/viewvc?rev=706235&view=rev
Log:
Make all classes Serializable. Make class members private. Remove unused "modifies" property (replaced by ClearOnCommit component).

Modified:
    myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowAccept.java
    myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowCall.java
    myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowConfig.java
    myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowOnCommit.java
    myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowParamAccept.java
    myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowParamSend.java
    myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowReturnAccept.java
    myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowReturnSend.java

Modified: myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowAccept.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowAccept.java?rev=706235&r1=706234&r2=706235&view=diff
==============================================================================
--- myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowAccept.java (original)
+++ myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowAccept.java Mon Oct 20 04:18:36 2008
@@ -18,6 +18,7 @@
  */
 package org.apache.myfaces.orchestra.flow.config;
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -32,8 +33,12 @@
 /**
  * Contains static metadata information about a callable flow.
  */
-public class FlowAccept
+public class FlowAccept implements Serializable
 {
+    // For serialization. IMPORTANT; update this when changing the
+    // binary format of this class (eg adding fields).
+    private static final long serialVersionUID = 1L;
+
     private String service;
     private String commitWhen = "commit";
     private String cancelWhen = "cancel";

Modified: myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowCall.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowCall.java?rev=706235&r1=706234&r2=706235&view=diff
==============================================================================
--- myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowCall.java (original)
+++ myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowCall.java Mon Oct 20 04:18:36 2008
@@ -18,6 +18,7 @@
  */
 package org.apache.myfaces.orchestra.flow.config;
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -32,17 +33,20 @@
 /**
  * Contains static metadata information about a possible call to a flow.
  */
-public class FlowCall
+public class FlowCall implements Serializable
 {
-    String outcome;
+    // For serialization. IMPORTANT; update this when changing the
+    // binary format of this class (eg adding fields).
+    private static final long serialVersionUID = 1L;
 
-    String service;
-    List params = new ArrayList(4);  // list of FlowParamSend
-    List returns = new ArrayList(4); // list of FlowReturnAccept
+    private String outcome;
+
+    private String service;
+    private List params = new ArrayList(4);  // list of FlowParamSend
+    private List returns = new ArrayList(4); // list of FlowReturnAccept
+
+    private FlowOnCommit onCommit;
 
-    FlowOnCommit onCommit;
-    List modifies = new ArrayList(4);
-    
     /**
      * Constructor.
      */
@@ -235,37 +239,6 @@
     }
 
     /**
-     * Return a list of ids for input components whose submitted values need
-     * to be cleared before re-rendering after the called flow has committed.
-     * <p>
-     * When a flow returns, the original view is restored, including any
-     * submittedValue settings in input components. This is needed so that
-     * user-entered data is not lost when a flow is invoked. 
-     * <p>
-     * When the data modified by a called flow is displayed only in read-only
-     * fields of the calling page, then simply re-rendering the calling view
-     * after flow return will show that new data. But when the called flow
-     * has affected something in an input component, then we *want* to
-     * discard the submittedValue entered by the user so that the new
-     * backing bean state is rendered (and user-entered data for those
-     * fields is effectively overwritten).
-     * <p>
-     * The ids in this list are therefore used to look up input components
-     * in the restored view and blank out their submitted values before
-     * re-rendering. 
-     */
-    public List getModifies()
-    {
-        return modifies;
-    }
-
-    /** For use only during object initialization. */
-    public void setModifies(List modifies)
-    {
-        this.modifies = modifies;
-    }
-    
-    /**
      * Custom string format to improve log messages.
      */
     public String toString()

Modified: myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowConfig.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowConfig.java?rev=706235&r1=706234&r2=706235&view=diff
==============================================================================
--- myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowConfig.java (original)
+++ myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowConfig.java Mon Oct 20 04:18:36 2008
@@ -18,6 +18,7 @@
  */
 package org.apache.myfaces.orchestra.flow.config;
 
+import java.io.Serializable;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
@@ -29,8 +30,12 @@
  * including information about whether it can be called, and
  * about which flows (if any) it can call.
  */
-public class FlowConfig
+public class FlowConfig implements Serializable
 {
+    // For serialization. IMPORTANT; update this when changing the
+    // binary format of this class (eg adding fields).
+    private static final long serialVersionUID = 1L;
+
     // key is outcome, value is FlowCall
     private Map flowCalls = new HashMap();
     

Modified: myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowOnCommit.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowOnCommit.java?rev=706235&r1=706234&r2=706235&view=diff
==============================================================================
--- myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowOnCommit.java (original)
+++ myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowOnCommit.java Mon Oct 20 04:18:36 2008
@@ -18,6 +18,8 @@
  */
 package org.apache.myfaces.orchestra.flow.config;
 
+import java.io.Serializable;
+
 import javax.faces.context.FacesContext;
 import javax.faces.el.MethodBinding;
 
@@ -39,9 +41,13 @@
  * values returned from the flow are available, the navigation can be dynamic
  * depending upon those return values.
  */
-public class FlowOnCommit
+public class FlowOnCommit implements Serializable
 {
-    String action;
+    // For serialization. IMPORTANT; update this when changing the
+    // binary format of this class (eg adding fields).
+    private static final long serialVersionUID = 1L;
+
+    private String action;
     
     /** Constructor. */
     public FlowOnCommit()

Modified: myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowParamAccept.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowParamAccept.java?rev=706235&r1=706234&r2=706235&view=diff
==============================================================================
--- myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowParamAccept.java (original)
+++ myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowParamAccept.java Mon Oct 20 04:18:36 2008
@@ -18,17 +18,23 @@
  */
 package org.apache.myfaces.orchestra.flow.config;
 
+import java.io.Serializable;
+
 import org.apache.myfaces.orchestra.lib.OrchestraException;
 
 /**
  * Defines how a parameter value provided by a flow caller is imported
  * into the called flow's environment.
  */
-public class FlowParamAccept
+public class FlowParamAccept implements Serializable
 {
-    String name;
-    String dst;
-    String dflt;
+    // For serialization. IMPORTANT; update this when changing the
+    // binary format of this class (eg adding fields).
+    private static final long serialVersionUID = 1L;
+
+    private String name;
+    private String dst;
+    private String dflt;
 
     /** Constructor. */
     public FlowParamAccept()

Modified: myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowParamSend.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowParamSend.java?rev=706235&r1=706234&r2=706235&view=diff
==============================================================================
--- myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowParamSend.java (original)
+++ myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowParamSend.java Mon Oct 20 04:18:36 2008
@@ -18,16 +18,22 @@
  */
 package org.apache.myfaces.orchestra.flow.config;
 
+import java.io.Serializable;
+
 import org.apache.myfaces.orchestra.lib.OrchestraException;
 
 /**
  * Defines an "exported" parameter, from the point of view of the
  * flow caller.
  */
-public class FlowParamSend
+public class FlowParamSend implements Serializable
 {
-    String name;
-    String src;
+    // For serialization. IMPORTANT; update this when changing the
+    // binary format of this class (eg adding fields).
+    private static final long serialVersionUID = 1L;
+
+    private String name;
+    private String src;
     
     /** Constructor. */
     public FlowParamSend()

Modified: myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowReturnAccept.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowReturnAccept.java?rev=706235&r1=706234&r2=706235&view=diff
==============================================================================
--- myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowReturnAccept.java (original)
+++ myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowReturnAccept.java Mon Oct 20 04:18:36 2008
@@ -18,15 +18,21 @@
  */
 package org.apache.myfaces.orchestra.flow.config;
 
+import java.io.Serializable;
+
 import org.apache.myfaces.orchestra.lib.OrchestraException;
 
 /**
  * Defines how a return value from a flow is imported into the caller's environment.
  */
-public class FlowReturnAccept
+public class FlowReturnAccept implements Serializable
 {
-    String name;
-    String dst;
+    // For serialization. IMPORTANT; update this when changing the
+    // binary format of this class (eg adding fields).
+    private static final long serialVersionUID = 1L;
+
+    private String name;
+    private String dst;
     
     /** Constructor. */
     public FlowReturnAccept()

Modified: myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowReturnSend.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowReturnSend.java?rev=706235&r1=706234&r2=706235&view=diff
==============================================================================
--- myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowReturnSend.java (original)
+++ myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowReturnSend.java Mon Oct 20 04:18:36 2008
@@ -18,16 +18,22 @@
  */
 package org.apache.myfaces.orchestra.flow.config;
 
+import java.io.Serializable;
+
 import org.apache.myfaces.orchestra.lib.OrchestraException;
 
 /**
  * Defines an "exported" return value, from the point of view of the
  * called flow.
  */
-public class FlowReturnSend
+public class FlowReturnSend implements Serializable
 {
-    String name;
-    String src;
+    // For serialization. IMPORTANT; update this when changing the
+    // binary format of this class (eg adding fields).
+    private static final long serialVersionUID = 1L;
+
+    private String name;
+    private String src;
     
     /** Constructor. */
     public FlowReturnSend()