incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1373642 [3/3] - in /incubator/isis/trunk/framework: core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/mgr/ core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/ core/metamodel/src/test/java/org/apache/i...
Date Wed, 15 Aug 2012 21:43:47 GMT
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/session/IsisSessionFactoryAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/session/IsisSessionFactoryAbstract.java?rev=1373642&r1=1373641&r2=1373642&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/session/IsisSessionFactoryAbstract.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/session/IsisSessionFactoryAbstract.java Wed Aug 15 21:43:44 2012
@@ -30,6 +30,7 @@ import org.apache.isis.core.commons.auth
 import org.apache.isis.core.commons.components.ApplicationScopedComponent;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.commons.lang.JavaClassUtils;
+import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
 import org.apache.isis.core.runtime.authentication.AuthenticationManager;
 import org.apache.isis.core.runtime.authorization.AuthorizationManager;
@@ -65,9 +66,10 @@ public abstract class IsisSessionFactory
     private final PersistenceSessionFactory persistenceSessionFactory;
     private final UserProfileLoader userProfileLoader;
     private final List<Object> serviceList;
+    private final OidMarshaller oidMarshaller;
 
     public IsisSessionFactoryAbstract(final DeploymentType deploymentType, final IsisConfiguration configuration, final SpecificationLoaderSpi specificationLoader, final TemplateImageLoader templateImageLoader, final AuthenticationManager authenticationManager,
-            final AuthorizationManager authorizationManager, final UserProfileLoader userProfileLoader, final PersistenceSessionFactory persistenceSessionFactory, final List<Object> serviceList) {
+            final AuthorizationManager authorizationManager, final UserProfileLoader userProfileLoader, final PersistenceSessionFactory persistenceSessionFactory, final List<Object> serviceList, OidMarshaller oidMarshaller) {
 
         ensureThatArg(deploymentType, is(not(nullValue())));
         ensureThatArg(configuration, is(not(nullValue())));
@@ -88,6 +90,7 @@ public abstract class IsisSessionFactory
         this.userProfileLoader = userProfileLoader;
         this.persistenceSessionFactory = persistenceSessionFactory;
         this.serviceList = serviceList;
+        this.oidMarshaller = oidMarshaller;
     }
 
     // ///////////////////////////////////////////
@@ -186,4 +189,9 @@ public abstract class IsisSessionFactory
     public List<Object> getServices() {
         return serviceList;
     }
+    
+    @Override
+    public OidMarshaller getOidMarshaller() {
+    	return oidMarshaller;
+    }
 }

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/session/IsisSessionFactoryDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/session/IsisSessionFactoryDefault.java?rev=1373642&r1=1373641&r2=1373642&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/session/IsisSessionFactoryDefault.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/session/IsisSessionFactoryDefault.java Wed Aug 15 21:43:44 2012
@@ -22,6 +22,7 @@ package org.apache.isis.runtimes.dflt.ru
 import java.util.List;
 
 import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
 import org.apache.isis.core.runtime.authentication.AuthenticationManager;
 import org.apache.isis.core.runtime.authorization.AuthorizationManager;
@@ -37,8 +38,8 @@ import org.apache.isis.runtimes.dflt.run
 public class IsisSessionFactoryDefault extends IsisSessionFactoryAbstract {
 
     public IsisSessionFactoryDefault(final DeploymentType deploymentType, final IsisConfiguration configuration, final TemplateImageLoader templateImageLoader, final SpecificationLoaderSpi specificationLoader, final AuthenticationManager authenticationManager,
-            final AuthorizationManager authorizationManager, final UserProfileLoader userProfileLoader, final PersistenceSessionFactory persistenceSessionFactory, final List<Object> servicesList) {
-        super(deploymentType, configuration, specificationLoader, templateImageLoader, authenticationManager, authorizationManager, userProfileLoader, persistenceSessionFactory, servicesList);
+            final AuthorizationManager authorizationManager, final UserProfileLoader userProfileLoader, final PersistenceSessionFactory persistenceSessionFactory, final List<Object> servicesList, OidMarshaller oidMarshaller) {
+        super(deploymentType, configuration, specificationLoader, templateImageLoader, authenticationManager, authorizationManager, userProfileLoader, persistenceSessionFactory, servicesList, oidMarshaller);
     }
 
 }

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/systemusinginstallers/IsisSystemAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/systemusinginstallers/IsisSystemAbstract.java?rev=1373642&r1=1373641&r2=1373642&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/systemusinginstallers/IsisSystemAbstract.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/systemusinginstallers/IsisSystemAbstract.java Wed Aug 15 21:43:44 2012
@@ -28,6 +28,7 @@ import org.apache.isis.core.commons.comp
 import org.apache.isis.core.commons.components.Noop;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.commons.debug.DebugBuilder;
+import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
 import org.apache.isis.core.runtime.authentication.AuthenticationManager;
 import org.apache.isis.core.runtime.authorization.AuthorizationManager;
@@ -175,6 +176,7 @@ public abstract class IsisSystemAbstract
         final AuthorizationManager authorizationManager = obtainAuthorizationManager(deploymentType);
         final TemplateImageLoader templateImageLoader = obtainTemplateImageLoader();
         final SpecificationLoaderSpi reflector = obtainSpecificationLoaderSpi(deploymentType);
+        final OidMarshaller oidMarshaller = obtainOidMarshaller();
 
         final List<Object> servicesList = obtainServices();
 
@@ -182,7 +184,7 @@ public abstract class IsisSystemAbstract
         RuntimeContextFromSession runtimeContext = new RuntimeContextFromSession();
         runtimeContext.injectInto(reflector);
 
-        return new IsisSessionFactoryDefault(deploymentType, configuration, templateImageLoader, reflector, authenticationManager, authorizationManager, userProfileLoader, persistenceSessionFactory, servicesList);
+		return new IsisSessionFactoryDefault(deploymentType, configuration, templateImageLoader, reflector, authenticationManager, authorizationManager, userProfileLoader, persistenceSessionFactory, servicesList, oidMarshaller);
     }
     
 }

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=1373642&r1=1373641&r2=1373642&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 Wed Aug 15 21:43:44 2012
@@ -33,6 +33,7 @@ import org.junit.Test;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.commons.config.IsisConfigurationDefault;
+import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
 import org.apache.isis.core.runtime.authentication.AuthenticationManager;
 import org.apache.isis.core.runtime.authentication.standard.SimpleSession;
