incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1372355 [5/6] - 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/adapter/map/ core/metamodel/src/main/java/org/apache/isis/...
Date Mon, 13 Aug 2012 10:25:55 GMT
Added: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/persistence/Persistor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/persistence/Persistor.java?rev=1372355&view=auto
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/persistence/Persistor.java (added)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/persistence/Persistor.java Mon Aug 13 10:25:48 2012
@@ -0,0 +1,212 @@
+package org.apache.isis.runtimes.dflt.runtime.system.persistence;
+
+import org.apache.isis.applib.DomainObjectContainer;
+import org.apache.isis.applib.query.Query;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.ResolveState;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
+import org.apache.isis.core.metamodel.adapter.oid.TypedOid;
+import org.apache.isis.core.metamodel.services.container.query.QueryCardinality;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
+import org.apache.isis.runtimes.dflt.runtime.persistence.UnsupportedFindException;
+import org.apache.isis.runtimes.dflt.runtime.persistence.internal.RuntimeContextFromSession;
+
+/**
+ * Represents the client-side API of the <tt>PersistenceSession</tt>.
+ */
+public interface Persistor {
+
+    
+    /////////////////////////////////////////////////////////////////
+    // AdapterManager
+    /////////////////////////////////////////////////////////////////
+
+    /**
+     * Access to looking up (and possibly lazily loading) adapters.
+     * 
+     * <p>
+     * However, manipulating of adapters is not part of this interface.
+     * @return
+     */
+    public abstract AdapterManager getAdapterManager();
+
+    
+    /////////////////////////////////////////////////////////////////
+    // find, load, resolve
+    /////////////////////////////////////////////////////////////////
+    
+
+    /**
+     * Finds and returns instances that match the specified query.
+     * 
+     * <p>
+     * The {@link QueryCardinality} determines whether all instances or just the
+     * first matching instance is returned.
+     * 
+     * @throws UnsupportedFindException
+     *             if the criteria is not support by this persistor
+     */
+    public abstract <T> ObjectAdapter findInstances(Query<T> query, QueryCardinality cardinality);
+
+    /**
+     * Whether there are any instances of the specified
+     * {@link ObjectSpecification type}.
+     *
+     * <p>
+     * Checks whether there are any instances of the specified type. The object
+     * store should look for instances of the type represented by <variable>type
+     * </variable> and return <code>true</code> if there are, or
+     * <code>false</code> if there are not.
+     * 
+     * <p>
+     * Used (ostensibly) by client-side code.
+     */
+    public abstract boolean hasInstances(ObjectSpecification specification);
+
+    /**
+     * Finds and returns instances that match the specified
+     * {@link PersistenceQuery}.
+     * 
+     * <p>
+     * Compared to {@link #findInstances(Query, QueryCardinality)}, not that
+     * there is no {@link QueryCardinality} parameter. That's because
+     * {@link PersistenceQuery} intrinsically carry the knowledge as to how many
+     * rows they return.
+     * 
+     * @throws UnsupportedFindException
+     *             if the criteria is not support by this persistor
+     */
+    public abstract ObjectAdapter findInstances(PersistenceQuery persistenceQuery);
+
+    /**
+     * Loads the object identified by the specified {@link TypedOid} from the
+     * persisted set of objects.
+     */
+    public abstract ObjectAdapter loadObject(TypedOid oid);
+    
+
+    /**
+     * Re-initialises the fields of an object. If the object is unresolved then
+     * the object's missing data should be retrieved from the persistence
+     * mechanism and be used to set up the value objects and associations.
+     */
+    public abstract void resolveImmediately(ObjectAdapter adapter);
+
+    /**
+     * Hint that specified field within the specified object is likely to be
+     * needed soon. This allows the object's data to be loaded, ready for use.
+     * 
+     * <p>
+     * This method need not do anything, but offers the object store the
+     * opportunity to load in objects before their use. Contrast this with
+     * resolveImmediately, which requires an object to be loaded before
+     * continuing.
+     * 
+     * @see #resolveImmediately(ObjectAdapter)
+     */
+    public abstract void resolveField(ObjectAdapter objectAdapter, ObjectAssociation field);
+
+
+    
+    /////////////////////////////////////////////////////////////////
+    // create, persist
+    /////////////////////////////////////////////////////////////////
+
+    /**
+     * Create a root or standalone {@link ObjectAdapter adapter}.
+     * 
+     * <p>
+     * Creates a new instance of the specified type and returns it in an adapter
+     * whose resolved state set to {@link ResolveState#TRANSIENT} (except if the
+     * type is marked as {@link ObjectSpecification#isValueOrIsParented()
+     * aggregated} in which case it will be set to {@link ResolveState#VALUE}).
+     * 
+     * <p>
+     * The returned object will be initialised (had the relevant callback
+     * lifecycle methods invoked).
+     * 
+     * <p>
+     * <b><i> REVIEW: not sure about {@link ResolveState#VALUE} - see comments
+     * in {@link #adapterFor(Object, Oid, OneToManyAssociation)}.</i></b>
+     * <p>
+     * TODO: this is the same as
+     * {@link RuntimeContextFromSession#createTransientInstance(ObjectSpecification)};
+     * could it be unified?
+     * 
+     * <p>
+     * While creating the object it will be initialised with default values and
+     * its created lifecycle method (its logical constructor) will be invoked.
+     * Contrast this with
+     * {@link #recreateTransientInstance(Oid, ObjectSpecification)}.
+     * 
+     * <p>
+     * This method is ultimately delegated to by the
+     * {@link DomainObjectContainer}.
+     */
+    public abstract ObjectAdapter createInstance(ObjectSpecification objectSpec);
+
+    /**
+     * Creates a new instance of the specified type and returns an adapter with
+     * an aggregated OID that show that this new object belongs to the specified
+     * parent. The new object's resolved state is set to
+     * {@link ResolveState#RESOLVED} as it state is part of it parent.
+     * 
+     * <p>
+     * While creating the object it will be initialised with default values and
+     * its created lifecycle method (its logical constructor) will be invoked.
+     * Contrast this with
+     * {@link #recreateTransientInstance(Oid, ObjectSpecification)}.
+     * 
+     * <p>
+     * This method is ultimately delegated to by the
+     * {@link DomainObjectContainer}.
+     */
+    public abstract ObjectAdapter createInstance(ObjectSpecification objectSpec, ObjectAdapter parentAdapter);
+
+    /**
+     * Makes an {@link ObjectAdapter} persistent. The specified object should be
+     * stored away via this object store's persistence mechanism, and have an
+     * new and unique OID assigned to it. The object, should also be added to
+     * the {@link AdapterManagerSpi} as the object is implicitly 'in use'.
+     * 
+     * <p>
+     * If the object has any associations then each of these, where they aren't
+     * already persistent, should also be made persistent by recursively calling
+     * this method.
+     * 
+     * <p>
+     * If the object to be persisted is a collection, then each element of that
+     * collection, that is not already persistent, should be made persistent by
+     * recursively calling this method.
+     * 
+     * @see #remapAsPersistent(ObjectAdapter)
+     */
+    public abstract void makePersistent(ObjectAdapter adapter);
+
+
+    /////////////////////////////////////////////////////////////////
+    // change
+    /////////////////////////////////////////////////////////////////
+
+    /**
+     * Mark the {@link ObjectAdapter} as changed, and therefore requiring
+     * flushing to the persistence mechanism.
+     */
+    public abstract void objectChanged(ObjectAdapter adapter);
+
+    
+    /////////////////////////////////////////////////////////////////
+    // destroy
+    /////////////////////////////////////////////////////////////////
+
+    /**
+     * Removes the specified object from the system. The specified object's data
+     * should be removed from the persistence mechanism.
+     */
+    public abstract void destroyObject(ObjectAdapter adapter);
+
+
+    
+
+}
\ No newline at end of file

