incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1359408 - in /incubator/isis/trunk/framework: core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/memento/ runtimes/dflt/runtime/src/main/java/org/a...
Date Mon, 09 Jul 2012 21:21:14 GMT
Author: danhaywood
Date: Mon Jul  9 21:21:14 2012
New Revision: 1359408

URL: http://svn.apache.org/viewvc?rev=1359408&view=rev
Log:
ISIS-14: ResolveState simplifications

PojoAdapter.canTransitionTo(ResolveState) only ever called for Resolving, so renamed and removed
parameter; changed Memento to set state to Resolving rather than Updating, no adverse effects,
on the way to (hopefully) merging these two states.

Modified:
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ResolveState.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/memento/Memento.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/adapterfactory/pojo/PojoAdapter.java

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ResolveState.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ResolveState.java?rev=1359408&r1=1359407&r2=1359408&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ResolveState.java
(original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ResolveState.java
Mon Jul  9 21:21:14 2012
@@ -202,11 +202,11 @@ public final class ResolveState {
      * As per {@link #isValidToChangeTo(ResolveState)}, but will additionally
      * return <tt>false</tt> if the current state can never be transitioned from.
      */
-    public boolean canTransitionTo(final ResolveState newState) {
+    public boolean canTransitionToResolving() {
         if (this.transitionFrom != CAN_TRANSITION_FROM) {
             return false;
         } 
-        return isValidToChangeTo(newState);
+        return isValidToChangeTo(ResolveState.RESOLVING);
     }
 
     /**

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/memento/Memento.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/memento/Memento.java?rev=1359408&r1=1359407&r2=1359408&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/memento/Memento.java
(original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/memento/Memento.java
Mon Jul  9 21:21:14 2012
@@ -197,7 +197,9 @@ public class Memento implements Serializ
             targetState = ResolveState.TRANSIENT;
         } else {
             adapter = getHydrator().recreateAdapter(spec, getOid());
-            targetState = ResolveState.UPDATING;
+            // was previously UPDATING; however all tests when set to RESOLVING,
+            // and working towards combining these two states.
+            targetState = ResolveState.RESOLVING;
         }
         
         if (adapter.getSpecification().isParentedOrFreeCollection()) {

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/adapterfactory/pojo/PojoAdapter.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/adapterfactory/pojo/PojoAdapter.java?rev=1359408&r1=1359407&r2=1359408&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/adapterfactory/pojo/PojoAdapter.java
(original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/adapterfactory/pojo/PojoAdapter.java
Mon Jul  9 21:21:14 2012
@@ -225,7 +225,7 @@ public class PojoAdapter extends Instanc
 
     @Override
     public boolean canTransitionToResolving() {
-        return getResolveState().canTransitionTo(ResolveState.RESOLVING);
+        return getResolveState().canTransitionToResolving();
     }
 
 



Mime
View raw message