@@ -74,6 +75,8 @@ public class IsisContextTest {
     @Mock
     protected AuthorizationManager mockAuthorizationManager;
 
+    protected OidMarshaller oidMarshaller;
+
     private List<Object> servicesList;
 
 
@@ -90,6 +93,8 @@ public class IsisContextTest {
 
         configuration = new IsisConfigurationDefault();
         
+        oidMarshaller = new OidMarshaller();
+        
         context.checking(new Expectations() {
             {
                 allowing(mockPersistenceSessionFactory).createPersistenceSession();
@@ -105,7 +110,7 @@ public class IsisContextTest {
             }
         });
 
-        sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, mockTemplateImageLoader, mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader, mockPersistenceSessionFactory, servicesList);
+        sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, mockTemplateImageLoader, mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader, mockPersistenceSessionFactory, servicesList, oidMarshaller);
         authSession = new SimpleSession("tester", Collections.<String>emptyList());
         
         IsisContext.setConfiguration(configuration);

Modified: incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/main/java/org/apache/isis/runtimes/dflt/testsupport/tck/ObjectStoreContractTest_persist.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/main/java/org/apache/isis/runtimes/dflt/testsupport/tck/ObjectStoreContractTest_persist.java?rev=1373642&r1=1373641&r2=1373642&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/main/java/org/apache/isis/runtimes/dflt/testsupport/tck/ObjectStoreContractTest_persist.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/main/java/org/apache/isis/runtimes/dflt/testsupport/tck/ObjectStoreContractTest_persist.java Wed Aug 15 21:43:44 2012
@@ -104,7 +104,7 @@ public abstract class ObjectStoreContrac
         iswf.bounceSystem();
         
         // when search for object
-        List<ObjectAdapter> retrievedInstance = getStore().getInstances(new PersistenceQueryFindByTitle(epvSpecification, epv2Adapter.titleString()));
+        List<ObjectAdapter> retrievedInstance = getStore().loadInstancesAndAdapt(new PersistenceQueryFindByTitle(epvSpecification, epv2Adapter.titleString()));
         
         // then find
         assertEquals(1, retrievedInstance.size());
@@ -115,7 +115,7 @@ public abstract class ObjectStoreContrac
         assertEquals(epv2Adapter.getOid(), retrievedAdapter.getOid());
 
         // and when search for some other title
-        retrievedInstance = getStore().getInstances(new PersistenceQueryFindByTitle(epvSpecification, "some other title"));
+        retrievedInstance = getStore().loadInstancesAndAdapt(new PersistenceQueryFindByTitle(epvSpecification, "some other title"));
         
         // then don't find
         assertEquals(0, retrievedInstance.size());
@@ -140,7 +140,7 @@ public abstract class ObjectStoreContrac
         iswf.bounceSystem();
 
         // then found
-        List<ObjectAdapter> retrievedInstance = getStore().getInstances(new PersistenceQueryFindByTitle(epvSpecification, adapter.titleString()));
+        List<ObjectAdapter> retrievedInstance = getStore().loadInstancesAndAdapt(new PersistenceQueryFindByTitle(epvSpecification, adapter.titleString()));
         assertEquals(1, retrievedInstance.size());
         
         final ObjectAdapter retrievedAdapter = retrievedInstance.get(0);

Modified: incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_debug.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_debug.java?rev=1373642&r1=1373641&r2=1373642&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_debug.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_debug.java Wed Aug 15 21:43:44 2012
@@ -22,14 +22,12 @@ package org.apache.isis.runtimes.dflt.ob
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertThat;
 
-import org.junit.Rule;
-import org.junit.Test;
-
 import org.apache.isis.core.commons.debug.DebugString;
 import org.apache.isis.core.commons.matchers.IsisMatchers;
 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.testsupport.IsisSystemWithFixtures;
+import org.junit.Rule;
+import org.junit.Test;
 
 public class InMemoryObjectStoreTest_debug {
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_retrieve.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_retrieve.java?rev=1373642&r1=1373641&r2=1373642&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_retrieve.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_retrieve.java Wed Aug 15 21:43:44 2012
@@ -30,6 +30,7 @@ import org.junit.Rule;
 import org.junit.Test;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
 import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
 import org.apache.isis.core.metamodel.adapter.oid.TypedOid;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
@@ -60,9 +61,9 @@ public class InMemoryObjectStoreTest_ret
 
     @Test
     public void getObject_whenDoesNotExist() {
-        final TypedOid oid = RootOidDefault.deString("SMPL:10");
+        final TypedOid oid = RootOidDefault.deString("SMPL:10", new OidMarshaller());
         try {
-            getStore().getObject(oid);
+            getStore().loadInstanceAndAdapt(oid);
             fail();
         } catch (final ObjectNotFoundException expected) {
         }
@@ -75,7 +76,7 @@ public class InMemoryObjectStoreTest_ret
         iswf.persist(iswf.fixtures.smpl2);
         iswf.bounceSystem();
 
-        final ObjectAdapter retrievedAdapter = getStore().getObject((TypedOid) epv2Adapter.getOid());
+        final ObjectAdapter retrievedAdapter = getStore().loadInstanceAndAdapt((TypedOid) epv2Adapter.getOid());
         
         assertNotSame(epv2Adapter, retrievedAdapter);
         assertEquals(((SimpleEntity)epv2Adapter.getObject()).getName(), ((SimpleEntity)retrievedAdapter.getObject()).getName());
@@ -84,7 +85,7 @@ public class InMemoryObjectStoreTest_ret
 
     @Test
     public void getInstances_whenDoesNotExist() throws Exception {
-        final List<ObjectAdapter> retrievedAdapters = getStore().getInstances(new PersistenceQueryFindByTitle(epvSpecification, epv2Adapter.titleString()));
+        final List<ObjectAdapter> retrievedAdapters = getStore().loadInstancesAndAdapt(new PersistenceQueryFindByTitle(epvSpecification, epv2Adapter.titleString()));
         assertEquals(0, retrievedAdapters.size());
     }
 
@@ -95,7 +96,7 @@ public class InMemoryObjectStoreTest_ret
         iswf.bounceSystem();
 
         // when
-        final List<ObjectAdapter> retrievedAdapters = getStore().getInstances(new PersistenceQueryFindByTitle(epvSpecification, epv2Adapter.titleString()));
+        final List<ObjectAdapter> retrievedAdapters = getStore().loadInstancesAndAdapt(new PersistenceQueryFindByTitle(epvSpecification, epv2Adapter.titleString()));
         
         // then
         assertEquals(1, retrievedAdapters.size());
@@ -113,7 +114,7 @@ public class InMemoryObjectStoreTest_ret
         iswf.bounceSystem();
 
         // when
-        final List<ObjectAdapter> retrievedAdapters = getStore().getInstances(new PersistenceQueryFindAllInstances(epvSpecification));
+        final List<ObjectAdapter> retrievedAdapters = getStore().loadInstancesAndAdapt(new PersistenceQueryFindAllInstances(epvSpecification));
         
         // then
         assertEquals(1, retrievedAdapters.size());

Modified: incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistorSessionHydratorTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistorSessionHydratorTest.java?rev=1373642&r1=1373641&r2=1373642&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistorSessionHydratorTest.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistorSessionHydratorTest.java Wed Aug 15 21:43:44 2012
@@ -30,6 +30,7 @@ import org.junit.Test;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.ResolveState;
+import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
 import org.apache.isis.core.metamodel.adapter.oid.RootOid;
 import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
 import org.apache.isis.core.metamodel.spec.ObjectSpecId;
@@ -47,7 +48,7 @@ public class PersistorSessionHydratorTes
     @Rule
     public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
 
-    private RootOid epvTransientOid = RootOidDefault.deString("!SMPL:-999");
+    private RootOid epvTransientOid = RootOidDefault.deString("!SMPL:-999", new OidMarshaller());
 
     private IdentifierGenerator mockIdentifierGenerator = context.mock(IdentifierGenerator.class);
     {
@@ -104,7 +105,7 @@ public class PersistorSessionHydratorTes
         iswf.setUpSystem();
         
         // when
-        final RootOidDefault oid = RootOidDefault.deString("SMPL:1");
+        final RootOidDefault oid = RootOidDefault.deString("SMPL:1", new OidMarshaller());
         final ObjectAdapter adapter = iswf.recreateAdapter(oid);
         
         // then

Modified: incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/MultilineTextFieldContentTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/MultilineTextFieldContentTest.java?rev=1373642&r1=1373641&r2=1373642&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/MultilineTextFieldContentTest.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/MultilineTextFieldContentTest.java Wed Aug 15 21:43:44 2012
@@ -20,70 +20,56 @@
 package org.apache.isis.viewer.dnd.view.text;
 
 import java.util.Collections;
-import java.util.List;
-
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.jmock.Expectations;
-import org.jmock.Mockery;
-import org.jmock.integration.junit4.JMock;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
 
 import org.apache.isis.core.commons.config.IsisConfigurationDefault;
+import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
 import org.apache.isis.core.runtime.authentication.AuthenticationManager;
 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.JUnitRuleMockery2;
+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.PersistenceSessionFactory;
 import org.apache.isis.runtimes.dflt.runtime.system.session.IsisSessionFactoryDefault;
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.jmock.auto.Mock;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
 
-@RunWith(JMock.class)
 public class MultilineTextFieldContentTest {
 
+    @Rule
+    public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
+
     private TextContent content;
-    private final Mockery mockery = new JUnit4Mockery();
+    
+    @Mock
     protected TemplateImageLoader mockTemplateImageLoader;
+    @Mock
     protected SpecificationLoaderSpi mockSpecificationLoader;
+    @Mock
     protected PersistenceSessionFactory mockPersistenceSessionFactory;
+    @Mock
     private UserProfileLoader mockUserProfileLoader;
+    @Mock
     protected AuthenticationManager mockAuthenticationManager;
+    @Mock
     protected AuthorizationManager mockAuthorizationManager;
 
-    private List<Object> servicesList;
-
     @Before
     public void setUp() throws Exception {
         Logger.getRootLogger().setLevel(Level.OFF);
 
-        servicesList = Collections.emptyList();
-
-        mockTemplateImageLoader = mockery.mock(TemplateImageLoader.class);
-        mockSpecificationLoader = mockery.mock(SpecificationLoaderSpi.class);
-        mockPersistenceSessionFactory = mockery.mock(PersistenceSessionFactory.class);
-        mockUserProfileLoader = mockery.mock(UserProfileLoader.class);
-        mockAuthenticationManager = mockery.mock(AuthenticationManager.class);
-        mockAuthorizationManager = mockery.mock(AuthorizationManager.class);
-
-        mockery.checking(new Expectations() {
-            {
-                ignoring(mockTemplateImageLoader);
-                ignoring(mockSpecificationLoader);
-                ignoring(mockPersistenceSessionFactory);
-                ignoring(mockUserProfileLoader);
-                ignoring(mockAuthenticationManager);
-                ignoring(mockAuthorizationManager);
-            }
-        });
+        context.ignoring(mockTemplateImageLoader, mockSpecificationLoader, mockPersistenceSessionFactory, mockUserProfileLoader, mockAuthenticationManager, mockAuthorizationManager);
 
         final IsisSessionFactoryDefault sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, new IsisConfigurationDefault(), mockTemplateImageLoader, mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader,
-                mockPersistenceSessionFactory, servicesList);
+                mockPersistenceSessionFactory, Collections.emptyList(), new OidMarshaller());
         IsisContextStatic.createRelaxedInstance(sessionFactory);
         sessionFactory.init();
 

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=1373642&r1=1373641&r2=1373642&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 Wed Aug 15 21:43:44 2012
@@ -38,6 +38,7 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 
 import org.apache.isis.core.commons.config.IsisConfigurationDefault;
+import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
 import org.apache.isis.core.runtime.authentication.AuthenticationManager;
 import org.apache.isis.core.runtime.authorization.AuthorizationManager;
@@ -75,14 +76,10 @@ public class TextFieldContentTest {
     @Mock
     protected AuthorizationManager mockAuthorizationManager;
 
-    private List<Object> servicesList;
-
     @Before
     public void setUp() throws Exception {
         Logger.getRootLogger().setLevel(Level.OFF);
 
-        servicesList = Collections.emptyList();
-
         context.checking(new Expectations() {
             {
                 ignoring(mockTemplateImageLoader);
@@ -95,7 +92,7 @@ public class TextFieldContentTest {
         });
 
         final IsisSessionFactory sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, new IsisConfigurationDefault(), mockTemplateImageLoader, mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader, mockPersistenceSessionFactory,
-                servicesList);
+        		Collections.emptyList(), new OidMarshaller());
         sessionFactory.init();
         IsisContextStatic.createRelaxedInstance(sessionFactory);
 

Modified: incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/ActionFieldBuilderTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/ActionFieldBuilderTest.java?rev=1373642&r1=1373641&r2=1373642&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/ActionFieldBuilderTest.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/ActionFieldBuilderTest.java Wed Aug 15 21:43:44 2012
@@ -35,6 +35,7 @@ import org.junit.Test;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.commons.config.IsisConfigurationDefault;
+import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
 import org.apache.isis.core.runtime.authentication.AuthenticationManager;
 import org.apache.isis.core.runtime.authorization.AuthorizationManager;
@@ -74,8 +75,10 @@ public class ActionFieldBuilderTest {
     @Mock
     protected AuthorizationManager mockAuthorizationManager;
 
+
     private IsisConfiguration configuration;
     private List<Object> servicesList;
+    private OidMarshaller oidMarshaller;
 
     private ActionFieldBuilder builder;
 
@@ -85,6 +88,8 @@ public class ActionFieldBuilderTest {
 
         configuration = new IsisConfigurationDefault();
         servicesList = Collections.emptyList();
+        
+        oidMarshaller = new OidMarshaller();
 
         context.checking(new Expectations() {
             {
@@ -107,7 +112,7 @@ public class ActionFieldBuilderTest {
             }
         };
 
-        final IsisSessionFactoryDefault sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, mockTemplateImageLoader, mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader, mockPersistenceSessionFactory, servicesList);
+        final IsisSessionFactoryDefault sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, mockTemplateImageLoader, mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader, mockPersistenceSessionFactory, servicesList, oidMarshaller);
 
         IsisContext.setConfiguration(sessionFactory.getConfiguration());
         IsisContextStatic.createRelaxedInstance(sessionFactory);

Modified: incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/ScrollBorderTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/ScrollBorderTest.java?rev=1373642&r1=1373641&r2=1373642&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/ScrollBorderTest.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/ScrollBorderTest.java Wed Aug 15 21:43:44 2012
@@ -34,6 +34,7 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 
 import org.apache.isis.core.commons.config.IsisConfigurationDefault;
+import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
 import org.apache.isis.core.runtime.authentication.AuthenticationManager;
 import org.apache.isis.core.runtime.authorization.AuthorizationManager;
@@ -64,13 +65,11 @@ public class ScrollBorderTest {
     protected AuthenticationManager mockAuthenticationManager;
     protected AuthorizationManager mockAuthorizationManager;
 
-    private List<Object> servicesList;
-
     @Before
     public void setUp() throws Exception {
         LogManager.getRootLogger().setLevel(Level.OFF);
 
-        servicesList = Collections.emptyList();
+        
 
         mockTemplateImageLoader = mockery.mock(TemplateImageLoader.class);
         mockSpecificationLoader = mockery.mock(SpecificationLoaderSpi.class);
@@ -93,7 +92,7 @@ public class ScrollBorderTest {
         TestToolkit.createInstance();
 
         final IsisConfigurationDefault configuration = new IsisConfigurationDefault();
-        final IsisSessionFactory sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, mockTemplateImageLoader, mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader, mockPersistenceSessionFactory, servicesList);
+        final IsisSessionFactory sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, mockTemplateImageLoader, mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader, mockPersistenceSessionFactory, Collections.emptyList(), new OidMarshaller());
         sessionFactory.init();
         IsisContextStatic.createRelaxedInstance(sessionFactory);
     }

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=1373642&r1=1373641&r2=1373642&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 Wed Aug 15 21:43:44 2012
@@ -69,7 +69,7 @@ public class PersistentRootAdapterMappin
 
     @Override
     public void restoreToLoader() {
-        final RootOidDefault oid = RootOidDefault.deString(getOidStr());
+        final RootOidDefault oid = RootOidDefault.deString(getOidStr(), getOidMarshaller());
         final ObjectAdapter adapter = getAdapterManager().adapterFor(oid);
         adapter.setVersion(getVersion());
     }

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=1373642&r1=1373641&r2=1373642&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 Wed Aug 15 21:43:44 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.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
+import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
 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;
@@ -35,7 +36,7 @@ public abstract class RootAdapterMapping
 
     public RootAdapterMappingAbstract(final ObjectAdapter adapter) {
         final Oid oid = adapter.getOid();
-        oidStr = oid.enString();
+        oidStr = oid.enString(getOidMarshaller());
     }
 
     @Override
@@ -44,7 +45,7 @@ public abstract class RootAdapterMapping
     }
 
     RootOidDefault getOid() {
-        return RootOidDefault.deString(oidStr);
+        return RootOidDefault.deString(oidStr, getOidMarshaller());
     }
 
     @Override
@@ -106,4 +107,8 @@ public abstract class RootAdapterMapping
         return IsisContext.getPersistenceSession();
     }
 
+    protected OidMarshaller getOidMarshaller() {
+		return IsisContext.getOidMarshaller();
+	}
+
 }

Modified: incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainObjectLinkTo.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/DomainObjectLinkTo.java?rev=1373642&r1=1373641&r2=1373642&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainObjectLinkTo.java (original)
+++ incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainObjectLinkTo.java Wed Aug 15 21:43:44 2012
@@ -17,8 +17,11 @@
 package org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.oid.Oid;
+import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
 import org.apache.isis.core.metamodel.adapter.oid.RootOid;
 import org.apache.isis.core.metamodel.spec.feature.ObjectMember;
+import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
 import org.apache.isis.viewer.restfulobjects.applib.links.Rel;
 import org.apache.isis.viewer.restfulobjects.viewer.ResourceContext;
@@ -64,8 +67,7 @@ public class DomainObjectLinkTo implemen
             throw new IllegalStateException("objectAdapter not provided");
         }
         final StringBuilder buf = new StringBuilder("objects/");
-        RootOid rootOid = (RootOid) objectAdapter.getOid();
-		buf.append(rootOid.enString());
+        buf.append(objectAdapter.getOid().enString(getOidMarshaller()));
         return buf.toString();
     }
 
@@ -99,4 +101,15 @@ public class DomainObjectLinkTo implemen
         return LinkBuilder.newBuilder(resourceContext, rel, representationType, url);
     }
 
+
+    
+    //////////////////////////////////////////////////
+    // Dependencies (from context)
+    //////////////////////////////////////////////////
+    
+    protected static OidMarshaller getOidMarshaller() {
+        return IsisContext.getOidMarshaller();
+    }
+
+
 }
\ No newline at end of file

Modified: incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainObjectReprRenderer.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/DomainObjectReprRenderer.java?rev=1373642&r1=1373641&r2=1373642&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainObjectReprRenderer.java (original)
+++ incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainObjectReprRenderer.java Wed Aug 15 21:43:44 2012
@@ -19,6 +19,7 @@ package org.apache.isis.viewer.restfulob
 import java.util.List;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
 import org.apache.isis.core.metamodel.adapter.oid.RootOid;
 import org.apache.isis.core.metamodel.consent.Consent;
 import org.apache.isis.core.metamodel.facets.object.title.TitleFacet;
@@ -31,6 +32,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.core.metamodel.spec.feature.OneToOneAssociation;
+import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.viewer.restfulobjects.applib.HttpMethod;
 import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
 import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
@@ -61,8 +63,7 @@ public class DomainObjectReprRenderer ex
     }
 
     public static LinkBuilder newLinkToBuilder(final ResourceContext resourceContext, final Rel rel, final ObjectAdapter elementAdapter) {
-        RootOid rootOid = (RootOid) elementAdapter.getOid();
-		final String oidStr = rootOid.enString();
+        final String oidStr = ((RootOid) elementAdapter.getOid()).enString(getOidMarshaller());
         final String url = "objects/" + oidStr;
         final LinkBuilder builder = LinkBuilder.newBuilder(resourceContext, rel, RepresentationType.DOMAIN_OBJECT, url).withTitle(elementAdapter.titleString());
         return builder;
@@ -299,4 +300,14 @@ public class DomainObjectReprRenderer ex
         return DomainObjectReprRenderer.newLinkToBuilder(resourceContext, Rel.OBJECT, objectAdapter).withTitle(title).build();
     }
 