Added: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/persistence/RecreatedPojoRemapper.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/persistence/RecreatedPojoRemapper.java?rev=1372355&view=auto
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/persistence/RecreatedPojoRemapper.java (added)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/persistence/RecreatedPojoRemapper.java Mon Aug 13 10:25:48 2012
@@ -0,0 +1,52 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.runtimes.dflt.runtime.system.persistence;
+
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.ResolveState;
+import org.apache.isis.core.metamodel.adapter.oid.Oid;
+
+public interface RecreatedPojoRemapper {
+
+    /**
+     * Either returns an existing {@link ObjectAdapter adapter} (as per
+     * {@link #getAdapterFor(Object)} or {@link #getAdapterFor(Oid)}), otherwise
+     * re-creates an adapter with the specified (persistent) {@link Oid}.
+     * 
+     * <p>
+     * Typically called when the {@link Oid} is already known, that is, when
+     * resolving an already-persisted object. Is also available for
+     * <tt>Memento</tt> support however, so {@link Oid} could also represent a
+     * {@link Oid#isTransient() transient} object.
+     * 
+     * <p>
+     * If the {@link ObjectAdapter adapter} is recreated, its
+     * {@link ResolveState} will be set to either
+     * {@link ResolveState#TRANSIENT} or {@link ResolveState#GHOST} based on
+     * whether the {@link Oid} is {@link Oid#isTransient() transient} or not.
+     * 
+     * @param oid
+     * @param recreatedPojo - already known to the object store impl, or a service
+     */
+    ObjectAdapter mapRecreatedPojo(Oid oid, Object recreatedPojo);
+    
+    void remapRecreatedPojo(ObjectAdapter adapter, Object recreatedPojo);
+
+}

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/transaction/IsisTransactionManager.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/transaction/IsisTransactionManager.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/transaction/IsisTransactionManager.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/transaction/IsisTransactionManager.java Mon Aug 13 10:25:48 2012
@@ -30,7 +30,6 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import org.apache.isis.core.commons.components.Injectable;
 import org.apache.isis.core.commons.components.SessionScopedComponent;
 import org.apache.isis.core.commons.debug.DebugBuilder;
 import org.apache.isis.runtimes.dflt.runtime.persistence.ObjectPersistenceException;

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/transaction/UpdateNotifier.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/transaction/UpdateNotifier.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/transaction/UpdateNotifier.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/transaction/UpdateNotifier.java Mon Aug 13 10:25:48 2012
@@ -21,7 +21,6 @@ package org.apache.isis.runtimes.dflt.ru
 
 import java.util.List;
 
-import org.apache.isis.core.commons.components.Injectable;
 import org.apache.isis.core.commons.components.TransactionScopedComponent;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/systemusinginstallers/IsisSystemUsingInstallers.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/systemusinginstallers/IsisSystemUsingInstallers.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/systemusinginstallers/IsisSystemUsingInstallers.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/systemusinginstallers/IsisSystemUsingInstallers.java Mon Aug 13 10:25:48 2012
@@ -38,22 +38,17 @@ import org.apache.isis.core.runtime.auth
 import org.apache.isis.core.runtime.authorization.AuthorizationManagerInstaller;
 import org.apache.isis.core.runtime.imageloader.TemplateImageLoader;
 import org.apache.isis.core.runtime.imageloader.TemplateImageLoaderInstaller;
-import org.apache.isis.core.runtime.userprofile.UserProfileLoader;
 import org.apache.isis.core.runtime.userprofile.UserProfileStore;
 import org.apache.isis.runtimes.dflt.runtime.fixtures.FixturesInstaller;
 import org.apache.isis.runtimes.dflt.runtime.installerregistry.InstallerLookup;
 import org.apache.isis.runtimes.dflt.runtime.installerregistry.installerapi.PersistenceMechanismInstaller;
-import org.apache.isis.runtimes.dflt.runtime.persistence.internal.RuntimeContextFromSession;
 import org.apache.isis.runtimes.dflt.runtime.services.ServicesInstaller;
 import org.apache.isis.runtimes.dflt.runtime.system.DeploymentType;
 import org.apache.isis.runtimes.dflt.runtime.system.IsisSystemException;
 import org.apache.isis.runtimes.dflt.runtime.system.SystemConstants;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSessionFactory;
-import org.apache.isis.runtimes.dflt.runtime.system.session.IsisSessionFactory;
-import org.apache.isis.runtimes.dflt.runtime.system.session.IsisSessionFactoryDefault;
 import org.apache.isis.runtimes.dflt.runtime.systemdependencyinjector.SystemDependencyInjector;
 import org.apache.isis.runtimes.dflt.runtime.transaction.facetdecorator.standard.TransactionFacetDecoratorInstaller;
