incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1359393 [3/3] - in /incubator/isis/trunk/framework: core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/ core/metamodel/src/main/java/org/apache/isis/core/...
Date Mon, 09 Jul 2012 21:05:19 GMT
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/service/ServiceObject.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/service/ServiceObject.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/service/ServiceObject.java
(original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/service/ServiceObject.java
Mon Jul  9 21:05:16 2012
@@ -108,7 +108,7 @@ public class ServiceObject extends Abstr
 
     @Override
     public boolean isTransient() {
-        return adapter != null && adapter.isTransient();
+        return adapter != null && adapter.representsTransient();
     }
 
     public void setObject(final ObjectAdapter object) {

Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedCollectionNodeSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedCollectionNodeSpecification.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedCollectionNodeSpecification.java
(original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedCollectionNodeSpecification.java
Mon Jul  9 21:05:16 2012
@@ -44,7 +44,7 @@ public class ClosedCollectionNodeSpecifi
     @Override
     public int canOpen(final Content content) {
         final ObjectAdapter collection = ((CollectionContent) content).getCollection();
-        if (collection.getResolveState().isGhost()) {
+        if (collection.isGhost()) {
             return UNKNOWN;
         } else {
             final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(collection);

Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeNodeBorder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeNodeBorder.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeNodeBorder.java
(original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeNodeBorder.java
Mon Jul  9 21:05:16 2012
@@ -336,9 +336,8 @@ public class TreeNodeBorder extends Abst
             }
         });
 
-        final ObjectAdapter object = getView().getContent().getAdapter();
-        final ResolveState resolveState = (object).getResolveState();
-        if (object instanceof ObjectAdapter && (resolveState.isGhost() || resolveState.isPartlyResolved()))
{
+        final ObjectAdapter adapter = getView().getContent().getAdapter();
+        if (adapter instanceof ObjectAdapter && (adapter.isGhost() /*|| adapter.getResolveState().isPartlyResolved()
*/)) {
             options.add(new UserActionAbstract("Load object") {
                 @Override
                 public void execute(final Workspace workspace, final View view, final Location
at) {

Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/AbstractObjectOption.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/AbstractObjectOption.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/AbstractObjectOption.java
(original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/AbstractObjectOption.java
Mon Jul  9 21:05:16 2012
@@ -43,7 +43,7 @@ public abstract class AbstractObjectOpti
     @Override
     public Consent disabled(final View view) {
         final ObjectAdapter adapter = view.getContent().getAdapter();
-        if (adapter != null && adapter.getResolveState().isDestroyed()) {
+        if (adapter != null && adapter.isDestroyed()) {
             // TODO: move logic into Facet
             return new Veto("Can't do anything with a destroyed object");
         }

Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/ObjectParameterImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/ObjectParameterImpl.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/ObjectParameterImpl.java
(original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/ObjectParameterImpl.java
Mon Jul  9 21:05:16 2012
@@ -122,7 +122,7 @@ public class ObjectParameterImpl extends
 
     @Override
     public boolean isTransient() {
-        return adapter != null && adapter.isTransient();
+        return adapter != null && adapter.representsTransient();
     }
 
     @Override

Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/OptionFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/OptionFactory.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/OptionFactory.java
(original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/OptionFactory.java
Mon Jul  9 21:05:16 2012
@@ -56,7 +56,7 @@ public class OptionFactory {
             return;
         }
         final Oid oid = adapter.getOid();
-        if (oid != null && adapter.isTransient()) {
+        if (oid != null && adapter.representsTransient()) {
             return;
         }
         if (noSpec.isService()) {

Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/collection/AbstractCollectionContent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/collection/AbstractCollectionContent.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/collection/AbstractCollectionContent.java
(original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/collection/AbstractCollectionContent.java
Mon Jul  9 21:05:16 2012
@@ -132,7 +132,7 @@ public abstract class AbstractCollection
         options.add(new UserActionAbstract("Clear resolved", ActionType.DEBUG) {
             @Override
             public Consent disabled(final View component) {
-                return ConsentAbstract.allowIf(collection == null || collection.getResolveState()
!= ResolveState.TRANSIENT || collection.getResolveState() == ResolveState.GHOST);
+                return ConsentAbstract.allowIf(collection == null || !(collection.isTransient())
|| collection.isGhost());
             }
 
             @Override

Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/collection/CollectionElement.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/collection/CollectionElement.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/collection/CollectionElement.java
(original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/collection/CollectionElement.java
Mon Jul  9 21:05:16 2012
@@ -96,7 +96,7 @@ public class CollectionElement extends A
 
     @Override
     public boolean isTransient() {
-        return adapter.isTransient();
+        return adapter.representsTransient();
     }
 
     @Override

Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/composite/CompositeViewSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/composite/CompositeViewSpecification.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/composite/CompositeViewSpecification.java
(original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/composite/CompositeViewSpecification.java
Mon Jul  9 21:05:16 2012
@@ -62,7 +62,7 @@ public abstract class CompositeViewSpeci
     private void resolveObject(final Content content) {
         if (content instanceof ObjectContent) {
             final ObjectAdapter object = ((ObjectContent) content).getObject();
-            if (object != null && !object.getResolveState().isResolved()) {
+            if (object != null && !object.isResolved()) {
                 IsisContext.getPersistenceSession().resolveImmediately(object);
             }
         }

Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/composite/ObjectFieldBuilder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/composite/ObjectFieldBuilder.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/composite/ObjectFieldBuilder.java
(original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/composite/ObjectFieldBuilder.java
Mon Jul  9 21:05:16 2012
@@ -137,7 +137,7 @@ public class ObjectFieldBuilder extends 
                 // typed in with the actual title.
                 if (!field.getSpecification().isParseable()) {
                     final boolean changedValue = value != existing;
-                    final boolean isDestroyed = existing != null && existing.getResolveState().isDestroyed();
+                    final boolean isDestroyed = existing != null && existing.isDestroyed();
                     if (changedValue || isDestroyed) {
                         View fieldView;
                         fieldView = createFieldView(view, axes, object, i, field);

Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/content/AbstractObjectContent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/content/AbstractObjectContent.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/content/AbstractObjectContent.java
(original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/content/AbstractObjectContent.java
Mon Jul  9 21:05:16 2012
@@ -118,7 +118,7 @@ public abstract class AbstractObjectCont
         @Override
         public Consent disabled(final View view) {
             final ObjectAdapter object = view.getContent().getAdapter();
-            return ConsentAbstract.allowIf(object == null || object.getResolveState() !=
ResolveState.TRANSIENT || object.getResolveState() == ResolveState.GHOST);
+            return ConsentAbstract.allowIf(object == null || !object.isTransient() || object.isGhost());
         }
 
         @Override
@@ -155,7 +155,7 @@ public abstract class AbstractObjectCont
     }
 
     private Consent setFieldOfMatchingType(final ObjectAdapter targetAdapter, final ObjectAdapter
sourceAdapter) {
-        if (targetAdapter.isTransient() && sourceAdapter.isPersistent()) {
+        if (targetAdapter.representsTransient() && sourceAdapter.isPersistent())
{
             // TODO: use Facet for this test instead.
             return new Veto("Can't set field in persistent object with reference to non-persistent
object");
         }

Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/content/RootObject.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/content/RootObject.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/content/RootObject.java
(original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/content/RootObject.java
Mon Jul  9 21:05:16 2012
@@ -106,7 +106,7 @@ public class RootObject extends Abstract
 
     @Override
     public boolean isTransient() {
-        return adapter != null && adapter.isTransient();
+        return adapter != null && adapter.representsTransient();
     }
 
     @Override

Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/field/OneToManyFieldImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/field/OneToManyFieldImpl.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/field/OneToManyFieldImpl.java
(original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/field/OneToManyFieldImpl.java
Mon Jul  9 21:05:16 2012
@@ -66,7 +66,7 @@ public class OneToManyFieldImpl extends 
                 // TODO: move logic into Facet
                 return new Veto(String.format("Only objects of type %s are allowed in this
collection", elementSpecification.getSingularName()));
             }
-            if (parentAdapter.isPersistent() && sourceAdapter.isTransient()) {
+            if (parentAdapter.isPersistent() && sourceAdapter.representsTransient())
{
                 // TODO: move logic into Facet
                 return new Veto("Can't set field in persistent object with reference to non-persistent
object");
             }

Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/field/OneToOneFieldImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/field/OneToOneFieldImpl.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/field/OneToOneFieldImpl.java
(original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/field/OneToOneFieldImpl.java
Mon Jul  9 21:05:16 2012
@@ -73,7 +73,7 @@ public class OneToOneFieldImpl extends A
             return new Veto(String.format("Can only drop objects of type %s", targetType.getSingularName()));
         }
 
-        if (getParent().isPersistent() && adapter.isTransient()) {
+        if (getParent().isPersistent() && adapter.representsTransient()) {
             // TODO: move logic into Facet
             return new Veto("Can't drop a non-persistent into this persistent object");
         }
@@ -159,7 +159,7 @@ public class OneToOneFieldImpl extends A
 
     @Override
     public boolean isTransient() {
-        return adapter != null && adapter.isTransient();
+        return adapter != null && adapter.representsTransient();
     }
 
     @Override

Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/DisposeObjectOption.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/DisposeObjectOption.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/DisposeObjectOption.java
(original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/DisposeObjectOption.java
Mon Jul  9 21:05:16 2012
@@ -43,7 +43,7 @@ public class DisposeObjectOption extends
     @Override
     public Consent disabled(final View view) {
         final ObjectAdapter adapter = view.getContent().getAdapter();
-        if (adapter.getResolveState().isDestroyed()) {
+        if (adapter.isDestroyed()) {
             // TODO: move logic into Facet
             return new Veto("Can't do anything with a destroyed object");
         }

Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/SkylarkViewFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/SkylarkViewFactory.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/SkylarkViewFactory.java
(original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/SkylarkViewFactory.java
Mon Jul  9 21:05:16 2012
@@ -117,7 +117,7 @@ public class SkylarkViewFactory implemen
          */
         if (content.isObject()) {
             final ObjectAdapter adapter = content.getAdapter();
-            if (adapter != null && adapter.getResolveState().isDestroyed()) {
+            if (adapter != null && adapter.isDestroyed()) {
                 createView = new DisposedObjectBorder(createView);
             }
         }

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/action/edit/EditObject.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/action/edit/EditObject.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/action/edit/EditObject.java
(original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/action/edit/EditObject.java
Mon Jul  9 21:05:16 2012
@@ -38,7 +38,7 @@ public class EditObject implements Actio
             throw new ActionException("Task no longer in progress");
         }
         final ObjectAdapter object = context.getMappedObject(idString);
-        if (object.getResolveState() != ResolveState.TRANSIENT) {
+        if (!(object.isTransient())) {
             context.setObjectCrumb(object);
         }
         final EditTask editTask = new EditTask(context, object);

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/Context.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/Context.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/Context.java
(original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/Context.java
Mon Jul  9 21:05:16 2012
@@ -271,24 +271,24 @@ public class Context implements Serializ
 
     public ObjectAdapter getMappedObject(final String id) {
         final RootAdapterMapping mappedObject = getMappedInstance(objectMap, id);
-        final ObjectAdapter object = mappedObject.getObject();
+        final ObjectAdapter adapter = mappedObject.getObject();
 
         // ensure resolved if currently a ghost;
         // start/end xactn if required
-        if (object.isPersistent() && object.getResolveState().isGhost()) {
-            getPersistenceSession().resolveImmediately(object);
+        if (adapter.isPersistent() && adapter.isGhost()) {
+            getPersistenceSession().resolveImmediately(adapter);
         }
 
         try {
-            mappedObject.checkVersion(object);
+            mappedObject.checkVersion(adapter);
         } catch (final ConcurrencyException e) {
             LOG.info("concurrency conflict: " + e.getMessage());
             messages.clear();
             messages.add(e.getMessage());
-            messages.add("Reloaded object " + object.titleString());
-            updateVersion(object);
+            messages.add("Reloaded object " + adapter.titleString());
+            updateVersion(adapter);
         }
-        return object;
+        return adapter;
     }
 
     
@@ -345,7 +345,7 @@ public class Context implements Serializ
     }
 
     private static RootAdapterMapping persistentOrTransientObjectMappingFor(final ObjectAdapter
adapter) {
-        return adapter.isTransient() ? new TransientRootAdapterMapping(adapter) : new PersistentRootAdapterMapping(adapter);
+        return adapter.representsTransient() ? new TransientRootAdapterMapping(adapter) :
new PersistentRootAdapterMapping(adapter);
     }
 
     
@@ -538,7 +538,7 @@ public class Context implements Serializ
 
 
     public void updateVersion(final ObjectAdapter adapter) {
-        if (adapter.isTransient()) {
+        if (adapter.representsTransient()) {
             return;
         }
 

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/PersistentRootAdapterMapping.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/PersistentRootAdapterMapping.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/PersistentRootAdapterMapping.java
(original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/PersistentRootAdapterMapping.java
Mon Jul  9 21:05:16 2012
@@ -37,7 +37,7 @@ public class PersistentRootAdapterMappin
     public PersistentRootAdapterMapping(final ObjectAdapter adapter) {
         super(adapter);
         Assert.assertFalse("OID is for transient", adapter.getOid().isTransient());
-        Assert.assertFalse("adapter is for transient", adapter.isTransient());
+        Assert.assertFalse("adapter is for transient", adapter.representsTransient());
     }
 
 

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/TransientRootAdapterMapping.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/TransientRootAdapterMapping.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/TransientRootAdapterMapping.java
(original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/TransientRootAdapterMapping.java
Mon Jul  9 21:05:16 2012
@@ -33,7 +33,7 @@ public class TransientRootAdapterMapping
     public TransientRootAdapterMapping(final ObjectAdapter adapter) {
         super(adapter);
         Assert.assertFalse("OID is for persistent", !adapter.getOid().isTransient());
-        Assert.assertFalse("adapter is for persistent", !adapter.isTransient());
+        Assert.assertFalse("adapter is for persistent", !adapter.representsTransient());
         memento = new Memento(adapter);
     }
 

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/AddItemToCollectionTask.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/AddItemToCollectionTask.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/AddItemToCollectionTask.java
(original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/AddItemToCollectionTask.java
Mon Jul  9 21:05:16 2012
@@ -73,7 +73,7 @@ public class AddItemToCollectionTask ext
         final ObjectAdapter[] parameterAdapters = getEntries(context);
         field.addElement(targetAdapter, parameterAdapters[0]);
 
-        if (targetAdapter.isTransient()) {
+        if (targetAdapter.representsTransient()) {
             getPersistenceSession().makePersistent(targetAdapter);
         }
         return targetAdapter;

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/EditTask.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/EditTask.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/EditTask.java
(original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/EditTask.java
Mon Jul  9 21:05:16 2012
@@ -54,10 +54,10 @@ public class EditTask extends Task {
     private final ObjectAssociation[] fields;
     private final String newType;
 
-    public EditTask(final Context context, final ObjectAdapter object) {
-        super(context, "Edit", "", object, size(object));
+    public EditTask(final Context context, final ObjectAdapter adapter) {
+        super(context, "Edit", "", adapter, size(adapter));
 
-        final List<ObjectAssociation> allFields = object.getSpecification().getAssociations(ObjectAssociationFilters.dynamicallyVisible(getAuthenticationSession(),
object));
+        final List<ObjectAssociation> allFields = adapter.getSpecification().getAssociations(ObjectAssociationFilters.dynamicallyVisible(getAuthenticationSession(),
adapter));
 
         fields = new ObjectAssociation[names.length];
         for (int i = 0, j = 0; j < allFields.size(); j++) {
@@ -66,14 +66,14 @@ public class EditTask extends Task {
             names[i] = fld.getName();
             descriptions[i] = fld.getDescription();
 
-            final Consent usableByUser = fld.isUsable(getAuthenticationSession(), object);
+            final Consent usableByUser = fld.isUsable(getAuthenticationSession(), adapter);
             if (usableByUser.isVetoed()) {
                 descriptions[i] = usableByUser.getReason();
             }
 
             fieldSpecifications[i] = fld.getSpecification();
-            initialState[i] = fld.get(object);
-            if (skipField(object, fld)) {
+            initialState[i] = fld.get(adapter);
+            if (skipField(adapter, fld)) {
                 readOnly[i] = true;
             } else {
                 readOnly[i] = false;
@@ -93,8 +93,8 @@ public class EditTask extends Task {
             i++;
         }
 
-        final boolean isNew = object.getResolveState() == ResolveState.TRANSIENT;
-        newType = isNew ? getTarget(context).getSpecification().getSingularName() : null;
+        final boolean isTransient = adapter.isTransient();
+        newType = isTransient ? getTarget(context).getSpecification().getSingularName() :
null;
     }
 
     @Override
@@ -132,7 +132,7 @@ public class EditTask extends Task {
             }
         }
 
-        if (target.isTransient()) {
+        if (target.representsTransient()) {
             saveState(target, entries);
             final Consent isValid = target.getSpecification().isValid(target);
             error = isValid.isVetoed() ? isValid.getReason() : null;
@@ -144,7 +144,7 @@ public class EditTask extends Task {
         final ObjectAdapter targetAdapter = getTarget(context);
         final ObjectAdapter[] entryAdapters = getEntries(context);
 
-        if (targetAdapter.isTransient()) {
+        if (targetAdapter.representsTransient()) {
             final ObjectAction action = targetAdapter.getSpecification().getObjectAction(ActionType.USER,
"save", ObjectSpecification.EMPTY_LIST);
             if (action == null) {
                 getPersistenceSession().makePersistent(targetAdapter);

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/InvokeMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/InvokeMethod.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/InvokeMethod.java
(original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/InvokeMethod.java
Mon Jul  9 21:05:16 2012
@@ -112,7 +112,7 @@ public final class InvokeMethod implemen
 
     static void forwardObjectResult(final Request request, final Context context, final ObjectAdapter
resultAdapter) {
         final String objectId = context.mapObject(resultAdapter);
-        if (resultAdapter.isTransient() && resultAdapter.getSpecification().persistability()
== Persistability.USER_PERSISTABLE) {
+        if (resultAdapter.representsTransient() && resultAdapter.getSpecification().persistability()
== Persistability.USER_PERSISTABLE) {
             request.forward(ForwardRequest.editObject(objectId));
         } else if (resultAdapter.getSpecification().isService()) {
             request.forward(ForwardRequest.viewService(objectId));

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/TaskStep.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/TaskStep.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/TaskStep.java
(original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/TaskStep.java
Mon Jul  9 21:05:16 2012
@@ -98,7 +98,7 @@ public final class TaskStep implements A
         final ViewPane content = page.getViewPane();
         final ObjectAdapter targetAdapter = task.getTarget(context);
         String titleString = targetAdapter.titleString();
-        if (targetAdapter.isTransient()) {
+        if (targetAdapter.representsTransient()) {
             titleString += " (Unsaved)";
         }
         content.setTitle(titleString, targetAdapter.getSpecification().getDescription());

Modified: incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java
(original)
+++ incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java
Mon Jul  9 21:05:16 2012
@@ -320,7 +320,7 @@ public class Dispatcher {
                     file = findFileForSpecification(context, facet2.valueSpec(), "collection",
EXTENSION);
                 } else {
                     final ObjectAdapter mappedObject2 = mappedObject;
-                    if (mappedObject2.isTransient()) {
+                    if (mappedObject2.representsTransient()) {
                         file = findFileForSpecification(context, mappedObject.getSpecification(),
"edit", EXTENSION);
                     } else {
                         file = findFileForSpecification(context, mappedObject.getSpecification(),
"object", EXTENSION);

Modified: incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/DefaultOidObjectMapping.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/DefaultOidObjectMapping.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/DefaultOidObjectMapping.java
(original)
+++ incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/DefaultOidObjectMapping.java
Mon Jul  9 21:05:16 2012
@@ -132,7 +132,7 @@ public class DefaultOidObjectMapping imp
                 }
                 data.put(fieldName, collection);
             } else {
-                if (fieldValue.isTransient() || fieldValue.isParented()) {
+                if (fieldValue.representsTransient() || fieldValue.isParented()) {
                     final JSONObject saveData = encodeTransientData(fieldValue, adaptersToSave);
                     if (saveData == null) {
                         data.put(fieldName, mapObject(fieldValue, Scope.INTERACTION));
@@ -220,7 +220,7 @@ public class DefaultOidObjectMapping imp
         final String transferableId = encodedOid;
         // LOG.debug("encoded " + oid + " as " + transferableId + " ~ " + encodedOid);
 
-        if (adapter.isTransient()) {
+        if (adapter.representsTransient()) {
             // old TODO cache these in requests so that Mementos are only created once.
             // old TODO if Transient/Interaction then return state; other store state in
session an return OID string
             final TransientRootAdapterMapping mapping = new TransientRootAdapterMapping(adapter);

Modified: incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/IndirectObjectMapping.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/IndirectObjectMapping.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/IndirectObjectMapping.java
(original)
+++ incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/IndirectObjectMapping.java
Mon Jul  9 21:05:16 2012
@@ -114,7 +114,7 @@ public class IndirectObjectMapping imple
     }
 
     private Mapping createMapping(final ObjectAdapter adapter) {
-        if (adapter.getResolveState().isTransient()) {
+        if (adapter.representsTransient()) {
             return new TransientRootAdapterMapping(adapter);
         } else {
             return new PersistentRootAdapterMapping(adapter);

Modified: incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/Mapping.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/Mapping.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/Mapping.java
(original)
+++ incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/Mapping.java
Mon Jul  9 21:05:16 2012
@@ -47,7 +47,7 @@ class TransientRootAdapterMapping implem
     public TransientRootAdapterMapping(final ObjectAdapter adapter) {
         oid = (RootOid) adapter.getOid();
         Assert.assertTrue("OID is for persistent", oid.isTransient());
-        Assert.assertTrue("adapter is for persistent", adapter.isTransient());
+        Assert.assertTrue("adapter is for persistent", adapter.representsTransient());
         memento = new Memento(adapter);
     }
 

Modified: incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/RequestContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/RequestContext.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/RequestContext.java
(original)
+++ incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/RequestContext.java
Mon Jul  9 21:05:16 2012
@@ -737,9 +737,9 @@ public abstract class RequestContext {
     // //////////////////////////////////////////////////////////////////
 
     public String mapObject(final ObjectAdapter object, final Scope scope) {
-        if (object.getResolveState().isValue()) {
+        if (object.isValue()) {
             return object.titleString();
-        } else if (scope == Scope.INTERACTION && object.isTransient()) {
+        } else if (scope == Scope.INTERACTION && object.representsTransient()) {
             return objectMapping.mapTransientObject(object);
         } else if (object.getOid() != null) {
             return objectMapping.mapObject(object, scope);

Modified: incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/edit/EditAction.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/edit/EditAction.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/edit/EditAction.java
(original)
+++ incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/edit/EditAction.java
Mon Jul  9 21:05:16 2012
@@ -97,7 +97,7 @@ public class EditAction implements Actio
             } else if (entryState.isValid()) {
                 changeObject(context, adapter, entryState, fields);
 
-                if (adapter.isTransient()) {
+                if (adapter.representsTransient()) {
                     IsisContext.getPersistenceSession().makePersistent(adapter);
                     context.unmapObject(adapter, Scope.REQUEST);
                 }

Modified: incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/GetField.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/GetField.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/GetField.java
(original)
+++ incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/GetField.java
Mon Jul  9 21:05:16 2012
@@ -74,7 +74,7 @@ public class GetField extends AbstractEl
 
     protected void process(final Request request, final ObjectAdapter object, final ObjectAssociation
field, final Format format, final String name, final Scope scope) {
         final ObjectAdapter fieldReference = field.get(object);
-        if (format != null && fieldReference.getResolveState().isValue()) {
+        if (format != null && fieldReference.isValue()) {
             final DateValueFacet facet = fieldReference.getSpecification().getFacet(DateValueFacet.class);
             final Date date = facet.dateValue(fieldReference);
             final String value = format.format(date);

Modified: incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/EditObject.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/EditObject.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/EditObject.java
(original)
+++ incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/EditObject.java
Mon Jul  9 21:05:16 2012
@@ -134,7 +134,7 @@ public class EditObject extends Abstract
         hiddenFields.add(resultOverride == null ? null : new HiddenInputField("_" + RESULT_OVERRIDE,
resultOverride));
         hiddenFields.add(scope == null ? null : new HiddenInputField("_" + SCOPE, scope));
 
-        if (!object.isTransient()) {
+        if (!object.representsTransient()) {
             // ensure all booleans are included so the pass back TRUE if set.
             final List<ObjectAssociation> fields2 = object.getSpecification().getAssociations();
             for (int i = 0; i < fields2.size(); i++) {
@@ -292,7 +292,7 @@ public class EditObject extends Abstract
     }
 
     private String getValue(final RequestContext context, final ObjectAdapter field) {
-        if (field == null || field.isTransient()) {
+        if (field == null || field.representsTransient()) {
             return "";
         }
         final ObjectSpecification specification = field.getSpecification();

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/ObjectAdapterMemento.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/ObjectAdapterMemento.java?rev=1359393&r1=1359392&r2=1359393&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/ObjectAdapterMemento.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/ObjectAdapterMemento.java
Mon Jul  9 21:05:16 2012
@@ -184,8 +184,7 @@ public class ObjectAdapterMemento implem
         if (adapter == null) {
             return;
         }
-        final ResolveState resolveState = adapter.getResolveState();
-        if (resolveState.isValue() || resolveState.isResolved()) {
+        if (adapter.isTitleAvailable()) {
             this.titleHint = adapter.titleString();
         }
     }



Mime
View raw message