incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1244793 [1/3] - in /incubator/isis/trunk/framework: applib/src/docbkx/guide/ applib/src/main/java/org/apache/isis/applib/annotation/ core/commons/src/main/java/org/apache/isis/core/commons/config/ core/commons/src/main/java/org/apache/isis...
Date Wed, 15 Feb 2012 23:51:34 GMT
Author: danhaywood
Date: Wed Feb 15 23:51:31 2012
New Revision: 1244793

URL: http://svn.apache.org/viewvc?rev=1244793&view=rev
Log:
ISIS-189, ISIS-192, ISIS-194, ISIS-195, ISIS-196, ISIS-202, ISIS-203, ISIS-204: add Scimpi into archetype; security config file names changed; Json viewer to support object stores other than in-memory objectstore; make NoSQL object store work with json viewer (implement NoSqlOid); enhance Scimpi to work with OidWithSpecification; rename @Stable to @ViewModel; logging of property files found/not found; SQL OS connect without credentials

Added:
    incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/ViewModel.java
      - copied, changed from r1243026, incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/Stable.java
    incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/HexUtils.java   (with props)
    incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/url/
    incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/url/UrlEncodingUtils.java   (with props)
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/directly/DirectlyStringableOidWithSpecification.java   (with props)
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/directly/OidWithSpecification.java   (with props)
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/stable/ViewModelFacet.java
      - copied, changed from r1243257, incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/stable/StableFacet.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/stable/ViewModelFacetAbstract.java
      - copied, changed from r1243257, incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/stable/StableFacetAbstract.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/stable/annotation/ViewModelAnnotationFacetFactory.java
      - copied, changed from r1243257, incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/stable/annotation/StableAnnotationFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/stable/annotation/ViewModelFacetAnnotation.java
      - copied, changed from r1243257, incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/stable/annotation/StableFacetAnnotation.java
    incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/stable/ViewModelAnnotationFacetFactoryTest.java
      - copied, changed from r1243026, incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/stable/StableAnnotationFacetFactoryTest.java
    incubator/isis/trunk/framework/core/webapp/src/main/java/org/apache/isis/core/webapp/routing/RedirectToDocsFilter.java
      - copied, changed from r1234519, incubator/isis/trunk/examples/onlinedemo/webapp/src/main/java/org/apache/isis/examples/onlinedemo/filters/RedirectToDocsFilter.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlKeyCreator.java
      - copied, changed from r1243257, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/SerialKeyCreator.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlOid.java   (with props)
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlKeyCreatorTest.java
      - copied, changed from r1243257, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/SerialKeyCreatorTest.java
    incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/viewmodels/
    incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/viewmodels/SimpleViewModel.java
      - copied, changed from r1243257, incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/stables/StableEntity.java
Removed:
    incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/Stable.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/stable/StableFacet.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/stable/StableFacetAbstract.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/stable/annotation/StableAnnotationFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/stable/annotation/StableFacetAnnotation.java
    incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/stable/StableAnnotationFacetFactoryTest.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/SerialKeyCreator.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/SerialKeyCreatorTest.java
    incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/stables/StableEntity.java
    incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/stables/StableEntityRepository.java
    incubator/isis/trunk/framework/tck/tck-fixture/src/main/java/fixture/scalars/
    incubator/isis/trunk/framework/tck/tck-fixture/src/main/java/fixture/todo/
    incubator/isis/trunk/framework/tck/tck-fixture/src/main/java/org/apache/isis/tck/fixture/assoc/
    incubator/isis/trunk/framework/tck/tck-fixture/src/main/java/org/apache/isis/tck/fixture/stables/
    incubator/isis/trunk/framework/tck/tck-objstore-dflt/src/main/java/objstore/dflt/scalars/
    incubator/isis/trunk/framework/tck/tck-objstore-dflt/src/main/java/objstore/dflt/todo/
    incubator/isis/trunk/framework/tck/tck-objstore-dflt/src/main/java/org/apache/isis/tck/objstore/dflt/stables/
    incubator/isis/trunk/framework/viewer/json/json-applib/src/test/java/org/apache/isis/viewer/json/applib/blocks/
Modified:
    incubator/isis/trunk/framework/applib/src/docbkx/guide/isis-applib.xml
    incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationBuilder.java
    incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationBuilderResourceStreams.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/Oid.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/directly/DirectlyStringableOid.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/directly/OidStringifierDirect.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/hex/OidStringifierHex.java
    incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/snapshot/XmlSnapshot.java
    incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStore.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStore_serviceRegistry.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/pom.xml
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/KeyCreator.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlObjectStore.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlOidGenerator.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlPersistorMechanismInstaller.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/ObjectReader.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoPersistorMechanismInstaller.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/DestroyObjectCommandImplementationTest.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlObjectStoreTest.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlOidGeneratorTest.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/ObjectReaderTest.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/test/java/org/apache/isis/runtimes/dflt/objectstores/nosql/mongo/MongoDbTest.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlObjectStore.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlOid.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/SqlOidGenerator.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/jdbc/JdbcConnector.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/src/docbkx/guide/isis-sql-objectstore.xml
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/xml/src/main/java/org/apache/isis/runtimes/dflt/objectstores/xml/XmlObjectStore.java
    incubator/isis/trunk/framework/runtimes/dflt/remoting/common/src/main/java/org/apache/isis/runtimes/dflt/remoting/common/client/persistence/PersistenceSessionProxy.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionAbstract.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionLogger.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/IsisStoreDelegating.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/IsisStoreLogger.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/ObjectStorePersistence.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/PersistenceSessionObjectStore.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/oidgenerator/simple/SerialOid.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/persistence/PersistenceSessionHydrator.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/objectstore/ObjectStoreSpy.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/testsystem/TestProxyPersistenceSession.java
    incubator/isis/trunk/framework/runtimes/dflt/webapp/src/main/java/org/apache/isis/runtimes/dflt/webapp/IsisWebAppBootstrapper.java
    incubator/isis/trunk/framework/runtimes/dflt/webserver/src/main/java/org/apache/isis/runtimes/dflt/webserver/internal/OptionHandlerDeploymentTypeWebServer.java
    incubator/isis/trunk/framework/security/file/src/main/java/org/apache/isis/security/file/authentication/FileAuthenticationConstants.java
    incubator/isis/trunk/framework/security/file/src/main/java/org/apache/isis/security/file/authorization/FileAuthorizationConstants.java
    incubator/isis/trunk/framework/src/docbkx/guide/isis-contributors-guide.xml
    incubator/isis/trunk/framework/viewer/bdd/pom.xml
    incubator/isis/trunk/framework/viewer/dnd-tck/src/main/resources/isis.properties
    incubator/isis/trunk/framework/viewer/html-tck/src/main/webapp/WEB-INF/isis.properties
    incubator/isis/trunk/framework/viewer/json/json-applib/src/main/java/org/apache/isis/viewer/json/applib/ClientRequestConfigurer.java
    incubator/isis/trunk/framework/viewer/json/json-applib/src/main/java/org/apache/isis/viewer/json/applib/JsonRepresentation.java
    incubator/isis/trunk/framework/viewer/json/json-applib/src/main/java/org/apache/isis/viewer/json/applib/util/UrlEncodingUtils.java
    incubator/isis/trunk/framework/viewer/json/json-tck/src/main/webapp/WEB-INF/isis.properties
    incubator/isis/trunk/framework/viewer/json/json-viewer/src/main/java/org/apache/isis/viewer/json/viewer/ResourceContext.java
    incubator/isis/trunk/framework/viewer/json/json-viewer/src/main/java/org/apache/isis/viewer/json/viewer/util/OidUtils.java
    incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/ResourceContextTest_getArg.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/DefaultOidObjectMapping.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/RequestContext.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/DispatcherServlet.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-tck/src/main/webapp/WEB-INF/isis.properties
    incubator/isis/trunk/framework/viewer/wicket/wicket-tck/src/main/webapp/WEB-INF/isis.properties