-import org.apache.isis.runtimes.dflt.runtime.userprofile.UserProfileLoaderDefault;
 import org.apache.isis.runtimes.dflt.runtime.userprofile.UserProfileStoreInstaller;
 
 public class IsisSystemUsingInstallers extends IsisSystemAbstract {

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/userprofile/UserProfilesDebugUtil.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/userprofile/UserProfilesDebugUtil.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/userprofile/UserProfilesDebugUtil.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/userprofile/UserProfilesDebugUtil.java Mon Aug 13 10:25:48 2012
@@ -21,7 +21,7 @@ package org.apache.isis.runtimes.dflt.ru
 
 import org.apache.isis.core.commons.debug.DebugBuilder;
 import org.apache.isis.core.commons.debug.DebuggableWithTitle;
-import org.apache.isis.core.metamodel.adapter.map.AdapterManager;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.services.ServiceUtil;
 import org.apache.isis.core.runtime.userprofile.PerspectiveEntry;
 import org.apache.isis.core.runtime.userprofile.UserProfile;
@@ -74,9 +74,9 @@ public final class UserProfilesDebugUtil
                 debug.blankLine();
                 debug.appendTitle("Objects");
                 debug.indent();
-                final AdapterManager adapterMap = getAdapterMap();
+                final AdapterManager adapterManager = getAdapterManager();
                 for (final Object obj : perspectiveEntry.getObjects()) {
-                    debug.appendln(adapterMap.adapterFor(obj).toString());
+                    debug.appendln(adapterManager.adapterFor(obj).toString());
                 }
                 debug.unindent();
             }
@@ -92,7 +92,7 @@ public final class UserProfilesDebugUtil
     // Dependencies (from Context)
     // ///////////////////////////////////////////////////////
 