+ 
+    
+    // ///////////////////////////////////////////////////////////////////
+    // dependencies (from context)
+    // ///////////////////////////////////////////////////////////////////
+
+    protected static OidMarshaller getOidMarshaller() {
+		return IsisContext.getOidMarshaller();
+	}
+
 }
\ No newline at end of file

Modified: incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/util/OidUtils.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/util/OidUtils.java?rev=1373642&r1=1373641&r2=1373642&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/util/OidUtils.java (original)
+++ incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/util/OidUtils.java Wed Aug 15 21:43:44 2012
@@ -20,6 +20,7 @@ package org.apache.isis.viewer.restfulob
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
+import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
 import org.apache.isis.core.metamodel.adapter.oid.RootOid;
 import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
 import org.apache.isis.viewer.restfulobjects.viewer.ResourceContext;
@@ -31,7 +32,7 @@ public final class OidUtils {
 
     public static ObjectAdapter getObjectAdapter(final ResourceContext resourceContext, final String oidEncodedStr) {
         final String oidStr = UrlDecoderUtils.urlDecode(oidEncodedStr);
-        final RootOid rootOid = RootOidDefault.deStringEncoded(oidStr);
+        final RootOid rootOid = RootOidDefault.deStringEncoded(oidStr, getOidMarshaller());
         return resourceContext.getAdapterManager().adapterFor(rootOid);
     }
 
@@ -40,8 +41,12 @@ public final class OidUtils {
         if(!(oid instanceof RootOid)) {
             throw new IllegalArgumentException("objectAdapter must be a root adapter");
         }
-        RootOid rootOid = (RootOid) oid;
-        return rootOid != null ? rootOid.enString() : null;
+        return oid != null ? oid.enString(getOidMarshaller()) : null;
     }
 
+    protected static OidMarshaller getOidMarshaller() {
+		return new OidMarshaller();
+	}
+
+    
 }

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=1373642&r1=1373641&r2=1373642&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 Wed Aug 15 21:43:44 2012
@@ -152,32 +152,20 @@ public class DefaultOidObjectMapping imp
         final JSONObject data = new JSONObject();
 
         final Oid oid = adapter.getOid();