Modified: incubator/isis/trunk/framework/applib/src/docbkx/guide/isis-applib.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/applib/src/docbkx/guide/isis-applib.xml?rev=1244793&r1=1244792&r2=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/applib/src/docbkx/guide/isis-applib.xml (original)
+++ incubator/isis/trunk/framework/applib/src/docbkx/guide/isis-applib.xml Wed Feb 15 23:51:31 2012
@@ -7134,31 +7134,6 @@ y}</programlisting>
       </sect1>
 
       <sect1>
-        <title>@Stable</title>
-
-        <para>The <classname>@Stable</classname> annotation allows the
-        developer to declare that any changes to an entity's structure are
-        guaranteed to be backwardly compatible.</para>
-
-        <para>It was originally introduced to support a requirement of the
-        RESTful viewers (json viewer) which directly expose the domain objects
-        as RESTful representations. The presence of this annotation allows the
-        viewer to return an application-defined media type. This would
-        typically be annotated only on non-persisted domain objects acting as
-        view models.</para>
-
-        <para>For example, a domain object that represents a summary of a
-        <classname>Customer</classname> and their most recent
-        <classname>Order</classname>s might be annotated as:</para>
-
-        <programlisting format="linespecific">@NotPersistable
-@Stable
-public class CustomerAndOrdersViewModel {
-   ...
-}</programlisting>
-      </sect1>
-
-      <sect1>
         <title>@Title</title>
 
         <para>The <literal moreinfo="none">@Title</literal> annotation is used