-    private static AdapterManager getAdapterMap() {
+    protected static AdapterManager getAdapterManager() {
         return getPersistenceSession().getAdapterManager();
     }
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/context/IsisContextTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/context/IsisContextTest.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/context/IsisContextTest.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/context/IsisContextTest.java Mon Aug 13 10:25:48 2012
@@ -34,13 +34,11 @@ import org.apache.isis.core.commons.auth
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.commons.config.IsisConfigurationDefault;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
-import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpiAware;
 import org.apache.isis.core.runtime.authentication.AuthenticationManager;
 import org.apache.isis.core.runtime.authentication.standard.SimpleSession;
 import org.apache.isis.core.runtime.authorization.AuthorizationManager;
 import org.apache.isis.core.runtime.imageloader.TemplateImageLoader;
 import org.apache.isis.core.runtime.userprofile.UserProfileLoader;
-import org.apache.isis.core.testsupport.jmock.IsisActions;
 import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2;
 import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2.Mode;
 import org.apache.isis.runtimes.dflt.runtime.system.DeploymentType;

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/AdapterManagerDefault_aggregateAdapters.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/AdapterManagerDefault_aggregateAdapters.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/AdapterManagerDefault_aggregateAdapters.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/AdapterManagerDefault_aggregateAdapters.java Mon Aug 13 10:25:48 2012
@@ -36,7 +36,6 @@ import org.apache.isis.applib.annotation
 import org.apache.isis.applib.profiles.Localization;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapterFactory;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapterLookup;
 import org.apache.isis.core.metamodel.adapter.ResolveState;
 import org.apache.isis.core.metamodel.adapter.oid.AggregatedOid;
 import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
@@ -52,8 +51,6 @@ import org.apache.isis.core.testsupport.
 import org.apache.isis.progmodels.dflt.ProgrammingModelFacetsJava5;
 import org.apache.isis.runtimes.dflt.runtime.persistence.adapter.PojoAdapterFactory;
 import org.apache.isis.runtimes.dflt.runtime.persistence.adaptermanager.AdapterManagerDefault;
-import org.apache.isis.runtimes.dflt.runtime.persistence.adaptermanager.OidAdapterHashMap;
-import org.apache.isis.runtimes.dflt.runtime.persistence.adaptermanager.PojoAdapterHashMap;
 import org.apache.isis.runtimes.dflt.runtime.persistence.adaptermanager.PojoRecreatorDefault;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.OidGenerator;
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/adapterfactory/pojo/PojoAdapterTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/adapterfactory/pojo/PojoAdapterTest.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/adapterfactory/pojo/PojoAdapterTest.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/adapterfactory/pojo/PojoAdapterTest.java Mon Aug 13 10:25:48 2012
@@ -32,8 +32,8 @@ import org.junit.Test;
 
 import org.apache.isis.applib.profiles.Localization;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapterLookup;
 import org.apache.isis.core.metamodel.adapter.ResolveState;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
 import org.apache.isis.core.metamodel.adapter.version.Version;
 import org.apache.isis.core.metamodel.spec.ObjectSpecId;
@@ -59,7 +59,7 @@ public class PojoAdapterTest {
     @Mock
     private SpecificationLoaderSpi mockSpecificationLoader;
     @Mock
-    private ObjectAdapterLookup mockObjectAdapterLookup;
+    private AdapterManager mockObjectAdapterLookup;
     @Mock
     private Localization mockLocalization;
     

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/PersistAlgorithmContractTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/PersistAlgorithmContractTest.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/PersistAlgorithmContractTest.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/PersistAlgorithmContractTest.java Mon Aug 13 10:25:48 2012
@@ -25,7 +25,7 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 
-import org.apache.isis.core.metamodel.adapter.ObjectAdapterLookup;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.Persistability;
@@ -49,7 +49,7 @@ public abstract class PersistAlgorithmCo
     private ObjectSpecification objectSpec;
 
     @Mock
-    private ObjectAdapterLookup mockObjectAdapterLookup;
+    private AdapterManager mockObjectAdapterLookup;
     
     private PersistAlgorithm persistAlgorithm;
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/dflt/DefaultPersistAlgorithmContractTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/dflt/DefaultPersistAlgorithmContractTest.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/dflt/DefaultPersistAlgorithmContractTest.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/dflt/DefaultPersistAlgorithmContractTest.java Mon Aug 13 10:25:48 2012
@@ -19,9 +19,9 @@
 
 package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm.dflt;
 
-import org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm.PersistAlgorithmDefault;
 import org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm.PersistAlgorithm;
 import org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm.PersistAlgorithmContractTest;
+import org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm.PersistAlgorithmDefault;
 
 public class DefaultPersistAlgorithmContractTest extends PersistAlgorithmContractTest {
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/dflt/DefaultPersistAlgorithmTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/dflt/DefaultPersistAlgorithmTest.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/dflt/DefaultPersistAlgorithmTest.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/algorithm/dflt/DefaultPersistAlgorithmTest.java Mon Aug 13 10:25:48 2012
@@ -20,9 +20,8 @@
 package org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm.dflt;
 
 import org.junit.Before;
-import org.junit.Test;
-
 import org.junit.Ignore;
+import org.junit.Test;
 
 import org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.algorithm.PersistAlgorithmDefault;
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/transaction/PojoAdapterBuilder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/transaction/PojoAdapterBuilder.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/transaction/PojoAdapterBuilder.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/transaction/PojoAdapterBuilder.java Mon Aug 13 10:25:48 2012
@@ -24,8 +24,8 @@ import java.util.Iterator;
 import com.google.common.base.Splitter;
 
 import org.apache.isis.applib.profiles.Localization;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapterLookup;
 import org.apache.isis.core.metamodel.adapter.ResolveState;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.adapter.oid.AggregatedOid;
 import org.apache.isis.core.metamodel.adapter.oid.CollectionOid;
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
@@ -50,7 +50,7 @@ public class PojoAdapterBuilder {
     // substitute the SpecLoader
     private SpecificationLoaderSpi specificationLoader;
     
-    private ObjectAdapterLookup objectAdapterLookup;
+    private AdapterManager objectAdapterLookup;
     
     private ObjectSpecId objectSpecId = ObjectSpecId.of("CUS");
     private String identifier = "1";
@@ -195,7 +195,7 @@ public class PojoAdapterBuilder {
         return this;
     }
 
-    public PojoAdapterBuilder with(ObjectAdapterLookup objectAdapterLookup) {
+    public PojoAdapterBuilder with(AdapterManager objectAdapterLookup) {
         this.objectAdapterLookup = objectAdapterLookup;
         return this;
     }

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/system/ObjectActionImplTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/system/ObjectActionImplTest.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/system/ObjectActionImplTest.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/system/ObjectActionImplTest.java Mon Aug 13 10:25:48 2012
@@ -32,7 +32,7 @@ import org.apache.isis.applib.Identifier
 import org.apache.isis.core.commons.authentication.AuthenticationSessionProvider;
 import org.apache.isis.core.metamodel.adapter.QuerySubmitter;
 import org.apache.isis.core.metamodel.adapter.ServicesProvider;
-import org.apache.isis.core.metamodel.adapter.map.AdapterManager;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.facets.FacetedMethod;
 import org.apache.isis.core.metamodel.facets.named.NamedFacet;
 import org.apache.isis.core.metamodel.facets.named.NamedFacetAbstract;

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/system/OneToManyAssociationImplTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/system/OneToManyAssociationImplTest.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/system/OneToManyAssociationImplTest.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/system/OneToManyAssociationImplTest.java Mon Aug 13 10:25:48 2012
@@ -24,19 +24,16 @@ import static org.hamcrest.Matchers.is;
 import static org.junit.Assert.assertThat;
 
 import org.jmock.Expectations;
-import org.jmock.Mockery;
-import org.jmock.integration.junit4.JMock;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.jmock.lib.legacy.ClassImposteriser;
+import org.jmock.auto.Mock;
 import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
-import org.junit.runner.RunWith;
 
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.core.commons.authentication.AuthenticationSessionProvider;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.QuerySubmitter;
-import org.apache.isis.core.metamodel.adapter.map.AdapterManager;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.facets.FacetedMethod;
 import org.apache.isis.core.metamodel.facets.collections.modify.CollectionAddToFacet;
 import org.apache.isis.core.metamodel.facets.named.NamedFacet;
@@ -47,8 +44,9 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
 import org.apache.isis.core.metamodel.specloader.collectiontyperegistry.CollectionTypeRegistry;
 import org.apache.isis.core.metamodel.specloader.specimpl.OneToManyAssociationImpl;
+import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2;
+import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2.Mode;
 
-@RunWith(JMock.class)
 public class OneToManyAssociationImplTest {
 
     private static final String COLLECTION_ID = "orders";
@@ -61,43 +59,34 @@ public class OneToManyAssociationImplTes
 
     private static final Class<?> COLLECTION_TYPE = Order.class;
 
-    private final Mockery context = new JUnit4Mockery() {
-        {
-            setImposteriser(ClassImposteriser.INSTANCE);
-        }
-    };
+    @Rule
+    public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
 
+    @Mock
     private ObjectAdapter mockOwnerAdapter;
+    @Mock
     private ObjectAdapter mockAssociatedAdapter;
-    private OneToManyAssociation association;
-
-    private FacetedMethod mockPeer;
-
+    @Mock
     private AuthenticationSessionProvider mockAuthenticationSessionProvider;
+    @Mock
     private SpecificationLoader mockSpecificationLookup;
+    @Mock
     private AdapterManager mockAdapterManager;
+    @Mock
     private QuerySubmitter mockQuerySubmitter;
-
+    @Mock
+    private FacetedMethod mockPeer;
+    @Mock
     private NamedFacet mockNamedFacet;
+    @Mock
     private CollectionAddToFacet mockCollectionAddToFacet;
+    @Mock
     private CollectionTypeRegistry mockCollectionTypeRegistry;
+    
+    private OneToManyAssociation association;
 
     @Before
     public void setUp() {
-
-        mockOwnerAdapter = context.mock(ObjectAdapter.class, "owner");
-        mockAssociatedAdapter = context.mock(ObjectAdapter.class, "associated");
-
-        mockAuthenticationSessionProvider = context.mock(AuthenticationSessionProvider.class);
-        mockSpecificationLookup = context.mock(SpecificationLoader.class);
-        mockAdapterManager = context.mock(AdapterManager.class);
-        mockQuerySubmitter = context.mock(QuerySubmitter.class);
-        mockCollectionTypeRegistry = context.mock(CollectionTypeRegistry.class);
-        mockPeer = context.mock(FacetedMethod.class);
-
-        mockNamedFacet = context.mock(NamedFacet.class);
-        mockCollectionAddToFacet = context.mock(CollectionAddToFacet.class);
-
         allowingPeerToReturnCollectionType();
         allowingPeerToReturnIdentifier();
         allowingSpecLoaderToReturnSpecs();

Modified: incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/main/java/org/apache/isis/runtimes/dflt/testsupport/IsisSystemWithFixtures.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/main/java/org/apache/isis/runtimes/dflt/testsupport/IsisSystemWithFixtures.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/main/java/org/apache/isis/runtimes/dflt/testsupport/IsisSystemWithFixtures.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/main/java/org/apache/isis/runtimes/dflt/testsupport/IsisSystemWithFixtures.java Mon Aug 13 10:25:48 2012
@@ -36,6 +36,7 @@ import org.apache.isis.applib.DomainObje
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.adapter.oid.RootOid;
 import org.apache.isis.core.metamodel.progmodel.ProgrammingModel;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
@@ -49,6 +50,7 @@ import org.apache.isis.runtimes.dflt.run
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.AdapterManagerSpi;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor;
 import org.apache.isis.runtimes.dflt.runtime.system.transaction.IsisTransaction;
 import org.apache.isis.runtimes.dflt.runtime.system.transaction.IsisTransaction.State;
 import org.apache.isis.runtimes.dflt.runtime.system.transaction.IsisTransactionManager;
@@ -505,20 +507,20 @@ public class IsisSystemWithFixtures impl
 
     public ObjectAdapter reload(RootOid oid) {
         ensureSessionInProgress();
-        final PersistenceSession persistenceSession = getPersistenceSession();
+        final Persistor persistenceSession = getPersistenceSession();
         return persistenceSession.loadObject(oid);
     }
 
     public ObjectAdapter recreateAdapter(RootOid oid) {
         ensureSessionInProgress();
-        return getAdapterManager().recreatePersistentAdapter(oid);
+        return getPersistenceSession().recreatePersistentAdapter(oid);
     }
 
     public ObjectAdapter remapAsPersistent(Object pojo, RootOid persistentOid) {
         ensureSessionInProgress();
         ensureObjectIsNotPersistent(pojo);
         final ObjectAdapter adapter = adapterFor(pojo);
-        getAdapterManagerPersist().remapAsPersistent(adapter, persistentOid);
+        getPersistenceSession().remapAsPersistent(adapter, persistentOid);
         return adapter;
     }
 
@@ -573,10 +575,6 @@ public class IsisSystemWithFixtures impl
 
 
     
-    private AdapterManagerSpi getAdapterManagerPersist() {
-        return getAdapterManager();
-    }
-
     public void beginTran() {
         final IsisTransactionManager transactionManager = getTransactionManager();
         final IsisTransaction transaction = transactionManager.getTransaction();
@@ -653,7 +651,7 @@ public class IsisSystemWithFixtures impl
         return getPersistenceSession().getTransactionManager();
     }
     
-    protected AdapterManagerSpi getAdapterManager() {
+    protected AdapterManager getAdapterManager() {
         return getPersistenceSession().getAdapterManager();
     }
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_reset.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_reset.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_reset.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_reset.java Mon Aug 13 10:25:48 2012
@@ -27,6 +27,7 @@ import org.junit.Rule;
 import org.junit.Test;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.AdapterManagerSpi;
@@ -73,7 +74,7 @@ public class InMemoryObjectStoreTest_res
         return IsisContext.getPersistenceSession();
     }
 
-    private AdapterManagerSpi getAdapterManager() {
+    private AdapterManager getAdapterManager() {
         return getPersistenceSession().getAdapterManager();
     }
 

Modified: incubator/isis/trunk/framework/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/Scenario.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/Scenario.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/Scenario.java (original)
+++ incubator/isis/trunk/framework/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/Scenario.java Mon Aug 13 10:25:48 2012
@@ -38,6 +38,7 @@ import org.apache.isis.core.commons.conf
 import org.apache.isis.core.commons.config.IsisConfigurationBuilder;
 import org.apache.isis.core.commons.config.IsisConfigurationBuilderFileSystem;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.adapter.oid.AggregatedOid;
 import org.apache.isis.core.progmodel.facets.value.ValueSemanticsProviderAbstractTemporal;
 import org.apache.isis.runtimes.dflt.profilestores.dflt.InMemoryUserProfileStoreInstaller;
@@ -298,7 +299,7 @@ public class Scenario implements AliasRe
         return IsisContext.getPersistenceSession();
     }
 
-    private AdapterManagerSpi getAdapterManager() {
+    private AdapterManager getAdapterManager() {
         return getPersistenceSession().getAdapterManager();
     }
 

Modified: incubator/isis/trunk/framework/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/fixtures/AbstractFixturePeer.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/fixtures/AbstractFixturePeer.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/fixtures/AbstractFixturePeer.java (original)
+++ incubator/isis/trunk/framework/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/fixtures/AbstractFixturePeer.java Mon Aug 13 10:25:48 2012
@@ -22,6 +22,7 @@ import java.util.Arrays;
 import java.util.List;
 
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.AdapterManagerSpi;
@@ -69,7 +70,7 @@ public abstract class AbstractFixturePee
         return IsisContext.getPersistenceSession();
     }
 
-    protected AdapterManagerSpi getAdapterManager() {
+    protected AdapterManager getAdapterManager() {
         return getPersistenceSession().getAdapterManager();
     }
 

Modified: incubator/isis/trunk/framework/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/fixtures/perform/SaveObject.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/fixtures/perform/SaveObject.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/fixtures/perform/SaveObject.java (original)
+++ incubator/isis/trunk/framework/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/fixtures/perform/SaveObject.java Mon Aug 13 10:25:48 2012
@@ -21,7 +21,7 @@ package org.apache.isis.viewer.bdd.commo
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.Consent;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
-import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor;
 import org.apache.isis.viewer.bdd.common.CellBinding;
 import org.apache.isis.viewer.bdd.common.ScenarioBoundValueException;
 
@@ -59,7 +59,7 @@ public class SaveObject extends PerformA
         // all OK.
     }
 
-    protected PersistenceSession getPersistenceSession() {
+    protected Persistor getPersistenceSession() {
         return IsisContext.getPersistenceSession();
     }
 

Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/ObjectView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/ObjectView.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/ObjectView.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/ObjectView.java Mon Aug 13 10:25:48 2012
@@ -23,7 +23,7 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.consent.Consent;
 import org.apache.isis.core.metamodel.spec.ActionType;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
-import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor;
 import org.apache.isis.viewer.dnd.drawing.Location;
 import org.apache.isis.viewer.dnd.drawing.Offset;
 import org.apache.isis.viewer.dnd.interaction.ViewDragImpl;
@@ -136,7 +136,7 @@ public abstract class ObjectView extends
     // Dependencies (from context)
     // ///////////////////////////////////////////////////////////////////////////
 
-    private static PersistenceSession getPersistenceSession() {
+    private static Persistor getPersistenceSession() {
         return IsisContext.getPersistenceSession();
     }
 

Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/ViewUpdateNotifierImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/ViewUpdateNotifierImpl.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/ViewUpdateNotifierImpl.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/ViewUpdateNotifierImpl.java Mon Aug 13 10:25:48 2012
@@ -32,6 +32,7 @@ import org.apache.log4j.Logger;
 import org.apache.isis.core.commons.debug.DebugBuilder;
 import org.apache.isis.core.commons.exceptions.IsisException;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.AdapterManagerSpi;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
@@ -172,7 +173,7 @@ public class ViewUpdateNotifierImpl impl
             if (remainingViews != null && remainingViews.size() > 0) {
                 getMessageBroker().addWarning("There are still views (within other views) for the disposed object " + objectToDispose.titleString() + ".  Only objects that are shown as root views can be properly disposed of");
             } else {
-                getAdapterManager().removeAdapter(objectToDispose);
+                getPersistenceSession().removeAdapter(objectToDispose);
             }
         }
     }
@@ -227,7 +228,7 @@ public class ViewUpdateNotifierImpl impl
         return IsisContext.getPersistenceSession();
     }
 
-    private static AdapterManagerSpi getAdapterManager() {
+    private static AdapterManager getAdapterManager() {
         return getPersistenceSession().getAdapterManager();
     }
 

Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/border/SaveTransientObjectBorder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/border/SaveTransientObjectBorder.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/border/SaveTransientObjectBorder.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/border/SaveTransientObjectBorder.java Mon Aug 13 10:25:48 2012
@@ -27,7 +27,7 @@ import org.apache.isis.core.metamodel.co
 import org.apache.isis.core.metamodel.consent.Veto;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
-import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor;
 import org.apache.isis.viewer.dnd.drawing.Location;
 import org.apache.isis.viewer.dnd.view.ButtonAction;
 import org.apache.isis.viewer.dnd.view.Content;
@@ -168,7 +168,7 @@ public class SaveTransientObjectBorder e
     // Dependencies (from context)
     // /////////////////////////////////////////////////////
 
-    private static PersistenceSession getPersistenceSession() {
+    private static Persistor getPersistenceSession() {
         return IsisContext.getPersistenceSession();
     }
 

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=1372355&r1=1372354&r2=1372355&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 Aug 13 10:25:48 2012
@@ -39,7 +39,7 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociationFilters;
 import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
-import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor;
 import org.apache.isis.viewer.dnd.drawing.Image;
 import org.apache.isis.viewer.dnd.drawing.ImageFactory;
 import org.apache.isis.viewer.dnd.drawing.Location;
@@ -279,7 +279,7 @@ public abstract class AbstractObjectCont
     // Dependencies (from context)
     // ////////////////////////////////////////////////////////////
 
-    private static PersistenceSession getPersistenceSession() {
+    private static Persistor getPersistenceSession() {
         return IsisContext.getPersistenceSession();
     }
 

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=1372355&r1=1372354&r2=1372355&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 Aug 13 10:25:48 2012
@@ -25,7 +25,7 @@ import org.apache.isis.core.metamodel.co
 import org.apache.isis.core.metamodel.consent.Veto;
 import org.apache.isis.core.metamodel.spec.ActionType;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
-import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor;
 import org.apache.isis.runtimes.dflt.runtime.system.transaction.UpdateNotifier;
 import org.apache.isis.viewer.dnd.drawing.Location;
 import org.apache.isis.viewer.dnd.view.ObjectContent;
@@ -90,7 +90,7 @@ public class DisposeObjectOption extends
     // Dependencies (from context)
     // /////////////////////////////////////////////////////
 
-    private static PersistenceSession getPersistenceSession() {
+    private static Persistor getPersistenceSession() {
         return IsisContext.getPersistenceSession();
     }
 

Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/undo/SetValueCommand.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/undo/SetValueCommand.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/undo/SetValueCommand.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/undo/SetValueCommand.java Mon Aug 13 10:25:48 2012
@@ -20,6 +20,7 @@
 package org.apache.isis.viewer.dnd.view.undo;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.facets.object.encodeable.EncodableFacet;
 import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
@@ -78,7 +79,7 @@ public class SetValueCommand implements 
         return IsisContext.getPersistenceSession();
     }
 
-    private static AdapterManagerSpi getAdapterManager() {
+    private static AdapterManager getAdapterManager() {
         return getPersistenceSession().getAdapterManager();
     }
 

Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/ApplicationWorkspace.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/ApplicationWorkspace.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/ApplicationWorkspace.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/ApplicationWorkspace.java Mon Aug 13 10:25:48 2012
@@ -28,6 +28,7 @@ import com.google.common.collect.Lists;
 
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.consent.Allow;
 import org.apache.isis.core.metamodel.consent.Consent;
 import org.apache.isis.core.metamodel.consent.Veto;
@@ -363,13 +364,14 @@ public final class ApplicationWorkspace 
                 final List<Object> servicePojos = IsisContext.getServices();
                 final List<ObjectAdapter> serviceAdapters = Lists.newArrayList();
                 for (final Object servicePojo : servicePojos) {
-                    final AdapterManagerSpi adapterManager = IsisContext.getPersistenceSession().getAdapterManager();
+                    final AdapterManager adapterManager = getPersistenceSession().getAdapterManager();
                     serviceAdapters.add(adapterManager.adapterFor(servicePojo));
                 }
                 final ObjectSpecification spec = getSpecificationLoader().loadSpecification(Object.class);
                 final FreeStandingList collection = new FreeStandingList(spec, serviceAdapters);
                 addWindowFor(getAdapterManager().adapterFor(collection), new Placement(at));
             }
+
         });
 
         menuForChangingLook(options);
@@ -507,7 +509,7 @@ public final class ApplicationWorkspace 
         return IsisContext.getPersistenceSession();
     }
 
-    private AdapterManagerSpi getAdapterManager() {
+    private AdapterManager getAdapterManager() {
         return getPersistenceSession().getAdapterManager();
     }
 

Modified: incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/TextFieldContentTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/TextFieldContentTest.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/TextFieldContentTest.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/TextFieldContentTest.java Mon Aug 13 10:25:48 2012
@@ -47,8 +47,8 @@ import org.apache.isis.core.testsupport.
 import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2.Mode;
 import org.apache.isis.runtimes.dflt.runtime.system.DeploymentType;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContextStatic;
-import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSessionFactory;
+import org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor;
 import org.apache.isis.runtimes.dflt.runtime.system.session.IsisSessionFactory;
 import org.apache.isis.runtimes.dflt.runtime.system.session.IsisSessionFactoryDefault;
 import org.apache.isis.viewer.dnd.drawing.Location;
@@ -69,7 +69,7 @@ public class TextFieldContentTest {
     @Mock
     protected PersistenceSessionFactory mockPersistenceSessionFactory;
     @Mock
-    protected PersistenceSession mockPersistenceSession;
+    protected Persistor mockPersistenceSession;
     @Mock
     protected AuthenticationManager mockAuthenticationManager;
     @Mock

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/ObjectViewAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/ObjectViewAbstract.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/ObjectViewAbstract.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/ObjectViewAbstract.java Mon Aug 13 10:25:48 2012
@@ -22,7 +22,7 @@ package org.apache.isis.viewer.html.acti
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
-import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor;
 import org.apache.isis.viewer.html.action.Action;
 import org.apache.isis.viewer.html.action.ActionException;
 import org.apache.isis.viewer.html.action.view.util.MenuUtil;
@@ -82,7 +82,7 @@ public abstract class ObjectViewAbstract
         return IsisContext.getAuthenticationSession();
     }
 
-    protected PersistenceSession getPersistenceSession() {
+    protected Persistor getPersistenceSession() {
         return IsisContext.getPersistenceSession();
     }
 

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/util/TableUtil.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/util/TableUtil.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/util/TableUtil.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/util/TableUtil.java Mon Aug 13 10:25:48 2012
@@ -34,7 +34,7 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
-import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor;
 import org.apache.isis.viewer.html.component.ComponentFactory;
 import org.apache.isis.viewer.html.component.Table;
 import org.apache.isis.viewer.html.context.Context;
@@ -113,7 +113,7 @@ public class TableUtil {
     // Dependencies (from context)
     // ////////////////////////////////////////////////////////////////////////////////
 
-    private static PersistenceSession getPersistenceSession() {
+    private static Persistor getPersistenceSession() {
         return IsisContext.getPersistenceSession();
     }
 

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/CollectionMapping.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/CollectionMapping.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/CollectionMapping.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/CollectionMapping.java Mon Aug 13 10:25:48 2012
@@ -26,6 +26,7 @@ import com.google.common.collect.Lists;
 
 import org.apache.isis.core.commons.debug.DebugBuilder;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacet;
 import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacetUtils;
 import org.apache.isis.core.metamodel.facets.typeof.TypeOfFacet;
@@ -143,7 +144,7 @@ public class CollectionMapping implement
     // Dependencies (from context)
     // //////////////////////////////////////////////////////
 
-    private static AdapterManagerSpi getAdapterManager() {
+    private static AdapterManager getAdapterManager() {
         return getPersistenceSession().getAdapterManager();
     }
 

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=1372355&r1=1372354&r2=1372355&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 Aug 13 10:25:48 2012
@@ -35,6 +35,7 @@ import org.apache.isis.core.commons.debu
 import org.apache.isis.core.commons.ensure.Assert;
 import org.apache.isis.core.commons.exceptions.IsisException;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.runtime.userprofile.UserProfile;
@@ -89,7 +90,7 @@ public class Context implements Serializ
     }
 
     public void init() {
-        final AdapterManagerSpi adapterManager = getAdapterManager();
+        final AdapterManager adapterManager = getAdapterManager();
         final List<Object> services = getUserProfile().getPerspective().getServices();
         for (final Object service : services) {
             final ObjectAdapter serviceAdapter = adapterManager.adapterFor(service);
@@ -636,7 +637,7 @@ public class Context implements Serializ
         return IsisContext.getUserProfile();
     }
 
-    protected AdapterManagerSpi getAdapterManager() {
+    protected AdapterManager getAdapterManager() {
         return getPersistenceSession().getAdapterManager();
     }
 

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=1372355&r1=1372354&r2=1372355&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 Aug 13 10:25:48 2012
@@ -22,6 +22,7 @@ package org.apache.isis.viewer.html.cont
 import org.apache.isis.core.commons.debug.DebugBuilder;
 import org.apache.isis.core.commons.ensure.Assert;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
 import org.apache.isis.core.metamodel.adapter.version.Version;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
@@ -69,7 +70,7 @@ public class PersistentRootAdapterMappin
     @Override
     public void restoreToLoader() {
         final RootOidDefault oid = RootOidDefault.deString(getOidStr());
-        final ObjectAdapter adapter = getAdapterManager().recreatePersistentAdapter(oid);
+        final ObjectAdapter adapter = getPersistenceSession().recreatePersistentAdapter(oid);
         adapter.setVersion(getVersion());
     }
 
@@ -112,7 +113,7 @@ public class PersistentRootAdapterMappin
         return IsisContext.getPersistenceSession();
     }
 
-    protected AdapterManagerSpi getAdapterManager() {
+    protected AdapterManager getAdapterManager() {
         return getPersistenceSession().getAdapterManager();
     }
     

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/RootAdapterMappingAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/RootAdapterMappingAbstract.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/RootAdapterMappingAbstract.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/context/RootAdapterMappingAbstract.java Mon Aug 13 10:25:48 2012
@@ -25,7 +25,7 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
 import org.apache.isis.core.metamodel.adapter.version.Version;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
-import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor;
 
 public abstract class RootAdapterMappingAbstract implements RootAdapterMapping {
     
@@ -102,7 +102,7 @@ public abstract class RootAdapterMapping
     // Dependencies (from context)
     // /////////////////////////////////////////////////////
 
-    private static PersistenceSession getPersistenceSession() {
+    private static Persistor getPersistenceSession() {
         return IsisContext.getPersistenceSession();
     }
 

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/servlet/internal/WebController.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/servlet/internal/WebController.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/servlet/internal/WebController.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/servlet/internal/WebController.java Mon Aug 13 10:25:48 2012
@@ -31,6 +31,7 @@ import org.apache.isis.core.commons.debu
 import org.apache.isis.core.commons.exceptions.IsisApplicationException;
 import org.apache.isis.core.commons.exceptions.IsisException;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.util.Dump;
 import org.apache.isis.core.runtime.userprofile.UserProfile;
@@ -335,7 +336,7 @@ public class WebController {
     private void listServices(final Context context, final Block navigationBar) {
         final Block taskBar = context.getComponentFactory().createBlock("services", null);
         taskBar.add(context.getComponentFactory().createHeading("Services"));
-        final AdapterManagerSpi adapterManager = IsisContext.getPersistenceSession().getAdapterManager();
+        final AdapterManager adapterManager = IsisContext.getPersistenceSession().getAdapterManager();
         final List<Object> services = getUserProfile().getPerspective().getServices();
         for (final Object service : services) {
             final ObjectAdapter serviceAdapter = adapterManager.adapterFor(service);

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=1372355&r1=1372354&r2=1372355&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 Aug 13 10:25:48 2012
@@ -25,7 +25,7 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacetUtils;
 import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
-import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor;
 import org.apache.isis.viewer.html.component.Page;
 import org.apache.isis.viewer.html.context.Context;
 
@@ -88,7 +88,7 @@ public class AddItemToCollectionTask ext
     // Dependencies (from context)
     // /////////////////////////////////////////////////////
 
-    private static PersistenceSession getPersistenceSession() {
+    private static Persistor getPersistenceSession() {
         return IsisContext.getPersistenceSession();
     }
 

Modified: incubator/isis/trunk/framework/viewer/html/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapAction.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapAction.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapAction.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapAction.java Mon Aug 13 10:25:48 2012
@@ -30,6 +30,7 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.AdapterManagerSpi;
@@ -91,7 +92,7 @@ public class ContextTest_mapAction {
         return IsisContext.getPersistenceSession();
     }
 
-    private AdapterManagerSpi getAdapterManager() {
+    private AdapterManager getAdapterManager() {
         return getPersistenceSession().getAdapterManager();
     }
 

Modified: incubator/isis/trunk/framework/viewer/html/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapCollection.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapCollection.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapCollection.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapCollection.java Mon Aug 13 10:25:48 2012
@@ -37,6 +37,7 @@ import org.junit.Rule;
 import org.junit.Test;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.AdapterManagerSpi;
@@ -152,7 +153,7 @@ public class ContextTest_mapCollection {
         return IsisContext.getPersistenceSession();
     }
 
-    private AdapterManagerSpi getAdapterManager() {
+    private AdapterManager getAdapterManager() {
         return getPersistenceSession().getAdapterManager();
     }
 

Modified: incubator/isis/trunk/framework/viewer/html/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapObject.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapObject.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapObject.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapObject.java Mon Aug 13 10:25:48 2012
@@ -37,6 +37,7 @@ import org.junit.Test;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.ResolveState;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
 import org.apache.isis.core.metamodel.adapter.version.Version;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
@@ -258,7 +259,7 @@ public class ContextTest_mapObject {
         return IsisContext.getPersistenceSession();
     }
 
-    private AdapterManagerSpi getAdapterManager() {
+    private AdapterManager getAdapterManager() {
         return getPersistenceSession().getAdapterManager();
     }
 

Modified: incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/ResourceContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/ResourceContext.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/ResourceContext.java (original)
+++ incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/ResourceContext.java Mon Aug 13 10:25:48 2012
@@ -37,10 +37,12 @@ import com.google.common.collect.Lists;
 import org.apache.isis.applib.profiles.Localization;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapterLookup;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.adapter.oid.stringable.OidStringifier;
 import org.apache.isis.core.metamodel.spec.SpecificationLoader;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor;
 import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
 import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
 import org.apache.isis.viewer.restfulobjects.applib.RestfulRequest.RequestParameter;
@@ -60,7 +62,7 @@ public class ResourceContext {
     private final IsisConfiguration configuration;
     private final AuthenticationSession authenticationSession;
     private final PersistenceSession persistenceSession;
-    private final ObjectAdapterLookup objectAdapterLookup;
+    private final AdapterManager objectAdapterLookup;
     private final SpecificationLoader specificationLookup;
 
     private List<List<String>> followLinks;
@@ -80,7 +82,7 @@ public class ResourceContext {
     private JsonRepresentation readQueryStringAsMap;
 
     public ResourceContext(final RepresentationType representationType, final HttpHeaders httpHeaders, final UriInfo uriInfo, final Request request, final HttpServletRequest httpServletRequest, final HttpServletResponse httpServletResponse, final SecurityContext securityContext,
-            final OidStringifier oidStringifier, final Localization localization, final AuthenticationSession authenticationSession, final PersistenceSession persistenceSession, final ObjectAdapterLookup objectAdapterLookup, final SpecificationLoader specificationLookup, IsisConfiguration configuration) {
+            final OidStringifier oidStringifier, final Localization localization, final AuthenticationSession authenticationSession, final PersistenceSession persistenceSession, final AdapterManager objectAdapterLookup, final SpecificationLoader specificationLookup, IsisConfiguration configuration) {
 
         this.httpHeaders = httpHeaders;
         this.uriInfo = uriInfo;
@@ -202,7 +204,7 @@ public class ResourceContext {
         return authenticationSession;
     }
 
-    public ObjectAdapterLookup getObjectAdapterLookup() {
+    public AdapterManager getObjectAdapterLookup() {
         return objectAdapterLookup;
     }
 
@@ -210,6 +212,10 @@ public class ResourceContext {
         return persistenceSession;
     }
 
+    public List<ObjectAdapter> getServiceAdapters() {
+        return persistenceSession.getServices();
+    }
+
     public SpecificationLoader getSpecificationLookup() {
         return specificationLookup;
     }

Modified: incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/representations/ReprRendererAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/representations/ReprRendererAbstract.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/representations/ReprRendererAbstract.java (original)
+++ incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/representations/ReprRendererAbstract.java Mon Aug 13 10:25:48 2012
@@ -27,7 +27,7 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.OidGenerator;
-import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.runtimes.dflt.runtime.system.persistence.Persistor;
 import org.apache.isis.runtimes.dflt.runtime.system.transaction.UpdateNotifier;
 import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
 import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
@@ -164,14 +164,14 @@ public abstract class ReprRendererAbstra
     }
 
     protected OidStringifier getOidStringifier() {
-        return getOidGenerator().getOidStringifier();
+        return IsisContext.getPersistenceSession().getOidGenerator().getOidStringifier();
     }
 
-    protected OidGenerator getOidGenerator() {
-        return getPersistenceSession().getOidGenerator();
+    protected List<ObjectAdapter> getServiceAdapters() {
+        return IsisContext.getPersistenceSession().getServices();
     }
 
-    protected PersistenceSession getPersistenceSession() {
+    protected Persistor getPersistenceSession() {
         return IsisContext.getPersistenceSession();
     }
 

Modified: incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/ResourceAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/ResourceAbstract.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/ResourceAbstract.java (original)
+++ incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/ResourceAbstract.java Mon Aug 13 10:25:48 2012
@@ -41,6 +41,7 @@ import org.apache.isis.applib.profiles.L
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.adapter.oid.stringable.OidStringifier;
 import org.apache.isis.core.metamodel.adapter.version.Version;
 import org.apache.isis.core.metamodel.services.ServiceUtil;
@@ -227,7 +228,7 @@ public abstract class ResourceAbstract {
         return IsisContext.getSpecificationLoader();
     }
 
-    protected AdapterManagerSpi getAdapterManager() {
+    protected AdapterManager getAdapterManager() {
         return getPersistenceSession().getAdapterManager();
     }
 

Modified: incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainServiceResourceServerside.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainServiceResourceServerside.java?rev=1372355&r1=1372354&r2=1372355&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainServiceResourceServerside.java (original)
+++ incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainServiceResourceServerside.java Mon Aug 13 10:25:48 2012
@@ -50,7 +50,7 @@ public class DomainServiceResourceServer
         final RepresentationType representationType = RepresentationType.LIST;
         init(representationType);
 
-        final List<ObjectAdapter> serviceAdapters = getResourceContext().getPersistenceSession().getServices();
+        final List<ObjectAdapter> serviceAdapters = getResourceContext().getServiceAdapters();
 
         final RendererFactory factory = RendererFactoryRegistry.instance.find(representationType);
 



Mime
View raw message