-        data.put("_oid", oid.enString());
-        //data.put("_oidType", oid.getClass().getName());
+        data.put("_oid", oid.enString(getOidMarshaller()));
         
         if(oid instanceof RootOid) {
-            //RootOid ows = (RootOid) oid;
-            //data.put("_objectType", ows.getObjectSpecId());
-            //data.put("_id", enString(ows)); // can be used to recreate
             return data;
         }
         
-        //final ObjectSpecification objectSpec = adapter.getSpecification();
-        //data.put("_objectType", objectSpec.getSpecId());
-
         if (!(oid instanceof AggregatedOid)) {
             throw new ScimpiException("Unsupported OID type " + oid);
         } 
-        
-        //final AggregatedOid aoid = (AggregatedOid) oid;
-        //final Oid parentOid = aoid.getParentOid();
-        //final String aggregatedId = aoid.getLocalId();
-        
-        //String encodedOid = enString(parentOid, aggregatedId);
-        //data.put("_id", encodedOid);
         return data;
     }
 
+
+
     
     ////////////////////////////////////////////////////
     // mapObject  (either persistent or transient)
@@ -196,25 +184,7 @@ public class DefaultOidObjectMapping imp
 //            oidType = oid.getClass();
 //        }
 
-        String encodedOid;
-//        if(oid instanceof RootOid) {
-//            RootOid ows = (RootOid) oid;
-//            encodedOid = enString(ows);
-//        } else if (oid instanceof AggregatedOid) {
-//            final AggregatedOid aoid = (AggregatedOid) oid;
-//            final String aggregatedId = aoid.getLocalId();
-//            final Oid parentOid = aoid.getParentOid();
-//            adapter = getAdapterManager().getAdapterFor(parentOid);
-//            
-//            encodedOid = enString(parentOid, aggregatedId);
-//        } else if (oid instanceof RootOidDefault) {
-//            final RootOidDefault rootOidDefault = (RootOidDefault) oid;
-//            encodedOid = rootOidDefault.getIdentifier();
-//        } else {
-//            throw new ScimpiException("Unsupported OID type " + oid);
-//        }
-        encodedOid = oid.enString();
-
+        String encodedOid = oid.enString(getOidMarshaller());
         
         //final boolean isTransient = adapter.isTransient();
         //final String transferableId = (isTransient ? "T" : "P") + adapter.getSpecification().getFullIdentifier() + "@" + encodedOid;