@@ -7282,6 +7257,29 @@ public class ComplexNumber {
         as text, and encoding/decoding (for serialization). For more
         information, see <xref linkend="chp.ValueTypes" />.</para>
       </sect1>
+
+      <sect1>
+        <title>@ViewModel</title>
+
+        <para>The <classname>@ViewModel</classname> annotation allows the
+        developer to declare that a domain object is intended to be used as a
+        view model. As such, any changes to its structure are guaranteed to be
+        backwardly compatible.</para>
+
+        <para>The annotation was originally introduced to support a
+        requirement of the RESTful viewers (json viewer) which directly expose
+        the domain objects as RESTful representations</para>
+
+        <para>For example, a domain object that represents a summary of a
+        <classname>Customer</classname> and their most recent
+        <classname>Order</classname>s might be annotated as:</para>
+
+        <programlisting format="linespecific">@NotPersistable
+@ViewModel
+public class CustomerAndOrdersViewModel {
+   ...
+}</programlisting>
+      </sect1>
     </appendix>
 
     <appendix id="apx.DomainObjectContainer">

Copied: incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/ViewModel.java (from r1243026, incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/Stable.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/ViewModel.java?p2=incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/ViewModel.java&p1=incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/Stable.java&r1=1243026&r2=1244793&rev=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/Stable.java (original)
+++ incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/ViewModel.java Wed Feb 15 23:51:31 2012
@@ -26,15 +26,14 @@ import java.lang.annotation.RetentionPol
 import java.lang.annotation.Target;
 
 /**
- * Indicates that an entity's definition is stable, such that any changes to its
- * structure will be backwardly compatible.
+ * Indicates that a domain object is intended to be used as a view model,
+ * such that any changes to its structure will be backwardly compatible.
  * 
  * <p>
- * Originally introduced to support the json-viewer's RESTful support for
- * application-defined mime types.
+ * Originally introduced to support the json-viewer's RESTful support.
  */
 @Inherited
 @Target({ ElementType.TYPE })
 @Retention(RetentionPolicy.RUNTIME)
-public @interface Stable {
+public @interface ViewModel {
 }

Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationBuilder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationBuilder.java?rev=1244793&r1=1244792&r2=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationBuilder.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationBuilder.java Wed Feb 15 23:51:31 2012
@@ -56,4 +56,9 @@ public interface IsisConfigurationBuilde
      * Note that this may be a {@link ResourceStreamSourceComposite composite}.
      */
     public ResourceStreamSource getResourceStreamSource();
+    
+    /**
+     * Log a summary of resources found or not found.
+     */
+    public void dumpResourcesToLog();
 }

Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationBuilderResourceStreams.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationBuilderResourceStreams.java?rev=1244793&r1=1244792&r2=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationBuilderResourceStreams.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationBuilderResourceStreams.java Wed Feb 15 23:51:31 2012
@@ -24,8 +24,10 @@ import java.util.ArrayList;
 import java.util.Enumeration;
 import java.util.List;
 import java.util.Properties;
+import java.util.Set;
 
 import com.google.common.base.Objects;
+import com.google.common.collect.Sets;
 
 import org.apache.log4j.Logger;
 
@@ -46,6 +48,9 @@ public class IsisConfigurationBuilderRes
 
     private static final Logger LOG = Logger.getLogger(IsisConfigurationBuilderResourceStreams.class);
 
+    private final Set<String> configurationResourcesFound = Sets.newLinkedHashSet();
+    private final Set<String> configurationResourcesNotFound = Sets.newLinkedHashSet();
+    
     static class ConfigurationResourceAndPolicy {
         private final String configurationResource;
         private final NotFoundPolicy notFoundPolicy;
@@ -234,8 +239,9 @@ public class IsisConfigurationBuilderRes
         try {
             final PropertiesReader propertiesReader = loadConfigurationResource(resourceStreamSource, configurationResource);
             addProperties(configuration, propertiesReader.getProperties());
-            if (LOG.isInfoEnabled()) {
-                LOG.info("'" + configurationResource + "' FOUND");
+            configurationResourcesFound.add(configurationResource);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("'" + configurationResource + "' FOUND");
             }
             return;
         } catch (final IOException ex) {
@@ -244,8 +250,9 @@ public class IsisConfigurationBuilderRes
         if (notFoundPolicy == NotFoundPolicy.FAIL_FAST) {
             throw new IsisException("failed to load '" + configurationResource + "'; tried using: " + resourceStreamSource.getName());
         } else {
-            if (LOG.isInfoEnabled()) {
-                LOG.info("'" + configurationResource + "' not found, but not needed");
+            configurationResourcesNotFound.add(configurationResource);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("'" + configurationResource + "' not found, but not needed");
             }
         }
     }
@@ -278,6 +285,29 @@ public class IsisConfigurationBuilderRes
         cachedConfiguration = null;
     }
 
+
+    
+    // ////////////////////////////////////////////////////////////
+    // Logging
+    // ////////////////////////////////////////////////////////////
+
+    @Override
+    public void dumpResourcesToLog() {
+        if (LOG.isInfoEnabled()) {
+            LOG.info("Configuration resources FOUND:");
+            for (String resource : configurationResourcesFound) {
+                LOG.info("*  " + resource);
+            }
+        }
+        if (LOG.isInfoEnabled()) {
+            LOG.info("Configuration resources NOT FOUND (but not needed):");
+            for (String resource : configurationResourcesNotFound) {
+                LOG.info("*  " + resource);
+            }
+        }
+    }
+
+
     // ////////////////////////////////////////////////////////////
     // Injectable
     // ////////////////////////////////////////////////////////////

Added: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/HexUtils.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/HexUtils.java?rev=1244793&view=auto
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/HexUtils.java (added)
+++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/HexUtils.java Wed Feb 15 23:51:31 2012
@@ -0,0 +1,63 @@
+/*
+ *  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.core.commons.encoding;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.codec.DecoderException;
+import org.apache.commons.codec.binary.Hex;
+
+import org.apache.isis.core.commons.exceptions.IsisException;
+
+public final class HexUtils {
+    
+    private HexUtils() {
+    }
+
+    public static String encoded(final Object object) {
+        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        final DataOutputStreamExtended outputImpl = new DataOutputStreamExtended(baos);
+        try {
+            outputImpl.writeEncodable(object);
+            final byte[] byteArray = baos.toByteArray();
+            return new String(Hex.encodeHex(byteArray));
+        } catch (final IOException e) {
+            throw new IsisException("Failed to write object", e);
+        }
+    }
+
+    public static <T> T decoded(final String hexEncoded, Class<T> cls) {
+        final char[] chars = hexEncoded.toCharArray();
+        byte[] bytes;
+        try {
+            bytes = Hex.decodeHex(chars);
+            final ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+            final DataInputStreamExtended inputImpl = new DataInputStreamExtended(bais);
+            return inputImpl.readEncodable(cls);
+        } catch (final IOException ex) {
+            throw new IsisException("Failed to read object", ex);
+        } catch (final DecoderException ex) {
+            throw new IsisException("Failed to hex decode object", ex);
+        }
+    }
+
+}

Propchange: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/HexUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/url/UrlEncodingUtils.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/url/UrlEncodingUtils.java?rev=1244793&view=auto
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/url/UrlEncodingUtils.java (added)
+++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/url/UrlEncodingUtils.java Wed Feb 15 23:51:31 2012
@@ -0,0 +1,58 @@
+/*
+ *  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.core.commons.url;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.net.URLEncoder;
+
+import com.google.common.base.Charsets;
+import com.google.common.base.Function;
+
+public final class UrlEncodingUtils {
+
+    public final static Function<String, String> FUNCTION = new Function<String, String>() {
+
+        @Override
+        public String apply(final String input) {
+            try {
+                return URLDecoder.decode(input, "UTF-8");
+            } catch (final UnsupportedEncodingException e) {
+                return "";
+            }
+        }
+    };
+
+    private UrlEncodingUtils() {
+    }
+
+    public static String urlDecode(final String string) {
+        return FUNCTION.apply(string);
+    }
+
+    public static String urlEncode(final String str) {
+        try {
+            return URLEncoder.encode(str, Charsets.UTF_8.name());
+        } catch (final UnsupportedEncodingException e) {
+            // shouldn't happen
+            throw new RuntimeException(e);
+        }
+    }
+
+}

Propchange: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/url/UrlEncodingUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/Oid.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/Oid.java?rev=1244793&r1=1244792&r2=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/Oid.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/Oid.java Wed Feb 15 23:51:31 2012
@@ -31,6 +31,9 @@ public interface Oid extends Encodable {
      * After this call the {@link #hashCode()} return by both the specified
      * object and this object will be the same, and both objects will be
      * {@link #equals(Object) equal}.
+     * 
+     * <p>
+     * Only ever used by client-server remoting.
      */
     void copyFrom(Oid oid);
 

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/directly/DirectlyStringableOid.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/directly/DirectlyStringableOid.java?rev=1244793&r1=1244792&r2=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/directly/DirectlyStringableOid.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/directly/DirectlyStringableOid.java Wed Feb 15 23:51:31 2012
@@ -27,9 +27,13 @@ import org.apache.isis.core.metamodel.ad
  * that can be encoded/decoded from strings.
  * 
  * <p>
- * This is inspired by the DSFA's implementation that uses <tt>CUS|1234567A</tt>
- * as the string representation of their <tt>OStoreOid</tt>, representing a
- * Customer.
+ * Implementations must also provide a static deString(String) factory method.
+ * 
+ * <p>
+ * Somewhat akin to DSP's oid that is of the form <tt>CUS|1234567A</tt>,
+ * where the overall form is a simple string.
+ * 
+ * @see OidWithSpecification
  */
 public interface DirectlyStringableOid extends Oid {
 

Added: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/directly/DirectlyStringableOidWithSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/directly/DirectlyStringableOidWithSpecification.java?rev=1244793&view=auto
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/directly/DirectlyStringableOidWithSpecification.java (added)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/directly/DirectlyStringableOidWithSpecification.java Wed Feb 15 23:51:31 2012
@@ -0,0 +1,35 @@
+/*
+ *  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.core.metamodel.adapter.oid.stringable.directly;
+
+
+/**
+ * Combines {@link DirectlyStringableOid} and {@link OidWithSpecification}.
+ * 
+ * <p>
+ * As such, is directly akin to the DSP's oid that is of the form 
+ * <tt>CUS|1234567A</tt>, where the overall form is a simple string
+ * and also identifies the type of the object.
+ * 
+ * @see OidWithSpecification
+ */
+public interface DirectlyStringableOidWithSpecification extends DirectlyStringableOid, OidWithSpecification {
+
+}

Propchange: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/directly/DirectlyStringableOidWithSpecification.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/directly/OidStringifierDirect.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/directly/OidStringifierDirect.java?rev=1244793&r1=1244792&r2=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/directly/OidStringifierDirect.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/directly/OidStringifierDirect.java Wed Feb 15 23:51:31 2012
@@ -28,6 +28,7 @@ import java.lang.reflect.Method;
 
 import org.apache.isis.core.commons.ensure.Ensure;
 import org.apache.isis.core.commons.lang.JavaClassUtils;
+import org.apache.isis.core.commons.url.UrlEncodingUtils;
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
 import org.apache.isis.core.metamodel.adapter.oid.stringable.OidStringifier;
 
@@ -61,11 +62,14 @@ public class OidStringifierDirect implem
             throw new IllegalArgumentException("Must be DirectlyStringableOid; oid class: " + oid.getClass().getName());
         }
         final DirectlyStringableOid directlyStringableOid = (DirectlyStringableOid) oid;
+        // it isn't necessary to URL encode here; the browser will do encoding for us
         return directlyStringableOid.enString();
     }
 
     @Override
-    public Oid deString(final String oidStr) {
+    public Oid deString(final String urlEncodedOidStr) {
+        // we do need to URL decode here, though.
+        final String oidStr = UrlEncodingUtils.urlDecode(urlEncodedOidStr);
         try {
             return (Oid) deStringMethod.invoke(null, oidStr);
         } catch (final IllegalAccessException ex) {

Added: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/directly/OidWithSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/directly/OidWithSpecification.java?rev=1244793&view=auto
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/directly/OidWithSpecification.java (added)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/directly/OidWithSpecification.java Wed Feb 15 23:51:31 2012
@@ -0,0 +1,39 @@
+/*
+ *  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.core.metamodel.adapter.oid.stringable.directly;
+
+import org.apache.isis.core.metamodel.adapter.oid.Oid;
+
+/**
+ * Defines an {@link Oid} implementation that is self-describing,
+ * such that it can be used to recreate an adapter/pojo with
+ * no further information.
+ * 
+ * <p>
+ * Somewhat akin to DSP's oid that is of the form <tt>CUS|1234567A</tt>,
+ * where the "CUS" stands for the specification.
+ * 
+ * @see DirectlyStringableOid
+ */
+public interface OidWithSpecification extends Oid {
+
+    String getClassName();
+
+}

Propchange: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/directly/OidWithSpecification.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/hex/OidStringifierHex.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/hex/OidStringifierHex.java?rev=1244793&r1=1244792&r2=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/hex/OidStringifierHex.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/stringable/hex/OidStringifierHex.java Wed Feb 15 23:51:31 2012
@@ -19,16 +19,7 @@
 
 package org.apache.isis.core.metamodel.adapter.oid.stringable.hex;
 
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-
-import org.apache.commons.codec.DecoderException;
-import org.apache.commons.codec.binary.Hex;
-
-import org.apache.isis.core.commons.encoding.DataInputStreamExtended;
-import org.apache.isis.core.commons.encoding.DataOutputStreamExtended;
-import org.apache.isis.core.commons.exceptions.IsisException;
+import org.apache.isis.core.commons.encoding.HexUtils;
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
 import org.apache.isis.core.metamodel.adapter.oid.stringable.OidStringifier;
 
@@ -36,31 +27,12 @@ public class OidStringifierHex implement
 
     @Override
     public String enString(final Oid oid) {
-        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        final DataOutputStreamExtended outputImpl = new DataOutputStreamExtended(baos);
-        try {
-            outputImpl.writeEncodable(oid);
-            final byte[] byteArray = baos.toByteArray();
-            return new String(Hex.encodeHex(byteArray));
-        } catch (final IOException e) {
-            throw new IsisException("Failed to write object", e);
-        }
+        return HexUtils.encoded(oid);
     }
 
     @Override
     public Oid deString(final String oidStr) {
-        final char[] oidCharArray = oidStr.toCharArray();
-        byte[] oidBytes;
-        try {
-            oidBytes = Hex.decodeHex(oidCharArray);
-            final ByteArrayInputStream bais = new ByteArrayInputStream(oidBytes);
-            final DataInputStreamExtended inputImpl = new DataInputStreamExtended(bais);
-            return inputImpl.readEncodable(Oid.class);
-        } catch (final IOException ex) {
-            throw new IsisException("Failed to read object", ex);
-        } catch (final DecoderException ex) {
-            throw new IsisException("Failed to hex decode object", ex);
-        }
+        return HexUtils.decoded(oidStr, Oid.class);
     }
 
 }

Copied: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/stable/ViewModelFacet.java (from r1243257, incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/stable/StableFacet.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/stable/ViewModelFacet.java?p2=incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/stable/ViewModelFacet.java&p1=incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/stable/StableFacet.java&r1=1243257&r2=1244793&rev=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/stable/StableFacet.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/stable/ViewModelFacet.java Wed Feb 15 23:51:31 2012
@@ -22,13 +22,13 @@ package org.apache.isis.core.metamodel.f
 import org.apache.isis.core.metamodel.facets.MarkerFacet;
 
 /**
- * Indicates that this class is stable, that is, any changes to its structure
+ * Indicates that this class is a view model, that is, any changes to its structure
  * will be backwards compatible.
  * 
  * <p>
  * In the standard Apache Isis Programming Model, typically corresponds to
- * applying the <tt>@Stable</tt> annotation at the class level.
+ * applying the <tt>@ViewModel</tt> annotation at the class level.
  */
-public interface StableFacet extends MarkerFacet {
+public interface ViewModelFacet extends MarkerFacet {
 
 }

Copied: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/stable/ViewModelFacetAbstract.java (from r1243257, incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/stable/StableFacetAbstract.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/stable/ViewModelFacetAbstract.java?p2=incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/stable/ViewModelFacetAbstract.java&p1=incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/stable/StableFacetAbstract.java&r1=1243257&r2=1244793&rev=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/stable/StableFacetAbstract.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/stable/ViewModelFacetAbstract.java Wed Feb 15 23:51:31 2012
@@ -23,13 +23,13 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.MarkerFacetAbstract;
 
-public abstract class StableFacetAbstract extends MarkerFacetAbstract implements StableFacet {
+public abstract class ViewModelFacetAbstract extends MarkerFacetAbstract implements ViewModelFacet {
 
     public static Class<? extends Facet> type() {
-        return StableFacet.class;
+        return ViewModelFacet.class;
     }
 
-    public StableFacetAbstract(final FacetHolder holder) {
+    public ViewModelFacetAbstract(final FacetHolder holder) {
         super(type(), holder);
     }
 

Copied: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/stable/annotation/ViewModelAnnotationFacetFactory.java (from r1243257, incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/stable/annotation/StableAnnotationFacetFactory.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/stable/annotation/ViewModelAnnotationFacetFactory.java?p2=incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/stable/annotation/ViewModelAnnotationFacetFactory.java&p1=incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/stable/annotation/StableAnnotationFacetFactory.java&r1=1243257&r2=1244793&rev=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/stable/annotation/StableAnnotationFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/stable/annotation/ViewModelAnnotationFacetFactory.java Wed Feb 15 23:51:31 2012
@@ -19,27 +19,27 @@
 
 package org.apache.isis.core.progmodel.facets.object.stable.annotation;
 
-import org.apache.isis.applib.annotation.Stable;
+import org.apache.isis.applib.annotation.ViewModel;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facetapi.FacetUtil;
 import org.apache.isis.core.metamodel.facetapi.FeatureType;
 import org.apache.isis.core.metamodel.facets.AnnotationBasedFacetFactoryAbstract;
-import org.apache.isis.core.metamodel.facets.object.stable.StableFacet;
+import org.apache.isis.core.metamodel.facets.object.stable.ViewModelFacet;
 
-public class StableAnnotationFacetFactory extends AnnotationBasedFacetFactoryAbstract {
+public class ViewModelAnnotationFacetFactory extends AnnotationBasedFacetFactoryAbstract {
 
-    public StableAnnotationFacetFactory() {
+    public ViewModelAnnotationFacetFactory() {
         super(FeatureType.OBJECTS_ONLY);
     }
 
     @Override
     public void process(final ProcessClassContext processClassContaxt) {
-        final Stable annotation = getAnnotation(processClassContaxt.getCls(), Stable.class);
+        final ViewModel annotation = getAnnotation(processClassContaxt.getCls(), ViewModel.class);
         FacetUtil.addFacet(create(annotation, processClassContaxt.getFacetHolder()));
     }
 
-    private StableFacet create(final Stable annotation, final FacetHolder holder) {
-        return annotation == null ? null : new StableFacetAnnotation(holder);
+    private ViewModelFacet create(final ViewModel annotation, final FacetHolder holder) {
+        return annotation == null ? null : new ViewModelFacetAnnotation(holder);
     }
 
 }

Copied: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/stable/annotation/ViewModelFacetAnnotation.java (from r1243257, incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/stable/annotation/StableFacetAnnotation.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/stable/annotation/ViewModelFacetAnnotation.java?p2=incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/stable/annotation/ViewModelFacetAnnotation.java&p1=incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/stable/annotation/StableFacetAnnotation.java&r1=1243257&r2=1244793&rev=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/stable/annotation/StableFacetAnnotation.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/stable/annotation/ViewModelFacetAnnotation.java Wed Feb 15 23:51:31 2012
@@ -20,11 +20,11 @@
 package org.apache.isis.core.progmodel.facets.object.stable.annotation;
 
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.object.stable.StableFacetAbstract;
+import org.apache.isis.core.metamodel.facets.object.stable.ViewModelFacetAbstract;
 
-public class StableFacetAnnotation extends StableFacetAbstract {
+public class ViewModelFacetAnnotation extends ViewModelFacetAbstract {
 
-    public StableFacetAnnotation(final FacetHolder holder) {
+    public ViewModelFacetAnnotation(final FacetHolder holder) {
         super(holder);
     }
 

Copied: incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/stable/ViewModelAnnotationFacetFactoryTest.java (from r1243026, incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/stable/StableAnnotationFacetFactoryTest.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/stable/ViewModelAnnotationFacetFactoryTest.java?p2=incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/stable/ViewModelAnnotationFacetFactoryTest.java&p1=incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/stable/StableAnnotationFacetFactoryTest.java&r1=1243026&r2=1244793&rev=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/stable/StableAnnotationFacetFactoryTest.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/stable/ViewModelAnnotationFacetFactoryTest.java Wed Feb 15 23:51:31 2012
@@ -19,23 +19,23 @@
 
 package org.apache.isis.core.progmodel.facets.object.stable;
 
-import org.apache.isis.applib.annotation.Stable;
+import org.apache.isis.applib.annotation.ViewModel;
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facets.FacetFactory.ProcessClassContext;
-import org.apache.isis.core.metamodel.facets.object.stable.StableFacet;
+import org.apache.isis.core.metamodel.facets.object.stable.ViewModelFacet;
 import org.apache.isis.core.progmodel.facets.AbstractFacetFactoryTest;
-import org.apache.isis.core.progmodel.facets.object.stable.annotation.StableAnnotationFacetFactory;
-import org.apache.isis.core.progmodel.facets.object.stable.annotation.StableFacetAnnotation;
+import org.apache.isis.core.progmodel.facets.object.stable.annotation.ViewModelAnnotationFacetFactory;
+import org.apache.isis.core.progmodel.facets.object.stable.annotation.ViewModelFacetAnnotation;
 
-public class StableAnnotationFacetFactoryTest extends AbstractFacetFactoryTest {
+public class ViewModelAnnotationFacetFactoryTest extends AbstractFacetFactoryTest {
 
-    private StableAnnotationFacetFactory facetFactory;
+    private ViewModelAnnotationFacetFactory facetFactory;
 
     @Override
     protected void setUp() throws Exception {
         super.setUp();
 
-        facetFactory = new StableAnnotationFacetFactory();
+        facetFactory = new ViewModelAnnotationFacetFactory();
     }
 
     @Override
@@ -45,15 +45,15 @@ public class StableAnnotationFacetFactor
     }
 
     public void testStableAnnotationPickedUpOnClassAndDefaultsToAlways() {
-        @Stable
+        @ViewModel
         class Customer {
         }
 
         facetFactory.process(new ProcessClassContext(Customer.class, methodRemover, facetedMethod));
 
-        final Facet facet = facetedMethod.getFacet(StableFacet.class);
+        final Facet facet = facetedMethod.getFacet(ViewModelFacet.class);
         assertNotNull(facet);
-        assertTrue(facet instanceof StableFacetAnnotation);
+        assertTrue(facet instanceof ViewModelFacetAnnotation);
 
         assertNoMethodsRemoved();
     }

Modified: incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/snapshot/XmlSnapshot.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/snapshot/XmlSnapshot.java?rev=1244793&r1=1244792&r2=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/snapshot/XmlSnapshot.java (original)
+++ incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/snapshot/XmlSnapshot.java Wed Feb 15 23:51:31 2012
@@ -511,12 +511,12 @@ public class XmlSnapshot {
         // case.
     }
 
-    private String log(final String label, final ObjectAdapter object) {
-        return log(label, (object == null ? "(null)" : object.titleString() + "[" + oidOrHashCode(object) + "]"));
+    private String log(final String label, final ObjectAdapter adapter) {
+        return log(label, (adapter == null ? "(null)" : adapter.titleString() + "[" + oidAsString(adapter) + "]"));
     }
 
-    private String log(final String label, final Object object) {
-        return (label == null ? "?" : label) + "='" + (object == null ? "(null)" : object.toString()) + "'";
+    private String log(final String label, final Object pojo) {
+        return (label == null ? "?" : label) + "='" + (pojo == null ? "(null)" : pojo.toString()) + "'";
     }
 
     /**
@@ -610,7 +610,7 @@ public class XmlSnapshot {
 
         final Place place = new Place(object, element);
 
-        isisMetaModel.setAttributesForClass(element, oidOrHashCode(object).toString());
+        isisMetaModel.setAttributesForClass(element, oidAsString(object).toString());
 
         final List<ObjectAssociation> fields = nos.getAssociations();
         if (LOG.isDebugEnabled()) {
@@ -799,21 +799,13 @@ public class XmlSnapshot {
         return place;
     }
 
-    private String oidOrHashCode(final ObjectAdapter object) {
+    private String oidAsString(final ObjectAdapter object) {
         final Oid oid = object.getOid();
-        /*
-         * if (oid == null) { return "" + object.hashCode(); }
-         */
         if (oid instanceof DirectlyStringableOid) {
             final DirectlyStringableOid directlyStringableOid = (DirectlyStringableOid) oid;
             return directlyStringableOid.enString();
-        } else {
-            return oid.toString();
-        }
-        /*
-         * InlineTransferableWriter itw = new InlineTransferableWriter();
-         * oid.writeData(itw); itw.close(); return itw.toString();
-         */
+        } 
+        return oid.toString();
     }
 
     /**

Copied: incubator/isis/trunk/framework/core/webapp/src/main/java/org/apache/isis/core/webapp/routing/RedirectToDocsFilter.java (from r1234519, incubator/isis/trunk/examples/onlinedemo/webapp/src/main/java/org/apache/isis/examples/onlinedemo/filters/RedirectToDocsFilter.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/webapp/src/main/java/org/apache/isis/core/webapp/routing/RedirectToDocsFilter.java?p2=incubator/isis/trunk/framework/core/webapp/src/main/java/org/apache/isis/core/webapp/routing/RedirectToDocsFilter.java&p1=incubator/isis/trunk/examples/onlinedemo/webapp/src/main/java/org/apache/isis/examples/onlinedemo/filters/RedirectToDocsFilter.java&r1=1234519&r2=1244793&rev=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/webapp/src/main/java/org/apache/isis/examples/onlinedemo/filters/RedirectToDocsFilter.java (original)
+++ incubator/isis/trunk/framework/core/webapp/src/main/java/org/apache/isis/core/webapp/routing/RedirectToDocsFilter.java Wed Feb 15 23:51:31 2012
@@ -1,4 +1,4 @@
-package org.apache.isis.examples.onlinedemo.filters;
+package org.apache.isis.core.webapp.routing;
 
 import java.io.IOException;
 

Modified: incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java?rev=1244793&r1=1244792&r2=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java (original)
+++ incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java Wed Feb 15 23:51:31 2012
@@ -100,7 +100,7 @@ import org.apache.isis.core.progmodel.fa
 import org.apache.isis.core.progmodel.facets.object.plural.annotation.PluralAnnotationFacetFactory;
 import org.apache.isis.core.progmodel.facets.object.plural.staticmethod.PluralMethodFacetFactory;
 import org.apache.isis.core.progmodel.facets.object.regex.annotation.RegExFacetAnnotationForTypeFacetFactory;
-import org.apache.isis.core.progmodel.facets.object.stable.annotation.StableAnnotationFacetFactory;
+import org.apache.isis.core.progmodel.facets.object.stable.annotation.ViewModelAnnotationFacetFactory;
 import org.apache.isis.core.progmodel.facets.object.title.TitleMethodFacetFactory;
 import org.apache.isis.core.progmodel.facets.object.title.annotation.TitleAnnotationFacetFactory;
 import org.apache.isis.core.progmodel.facets.object.typicallen.annotation.TypicalLengthAnnotationOnTypeFacetFactory;
@@ -300,7 +300,7 @@ public class ProgrammingModelFacetsJava5
 
         addFactory(ImmutableMarkerInterfacesFacetFactory.class);
 
-        addFactory(StableAnnotationFacetFactory.class);
+        addFactory(ViewModelAnnotationFacetFactory.class);
 
         addFactory(MaxLengthAnnotationForTypeFacetFactory.class);
         addFactory(MaxLengthAnnotationForPropertyFacetFactory.class);

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStore.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStore.java?rev=1244793&r1=1244792&r2=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStore.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStore.java Wed Feb 15 23:51:31 2012
@@ -371,7 +371,7 @@ public class InMemoryObjectStore impleme
     // ///////////////////////////////////////////////////////
 
     @Override
-    public Oid getOidForService(final String name) {
+    public Oid getOidForService(ObjectSpecification serviceSpecification, final String name) {
         return persistedObjects.getService(name);
     }
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStore_serviceRegistry.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStore_serviceRegistry.java?rev=1244793&r1=1244792&r2=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStore_serviceRegistry.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStore_serviceRegistry.java Wed Feb 15 23:51:31 2012
@@ -19,23 +19,36 @@
 
 package org.apache.isis.runtimes.dflt.objectstores.dflt;
 
+import org.jmock.Mockery;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.junit.Before;
+
 import org.apache.isis.core.commons.exceptions.IsisException;
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.runtimes.dflt.runtime.testsystem.TestProxyOid;
 
 public class InMemoryObjectStore_serviceRegistry extends AbstractInMemoryObjectStoreTest {
 
+    private Mockery context = new JUnit4Mockery();
+    
     private TestProxyOid oid14;
+    private ObjectSpecification serviceSpecification;
 
-    public void noServicesRegisteredWhenEmpty() throws Exception {
-        final Oid oidForService = store.getOidForService("service name");
+    public void setUp() throws Exception {
+        super.setUp();
+        serviceSpecification = context.mock(ObjectSpecification.class);
+    }
+    
+    public void testServicesRegisteredWhenEmpty() throws Exception {
+        final Oid oidForService = store.getOidForService(serviceSpecification, "service name");
         assertEquals(null, oidForService);
     }
 
     public void testOidForService() throws Exception {
         registerService14();
 
-        final Oid oidForService = store.getOidForService("service name");
+        final Oid oidForService = store.getOidForService(serviceSpecification, "service name");
         assertEquals(oid14, oidForService);
     }
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/pom.xml?rev=1244793&r1=1244792&r2=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/pom.xml (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/pom.xml Wed Feb 15 23:51:31 2012
@@ -201,6 +201,11 @@
 
 
         <!--  test dependencies -->
+        <dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>testsupport</artifactId>
+            <scope>test</scope>
+        </dependency>
 
         <dependency>
             <groupId>org.apache.isis.runtimes.dflt</groupId>

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/KeyCreator.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/KeyCreator.java?rev=1244793&r1=1244792&r2=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/KeyCreator.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/KeyCreator.java Wed Feb 15 23:51:31 2012
@@ -21,6 +21,7 @@ package org.apache.isis.runtimes.dflt.ob
 
 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.stringable.directly.OidWithSpecification;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 
 public interface KeyCreator {
@@ -29,9 +30,9 @@ public interface KeyCreator {
 
     String reference(ObjectAdapter object);
 
-    Oid oid(String id);
+    OidWithSpecification oid(ObjectSpecification objectSpecification, String id);
 
-    Oid oidFromReference(String ref);
+    OidWithSpecification oidFromReference(String ref);
 
     ObjectSpecification specificationFromReference(String ref);
 

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlKeyCreator.java (from r1243257, incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/SerialKeyCreator.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlKeyCreator.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlKeyCreator.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/SerialKeyCreator.java&r1=1243257&r2=1244793&rev=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/SerialKeyCreator.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlKeyCreator.java Wed Feb 15 23:51:31 2012
@@ -21,49 +21,58 @@ package org.apache.isis.runtimes.dflt.ob
 
 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.stringable.directly.OidWithSpecification;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.SpecificationLoader;
 import org.apache.isis.runtimes.dflt.runtime.persistence.oidgenerator.simple.SerialOid;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 
-public class SerialKeyCreator implements KeyCreator {
+public class NoSqlKeyCreator implements KeyCreator {
 
     @Override
     public String key(final Oid oid) {
         if (oid.isTransient()) {
             throw new NoSqlStoreException("Oid is not for a persistent object: " + oid);
         }
-        if (oid instanceof SerialOid) {
-            final long serialNo = ((SerialOid) oid).getSerialNo();
+        if (oid instanceof NoSqlOid) {
+            NoSqlOid noSqlOid = (NoSqlOid) oid;
+            final long serialNo = noSqlOid.getSerialNo();
             return Long.toString(serialNo, 16);
         } else {
-            throw new NoSqlStoreException("Oid is not a SerialOid: " + oid);
+            throw new NoSqlStoreException("Oid is not a NoSqlOid: " + oid);
         }
     }
 
     @Override
-    public String reference(final ObjectAdapter object) {
+    public String reference(final ObjectAdapter adapter) {
         try {
-            return object.getSpecification().getFullIdentifier() + "@" + key(object.getOid());
+            return adapter.getSpecification().getFullIdentifier() + "@" + key(adapter.getOid());
         } catch (final NoSqlStoreException e) {
-            throw new NoSqlStoreException("Failed to create refence for " + object, e);
+            throw new NoSqlStoreException("Failed to create refence for " + adapter, e);
         }
     }
 
     @Override
-    public SerialOid oid(final String id) {
-        return SerialOid.createPersistent(Long.valueOf(id, 16).longValue());
+    public OidWithSpecification oid(ObjectSpecification objectSpecification, final String id) {
+        final SerialOid serialOid = SerialOid.createPersistent(Long.valueOf(id, 16).longValue());
+        return new NoSqlOid(objectSpecification.getFullIdentifier(), serialOid);
     }
 
     @Override
-    public Oid oidFromReference(final String ref) {
+    public OidWithSpecification oidFromReference(final String ref) {
+        final ObjectSpecification objectSpecification = specificationFromReference(ref);
         final String id = ref.split("@")[1];
-        return oid(id);
+        return oid(objectSpecification, id);
     }
 
     @Override
     public ObjectSpecification specificationFromReference(final String ref) {
         final String name = ref.split("@")[0];
-        return IsisContext.getSpecificationLoader().loadSpecification(name);
+        return getSpecificationLoader().loadSpecification(name);
+    }
+
+    protected SpecificationLoader getSpecificationLoader() {
+        return IsisContext.getSpecificationLoader();
     }
 
 }

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlObjectStore.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlObjectStore.java?rev=1244793&r1=1244792&r2=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlObjectStore.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlObjectStore.java Wed Feb 15 23:51:31 2012
@@ -44,6 +44,7 @@ import org.apache.isis.runtimes.dflt.run
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
 
 public class NoSqlObjectStore implements ObjectStore {
+    
     private final NoSqlDataDatabase database;
     private final Map<String, Oid> serviceCache = new HashMap<String, Oid>();
     private final KeyCreator keyCreator;
@@ -152,11 +153,11 @@ public class NoSqlObjectStore implements
     }
 
     @Override
-    public Oid getOidForService(final String name) {
+    public Oid getOidForService(ObjectSpecification serviceSpecification, final String name) {
         Oid oid = serviceCache.get(name);
         if (oid == null) {
             final String id = database.getService(name);
-            oid = id == null ? null : keyCreator.oid(id);
+            oid = id == null ? null : keyCreator.oid(serviceSpecification, id);
             serviceCache.put(name, oid);
         }
         return oid;

Added: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlOid.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlOid.java?rev=1244793&view=auto
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlOid.java (added)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlOid.java Wed Feb 15 23:51:31 2012
@@ -0,0 +1,127 @@
+/*
+ *  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.objectstores.nosql;
+
+import java.io.IOException;
+
+import org.apache.isis.core.commons.encoding.DataInputExtended;
+import org.apache.isis.core.commons.encoding.DataOutputExtended;
+import org.apache.isis.core.metamodel.adapter.oid.Oid;
+import org.apache.isis.core.metamodel.adapter.oid.stringable.directly.DirectlyStringableOidWithSpecification;
+import org.apache.isis.runtimes.dflt.runtime.persistence.oidgenerator.simple.SerialOid;
+
+public class NoSqlOid implements DirectlyStringableOidWithSpecification {
+
+    private SerialOid serialOid;
+    private String className;
+    
+    public NoSqlOid(String className, SerialOid serialOid) {
+        this.className = className;
+        this.serialOid = serialOid;
+    }
+
+    // ////////////////////////////////////////////
+    // Oid
+    // ////////////////////////////////////////////
+
+    @Override
+    public void copyFrom(Oid oid) {
+        NoSqlOid other = (NoSqlOid) oid;
+        this.serialOid = other.serialOid;
+    }
+
+    @Override
+    public Oid getPrevious() {
+        return new NoSqlOid(className, (SerialOid) serialOid.getPrevious());
+    }
+
+    @Override
+    public boolean hasPrevious() {
+        return serialOid.hasPrevious();
+    }
+
+    @Override
+    public void clearPrevious() {
+        serialOid.clearPrevious();
+    }
+
+    @Override
+    public boolean isTransient() {
+        return serialOid.isTransient();
+    }
+
+    @Override
+    public void makePersistent() {
+        serialOid.makePersistent();
+    }
+
+    // ////////////////////////////////////////////
+    // Encodable (Oid)
+    // ////////////////////////////////////////////
+
+    public NoSqlOid(final DataInputExtended input) throws IOException {
+        this.className = input.readUTF();
+        this.serialOid = new SerialOid(input);
+    }
+
+    @Override
+    public void encode(DataOutputExtended outputStream) throws IOException {
+        outputStream.writeUTF(className);
+        serialOid.encode(outputStream);
+    }
+
+    // ////////////////////////////////////////////
+    // OidWithSpecification
+    // ////////////////////////////////////////////
+
+    @Override
+    public String getClassName() {
+        return className;
+    }
+
+    // ////////////////////////////////////////////
+    // Delegate to underlying SerialOid
+    // ////////////////////////////////////////////
+
+    public long getSerialNo() {
+        return serialOid.getSerialNo();
+    }
+
+    public void setId(long persistentId) {
+        serialOid.setId(persistentId);
+    }
+
+    // ////////////////////////////////////////////
+    // Directly Stringable
+    // ////////////////////////////////////////////
+
+    public static NoSqlOid deString(String oidStr) {
+        final String[] split = oidStr.split("~");
+        return new NoSqlOid(split[0], SerialOid.deString(split[1]));
+    }
+    
+    @Override
+    public String enString() {
+        return className + "~" + serialOid.enString();
+    }
+
+
+
+
+}

Propchange: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlOid.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlOidGenerator.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlOidGenerator.java?rev=1244793&r1=1244792&r2=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlOidGenerator.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlOidGenerator.java Wed Feb 15 23:51:31 2012
@@ -26,8 +26,12 @@ import org.apache.isis.core.commons.ensu
 import org.apache.isis.core.commons.exceptions.NotYetImplementedException;
 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.stringable.directly.OidStringifierDirect;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.SpecificationLoader;
 import org.apache.isis.runtimes.dflt.runtime.persistence.oidgenerator.OidGeneratorAbstract;
 import org.apache.isis.runtimes.dflt.runtime.persistence.oidgenerator.simple.SerialOid;
+import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 
 public class NoSqlOidGenerator extends OidGeneratorAbstract {
     private static final Logger LOG = Logger.getLogger(NoSqlOidGenerator.class);
@@ -92,13 +96,16 @@ public class NoSqlOidGenerator extends O
     }
 
     public NoSqlOidGenerator(final NoSqlDataDatabase database, final int initialTransientId, final int batchSize) {
+        super(new OidStringifierDirect(NoSqlOid.class));
         this.database = database;
         ids = new IdNumbers(initialTransientId, batchSize);
     }
 
     @Override
-    public SerialOid createTransientOid(final Object object) {
-        return SerialOid.createTransient(ids.nextTransientId());
+    public NoSqlOid createTransientOid(final Object object) {
+        final ObjectSpecification objectSpec = getSpecificationLoader().loadSpecification(object.getClass());
+        final String className = objectSpec.getCorrespondingClass().getName();
+        return new NoSqlOid(className, SerialOid.createTransient(ids.nextTransientId()));
     }
 
     @Override
@@ -114,8 +121,9 @@ public class NoSqlOidGenerator extends O
             return;
         }
         final long persistentId = ids.nextPersistentId(database);
-        ((SerialOid) oid).setId(persistentId);
-        ((SerialOid) oid).makePersistent();
+        final NoSqlOid noSqlOid = (NoSqlOid) oid;
+        noSqlOid.setId(persistentId);
+        noSqlOid.makePersistent();
     }
 
     public void convertPersistentToTransientOid(final Oid oid) {
@@ -138,4 +146,10 @@ public class NoSqlOidGenerator extends O
     public String debugTitle() {
         return "NoSql OID Generator";
     }
+    
+    protected SpecificationLoader getSpecificationLoader() {
+        return IsisContext.getSpecificationLoader();
+    }
+
+
 }

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlPersistorMechanismInstaller.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlPersistorMechanismInstaller.java?rev=1244793&r1=1244792&r2=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlPersistorMechanismInstaller.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlPersistorMechanismInstaller.java Wed Feb 15 23:51:31 2012
@@ -109,8 +109,8 @@ public abstract class NoSqlPersistorMech
 
     protected abstract NoSqlDataDatabase createNoSqlDatabase(IsisConfiguration configuration);
 
-    protected SerialKeyCreator createKeyCreator() {
-        return new SerialKeyCreator();
+    protected NoSqlKeyCreator createKeyCreator() {
+        return new NoSqlKeyCreator();
     }
 
     private VersionCreator createVersionCreator() {

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/ObjectReader.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/ObjectReader.java?rev=1244793&r1=1244792&r2=1244793&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/ObjectReader.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/ObjectReader.java Wed Feb 15 23:51:31 2012
@@ -27,26 +27,29 @@ import org.apache.isis.core.metamodel.ad
 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.Oid;
+import org.apache.isis.core.metamodel.adapter.oid.stringable.directly.OidWithSpecification;
 import org.apache.isis.core.metamodel.adapter.version.Version;
 import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacet;
 import org.apache.isis.core.metamodel.facets.object.encodeable.EncodableFacet;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.SpecificationLoader;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociationContainer;
 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.runtimes.dflt.runtime.system.persistence.AdapterManager;
+import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
 
 class ObjectReader {
 
     public ObjectAdapter load(final StateReader reader, final KeyCreator keyCreator, final VersionCreator versionCreator, final Map<String, DataEncryption> dataEncrypters) {
         final String className = reader.readObjectType();
-        final ObjectSpecification specification = IsisContext.getSpecificationLoader().loadSpecification(className);
+        final ObjectSpecification specification = getSpecificationLoader().loadSpecification(className);
         final String id = reader.readId();
-        final Oid oid = keyCreator.oid(id);
-
-        final ObjectAdapter object = getAdapter(specification, oid);
+        final OidWithSpecification oid = keyCreator.oid(specification, id);
+        
+        final ObjectAdapter object = getAdapter(oid);
         if (object.getResolveState().isResolved()) {
             Version version = null;
             final String versionString = reader.readVersion();
@@ -123,7 +126,7 @@ class ObjectReader {
 
     private ObjectAdapter restoreAggregatedObject(final StateReader aggregateReader, final Oid oid, final KeyCreator keyCreator, final DataEncryption dataEncrypter) {
         final String objectType = aggregateReader.readObjectType();
-        final ObjectSpecification specification = IsisContext.getSpecificationLoader().loadSpecification(objectType);
+        final ObjectSpecification specification = getSpecificationLoader().loadSpecification(objectType);
         final ObjectAdapter fieldObject = getAdapter(specification, oid);
         if (fieldObject.getResolveState().isGhost()) {
             final ResolveState resolveState = ResolveState.RESOLVING;
@@ -157,7 +160,7 @@ class ObjectReader {
             if (ref.equals("")) {
                 throw new NoSqlStoreException("Invalid reference field (an empty string) in data for " + association.getName() + "  in " + object);
             }
-            final Oid oid = keyCreator.oidFromReference(ref);
+            final OidWithSpecification oid = keyCreator.oidFromReference(ref);
             final ObjectSpecification specification = keyCreator.specificationFromReference(ref);
             fieldObject = getAdapter(specification, oid);
         }
@@ -198,19 +201,37 @@ class ObjectReader {
         final ObjectAdapter[] elements = new ObjectAdapter[references.length];
         for (int i = 0; i < references.length; i++) {
             final ObjectSpecification specification = keyCreator.specificationFromReference(references[i]);
-            final Oid oid = keyCreator.oidFromReference(references[i]);
+            final OidWithSpecification oid = keyCreator.oidFromReference(references[i]);
             elements[i] = getAdapter(specification, oid);
         }
         return elements;
     }
 
     protected ObjectAdapter getAdapter(final ObjectSpecification specification, final Oid oid) {
-        final AdapterManager objectLoader = IsisContext.getPersistenceSession().getAdapterManager();
+        final AdapterManager objectLoader = getPersistenceSession().getAdapterManager();
         final ObjectAdapter adapter = objectLoader.getAdapterFor(oid);
         if (adapter != null) {
             return adapter;
-        } else {
-            return IsisContext.getPersistenceSession().recreateAdapter(oid, specification);
-        }
+        } 
+        return getPersistenceSession().recreateAdapter(oid, specification);
     }
+
+    protected ObjectAdapter getAdapter(final OidWithSpecification oid) {
+        final AdapterManager objectLoader = getPersistenceSession().getAdapterManager();
+        final ObjectAdapter adapter = objectLoader.getAdapterFor(oid);
+        if (adapter != null) {
+            return adapter;
+        } 
+        return getPersistenceSession().recreateAdapter(oid);
+    }
+
+    protected PersistenceSession getPersistenceSession() {
+        return IsisContext.getPersistenceSession();
+    }
+    
+    protected SpecificationLoader getSpecificationLoader() {
+        return IsisContext.getSpecificationLoader();
+    }
+
+
 }



Mime
View raw message