You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by at...@apache.org on 2014/03/19 02:22:13 UTC

svn commit: r1579109 - /commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/Step.java

Author: ate
Date: Wed Mar 19 01:22:12 2014
New Revision: 1579109

URL: http://svn.apache.org/r1579109
Log:
SCXML-196: add default entry list to Step to track which targets will be entered by default this micro step

Modified:
    commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/Step.java

Modified: commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/Step.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/Step.java?rev=1579109&r1=1579108&r2=1579109&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/Step.java (original)
+++ commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/Step.java Wed Mar 19 01:22:12 2014
@@ -30,40 +30,6 @@ import org.apache.commons.scxml2.model.T
 public class Step {
 
     /**
-     * Constructor.
-      */
-    public Step() {
-        this.externalEvents = new ArrayList<TriggerEvent>();
-        this.beforeStatus = new Status();
-        this.afterStatus = new Status();
-        this.exitList = new ArrayList<TransitionTarget>();
-        this.entryList = new ArrayList<TransitionTarget>();
-        this.transitList = new ArrayList<Transition>();
-    }
-
-    /**
-     * @param externalEvents The external events received in this
-     *     unit of progression
-     * @param beforeStatus The before status
-     */
-    public Step(final Collection<TriggerEvent> externalEvents, final Status beforeStatus) {
-        if (externalEvents != null) {
-            this.externalEvents = externalEvents;
-        } else {
-            this.externalEvents = new ArrayList<TriggerEvent>();
-        }
-        if (beforeStatus != null) {
-            this.beforeStatus = beforeStatus;
-        } else {
-            this.beforeStatus = new Status();
-        }
-        this.afterStatus = new Status();
-        this.exitList = new ArrayList<TransitionTarget>();
-        this.entryList = new ArrayList<TransitionTarget>();
-        this.transitList = new ArrayList<Transition>();
-    }
-
-    /**
      * The external events in this step.
      */
     private Collection<TriggerEvent> externalEvents;
@@ -89,11 +55,45 @@ public class Step {
     private List<TransitionTarget> entryList;
 
     /**
+     * The list of TransitionTargets that were entered during this step by default
+     */
+    private List<TransitionTarget> defaultEntryList;
+    /**
      * The list of Transitions taken during this step.
      */
     private List<Transition> transitList;
 
     /**
+     * Constructor.
+      */
+    public Step() {
+        this(null, null);
+    }
+
+    /**
+     * @param externalEvents The external events received in this
+     *     unit of progression
+     * @param beforeStatus The before status
+     */
+    public Step(final Collection<TriggerEvent> externalEvents, final Status beforeStatus) {
+        if (externalEvents != null) {
+            this.externalEvents = externalEvents;
+        } else {
+            this.externalEvents = new ArrayList<TriggerEvent>();
+        }
+        if (beforeStatus != null) {
+            this.beforeStatus = beforeStatus;
+        } else {
+            this.beforeStatus = new Status();
+        }
+        this.afterStatus = new Status();
+        this.exitList = new ArrayList<TransitionTarget>();
+        this.entryList = new ArrayList<TransitionTarget>();
+        this.defaultEntryList = new ArrayList<TransitionTarget>();
+        this.transitList = new ArrayList<Transition>();
+    }
+
+    /**
      * @return Returns the afterStatus.
      */
     public Status getAfterStatus() {
@@ -129,6 +129,13 @@ public class Step {
     }
 
     /**
+     * @return Returns the defaultEntryList.
+     */
+    public List<TransitionTarget> getDefaultEntryList() {
+        return defaultEntryList;
+    }
+
+    /**
      * @return Returns the exitList.
      */
     public List<TransitionTarget> getExitList() {