@@ -323,7 +293,7 @@ public class DefaultOidObjectMapping imp
         //final ObjectSpecification objectSpec = getSpecificationLoader().lookupByObjectType(objectType);
         
         final String oidStr = jsonObject.getString("_oid");
-        final TypedOid typedOid = new OidMarshaller().unmarshal(oidStr, TypedOid.class);
+        final TypedOid typedOid = getOidMarshaller().unmarshal(oidStr, TypedOid.class);
 
         if(!typedOid.isTransient()) {
             return getAdapterManager().adapterFor(typedOid);
@@ -362,7 +332,7 @@ public class DefaultOidObjectMapping imp
     @Override
     public ObjectAdapter mappedObject(final String oidStr) {
 
-        final TypedOid typedOid = new OidMarshaller().unmarshal(oidStr, TypedOid.class);
+        final TypedOid typedOid = getOidMarshaller().unmarshal(oidStr, TypedOid.class);
         
         
 //        final char type = oidStr.charAt(0);
@@ -533,4 +503,8 @@ public class DefaultOidObjectMapping imp
         return getPersistenceSession().getAdapterManager();
     }
 
+    protected OidMarshaller getOidMarshaller() {
+        return IsisContext.getOidMarshaller();
+    }
+
 }

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=1373642&r1=1373641&r2=1373642&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 Wed Aug 15 21:43:44 2012
@@ -40,6 +40,7 @@ import org.apache.isis.core.commons.debu
 import org.apache.isis.core.commons.factory.InstanceUtil;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.oid.AggregatedOid;
+import org.apache.isis.core.metamodel.adapter.oid.Oid;
 import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
 import org.apache.isis.core.metamodel.adapter.oid.RootOid;
 import org.apache.isis.core.metamodel.adapter.oid.TypedOid;
@@ -94,7 +95,7 @@ public abstract class RequestContext {
     private static final Map<String, Object> globalVariables = new HashMap<String, Object>();
     private static final Scope[] SCOPES = new Scope[] { Scope.ERROR, Scope.REQUEST, Scope.INTERACTION, Scope.SESSION, Scope.GLOBAL };
     
-    private final OidMarshaller oidMarshaller = new OidMarshaller();
+    private final OidMarshaller oidMarshaller = getOidMarshaller();
 
 
     private final ObjectMapping objectMapping;
@@ -208,7 +209,7 @@ public abstract class RequestContext {
         final TypedOid parentOid = aggregatedOid.getParentOid();
         
         //final ObjectAdapter parentAdapter = objectMapping.mappedObject(idParts[0] + "@" + idParts[1]);
-        final ObjectAdapter parentAdapter = objectMapping.mappedObject(parentOid.enString());
+        final ObjectAdapter parentAdapter = objectMapping.mappedObject(parentOid.enString(getOidMarshaller()));
         getPersistenceSession().resolveImmediately(parentAdapter);
         
         //ObjectSpecId objectType = null; 
@@ -246,6 +247,7 @@ public abstract class RequestContext {
         return aggregatedAdapter;
     }
 
+
     public boolean isInternalRequest() {
         final String referrer = getHeader("Referer"); // Note spelling mistake
                                                       // is intentional

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=1373642&r1=1373641&r2=1373642&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 Wed Aug 15 21:43:44 2012
@@ -33,7 +33,6 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.runtimes.dflt.runtime.memento.Memento;
 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.viewer.wicket.model.util.Oids;
 
@@ -96,7 +95,7 @@ public class ObjectAdapterMemento implem
         PERSISTENT {
             @Override
             ObjectAdapter recreateAdapter(final ObjectAdapterMemento oam) {
-                TypedOid oid = oidMarshaller.unmarshal(oam.persistentOidStr, TypedOid.class);
+                TypedOid oid = getOidMarshaller().unmarshal(oam.persistentOidStr, TypedOid.class);
                 return getAdapterManager().adapterFor(oid);
             }
 
@@ -183,11 +182,9 @@ public class ObjectAdapterMemento implem
      */
     private Memento transientMemento;
 
-    private final static OidMarshaller oidMarshaller = new OidMarshaller();
-    
     private ObjectAdapterMemento(final RootOid rootOid) {
         Ensure.ensureThatArg(rootOid, Oids.isPersistent());
-        this.persistentOidStr = oidMarshaller.marshal(rootOid);
+        this.persistentOidStr = rootOid.enString(getOidMarshaller());
         this.objectSpecId = rootOid.getObjectSpecId();
         this.type = Type.PERSISTENT;
     }
@@ -221,7 +218,7 @@ public class ObjectAdapterMemento implem
             return;
         } 
         
-        persistentOidStr = oidMarshaller.marshal(oid);
+        persistentOidStr = oid.enString(getOidMarshaller());
         type = Type.PERSISTENT;
     }
 
@@ -287,6 +284,10 @@ public class ObjectAdapterMemento implem
     }
 
 
+    //////////////////////////////////////////////////
+    // Dependencies (from context)
+    //////////////////////////////////////////////////
+    
     private static AdapterManager getAdapterManager() {
         return getPersistenceSession().getAdapterManager();
     }
@@ -294,6 +295,11 @@ public class ObjectAdapterMemento implem
     private static PersistenceSession getPersistenceSession() {
         return IsisContext.getPersistenceSession();
     }
+
+	protected static OidMarshaller getOidMarshaller() {
+		return IsisContext.getOidMarshaller();
+	}
     
 
+
 }

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/PageParameterNames.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/PageParameterNames.java?rev=1373642&r1=1373641&r2=1373642&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/PageParameterNames.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/PageParameterNames.java Wed Aug 15 21:43:44 2012
@@ -29,14 +29,6 @@ import org.apache.isis.viewer.wicket.mod
  */
 public enum PageParameterNames {
 
-//    /**
-//     * Whether the object is persistent or not.
-//     */
-//    OBJECT_PERSISTENT,
-//    /**
-//     * The object's spec, as the fully qualified class name.
-//     */
-//    OBJECT_SPEC,
     /**
      * The object's {@link Oid}.
      * 

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java?rev=1373642&r1=1373641&r2=1373642&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java Wed Aug 15 21:43:44 2012
@@ -36,6 +36,7 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionParameter;
+import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.viewer.wicket.model.common.NoResultsHandler;
 import org.apache.isis.viewer.wicket.model.common.SelectionHandler;
 import org.apache.isis.viewer.wicket.model.mementos.ActionMemento;
@@ -88,8 +89,6 @@ public class ActionModel extends ModelAb
         SELECT
     }
 
-    private final static OidMarshaller oidMarshaller = new OidMarshaller();
-
     /**
      * Factory; for use directly.
      */
@@ -144,15 +143,15 @@ public class ActionModel extends ModelAb
         return ActionParams.compatibleWith(contextAdapter, actionParam) ? Mode.RESULTS : Mode.PARAMETERS;
     }
 
-    private static void addActionParamContextIfPossible(final ObjectAction noAction, final ObjectAdapter contextAdapter, final PageParameters pageParameters) {
+
+	private static void addActionParamContextIfPossible(final ObjectAction noAction, final ObjectAdapter contextAdapter, final PageParameters pageParameters) {
         if (contextAdapter == null) {
             return;
         }
         int i = 0;
         for (final ObjectActionParameter actionParam : noAction.getParameters()) {
             if (ActionParams.compatibleWith(contextAdapter, actionParam)) {
-                RootOid rootOid = (RootOid)contextAdapter.getOid();
-				final String oidKeyValue = "" + i + "=" + rootOid.enString();
+                final String oidKeyValue = "" + i + "=" + contextAdapter.getOid().enString(getOidMarshaller());
                 PageParameterNames.ACTION_PARAM_CONTEXT.addTo(pageParameters, oidKeyValue);
                 return;
             }
@@ -246,7 +245,7 @@ public class ActionModel extends ModelAb
     
     private static RootOid oidFor(final PageParameters pageParameters) {
         String oidStr = PageParameterNames.OBJECT_OID.getFrom(pageParameters);
-        return oidMarshaller.unmarshal(oidStr, RootOid.class);
+        return getOidMarshaller().unmarshal(oidStr, RootOid.class);
     }
 
     private ActionModel(final ObjectAdapterMemento adapterMemento, final ActionMemento actionMemento, final Mode actionMode, final SingleResultsMode singleResultsMode) {
@@ -266,19 +265,19 @@ public class ActionModel extends ModelAb
 
         final Map.Entry<Integer, String> mapEntry = parse(paramContext);
 
-        Oid oid;
         final int paramNum = mapEntry.getKey();
         if (paramNum >= parameterCount) {
             return false;
         }
 
+        RootOid oid;
         try {
-            oid = RootOidDefault.deStringEncoded(mapEntry.getValue());
+            oid = RootOidDefault.deStringEncoded(mapEntry.getValue(), getOidMarshaller());
         } catch (final Exception e) {
             return false;
         }
 
-        final ObjectAdapter argumentAdapter = getAdapterManager().getAdapterFor(oid);
+        final ObjectAdapter argumentAdapter = getAdapterManager().adapterFor(oid);
         if (argumentAdapter == null) {
             return false;
         }
@@ -444,4 +443,14 @@ public class ActionModel extends ModelAb
         this.actionMode = determineMode(actionMemento.getAction());
     }
 
+    
+    //////////////////////////////////////////////////
+    // Dependencies (from context)
+    //////////////////////////////////////////////////
+    
+    protected static OidMarshaller getOidMarshaller() {
+        return IsisContext.getOidMarshaller();
+    }
+
+
 }

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java?rev=1373642&r1=1373641&r2=1373642&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java Wed Aug 15 21:43:44 2012
@@ -48,8 +48,6 @@ public class EntityModel extends ModelAb
 
     private static final long serialVersionUID = 1L;
     
-    private static final OidMarshaller oidMarshaller  = new OidMarshaller();
-
     // //////////////////////////////////////////////////////////
     // factory methods for PageParameters
     // //////////////////////////////////////////////////////////
@@ -63,16 +61,11 @@ public class EntityModel extends ModelAb
         final PageParameters pageParameters = new PageParameters();
 
         final Boolean persistent = adapter.representsPersistent();
-        //PageParameterNames.OBJECT_PERSISTENT.addTo(pageParameters, persistent.toString());
 
         if (persistent) {
-            //final String oidStr = oidStringifier.enString((RootOid) adapter.getOid());
-            final String oidStr = oidMarshaller.marshal((RootOid) adapter.getOid());
+            final String oidStr = adapter.getOid().enString(getOidMarshaller());
 
             PageParameterNames.OBJECT_OID.addTo(pageParameters, oidStr);
-            
-            //final ObjectSpecification noSpec = adapter.getSpecification();
-            //PageParameterNames.OBJECT_SPEC.addTo(pageParameters, noSpec.getFullIdentifier());
         } else {
             // don't do anything; instead the page should be redirected back to
             // an EntityPage so that the underlying EntityModel that contains
@@ -83,7 +76,7 @@ public class EntityModel extends ModelAb
         return pageParameters;
     }
 
-    public enum Mode {
+	public enum Mode {
         VIEW, EDIT;
     }
 
@@ -121,7 +114,7 @@ public class EntityModel extends ModelAb
     }
 
     private static RootOid rootOidFrom(final PageParameters pageParameters) {
-        return oidMarshaller.unmarshal(oidStr(pageParameters), RootOid.class);
+        return getOidMarshaller().unmarshal(oidStr(pageParameters), RootOid.class);
     }
     
 
@@ -317,4 +310,14 @@ public class EntityModel extends ModelAb
         toViewMode();
     }
 
+    
+    // //////////////////////////////////////////////////////////
+    // Dependencies (from context)
+    // //////////////////////////////////////////////////////////
+
+    protected static OidMarshaller getOidMarshaller() {
+		return IsisContext.getOidMarshaller();
+	}
+
+
 }

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java?rev=1373642&r1=1373641&r2=1373642&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java Wed Aug 15 21:43:44 2012
@@ -135,6 +135,7 @@ public class ActionPanel extends PanelAb
                 if (singleResultsMode == ActionModel.SingleResultsMode.REDIRECT) {
                     panel.setResponsePage(new EntityPage(actualAdapter));
                 } else if (singleResultsMode == ActionModel.SingleResultsMode.SELECT) {
+                    panel.hideAll();
                     actionModel.getSelectionHandler().onSelected(panel, actualAdapter);
                 } else if (singleResultsMode == ActionModel.SingleResultsMode.INLINE) {
                     final ComponentType componentType = ComponentType.ENTITY;
@@ -229,4 +230,8 @@ public class ActionPanel extends PanelAb
         }
     }
 
+    private void hideAll() {
+        hideAllBut(null);
+    }
+
 }

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/dropdownchoices/DropDownChoicesForObjectAdapterMementos.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/dropdownchoices/DropDownChoicesForObjectAdapterMementos.java?rev=1373642&r1=1373641&r2=1373642&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/dropdownchoices/DropDownChoicesForObjectAdapterMementos.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/dropdownchoices/DropDownChoicesForObjectAdapterMementos.java Wed Aug 15 21:43:44 2012
@@ -22,7 +22,9 @@ package org.apache.isis.viewer.wicket.ui
 import java.util.List;
 
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
+import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
 import org.apache.isis.core.metamodel.adapter.oid.RootOid;
+import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
 import org.apache.wicket.markup.html.form.DropDownChoice;
 import org.apache.wicket.markup.html.form.IChoiceRenderer;
@@ -42,11 +44,12 @@ public class DropDownChoicesForObjectAda
         @Override
         public String getIdValue(final ObjectAdapterMemento nom, final int index) {
             final Oid oid = nom.getObjectAdapter().getOid();
-            RootOid rootOid = (RootOid) oid;
-            return rootOid.enString();
+            return oid.enString(getOidMarshaller());
         }
     }
 
+
+
     private static final long serialVersionUID = 1L;
 
     public DropDownChoicesForObjectAdapterMementos(final String id, final IModel<ObjectAdapterMemento> model, final IModel<? extends List<? extends ObjectAdapterMemento>> choices) {
@@ -61,4 +64,14 @@ public class DropDownChoicesForObjectAda
     protected boolean wantOnSelectionChangedNotifications() {
         return true;
     }
+    
+
+    
+    // //////////////////////////////////////////////////////////
+    // Dependencies (from context)
+    // //////////////////////////////////////////////////////////
+
+    protected static OidMarshaller getOidMarshaller() {
+        return IsisContext.getOidMarshaller();
+    }
 }
\ No newline at end of file

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/ConverterForObjectAdapter.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/ConverterForObjectAdapter.java?rev=1373642&r1=1373641&r2=1373642&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/ConverterForObjectAdapter.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/ConverterForObjectAdapter.java Wed Aug 15 21:43:44 2012
@@ -24,6 +24,7 @@ import java.util.Locale;
 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.core.metamodel.adapter.oid.OidMarshaller;
 import org.apache.isis.core.metamodel.adapter.oid.RootOid;
 import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
@@ -44,7 +45,7 @@ public class ConverterForObjectAdapter i
      */
     @Override
     public Object convertToObject(final String value, final Locale locale) {
-        final Oid oid = RootOidDefault.deStringEncoded(value);
+        final Oid oid = RootOidDefault.deStringEncoded(value, getOidMarshaller());
         return getAdapterManager().getAdapterFor(oid);
     }
 
@@ -60,16 +61,21 @@ public class ConverterForObjectAdapter i
             return null;
         }
         
-        RootOid rootOid = (RootOid) oid;
-        return rootOid.enString();
+        return oid.enString(getOidMarshaller());
     }
+    
+
+
+    // //////////////////////////////////////////////////////////
+    // Dependencies (from context)
+    // //////////////////////////////////////////////////////////
 
     protected AdapterManager getAdapterManager() {
-        return getPersistenceSession().getAdapterManager();
+        return IsisContext.getPersistenceSession().getAdapterManager();
     }
 
-    protected PersistenceSession getPersistenceSession() {
-        return IsisContext.getPersistenceSession();
+    protected OidMarshaller getOidMarshaller() {
+        return IsisContext.getOidMarshaller();
     }
 
 }

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/ConverterForObjectAdapterMemento.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/ConverterForObjectAdapterMemento.java?rev=1373642&r1=1373641&r2=1373642&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/ConverterForObjectAdapterMemento.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/ConverterForObjectAdapterMemento.java Wed Aug 15 21:43:44 2012
@@ -25,6 +25,7 @@ import org.apache.commons.lang.StringUti
 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.core.metamodel.adapter.oid.OidMarshaller;
 import org.apache.isis.core.metamodel.adapter.oid.RootOid;
 import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
@@ -50,7 +51,7 @@ public class ConverterForObjectAdapterMe
         if (StringUtils.isEmpty(value)) {
             return null;
         }
-        final Oid oid = RootOidDefault.deStringEncoded(value);
+        final Oid oid = RootOidDefault.deStringEncoded(value, getOidMarshaller());
         final ObjectAdapter adapter = getAdapterManager().getAdapterFor(oid);
         return ObjectAdapterMemento.createOrNull(adapter);
     }
@@ -71,9 +72,14 @@ public class ConverterForObjectAdapterMe
             // REVIEW: is this right?
             return memento.toString();
         }
-        RootOid rootOid = (RootOid) oid;
-        return rootOid.enString();
+        return oid.enString(getOidMarshaller());
     }
+    
+
+
+    // //////////////////////////////////////////////////////////
+    // Dependencies (from context)
+    // //////////////////////////////////////////////////////////
 
     protected AdapterManager getAdapterManager() {
         return getPersistenceSession().getAdapterManager();
@@ -83,4 +89,8 @@ public class ConverterForObjectAdapterMe
         return IsisContext.getPersistenceSession();
     }
 
+    protected OidMarshaller getOidMarshaller() {
+        return IsisContext.getOidMarshaller();
+    }
+
 }



Mime
View raw message