incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1234456 [2/17] - in /incubator/isis/trunk/framework/runtimes: dflt/bytecode/dflt/src/main/java/org/apache/isis/runtimes/dflt/bytecode/dflt/classsubstitutor/ dflt/bytecode/dflt/src/main/java/org/apache/isis/runtimes/dflt/bytecode/dflt/objec...
Date Sun, 22 Jan 2012 07:36:26 GMT
Modified: incubator/isis/trunk/framework/runtimes/dflt/monitoring/src/main/java/org/apache/isis/runtimes/dflt/monitoring/servermonitor/MonitorListenerImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/monitoring/src/main/java/org/apache/isis/runtimes/dflt/monitoring/servermonitor/MonitorListenerImpl.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/monitoring/src/main/java/org/apache/isis/runtimes/dflt/monitoring/servermonitor/MonitorListenerImpl.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/monitoring/src/main/java/org/apache/isis/runtimes/dflt/monitoring/servermonitor/MonitorListenerImpl.java Sun Jan 22 07:36:07 2012
@@ -101,8 +101,7 @@ public class MonitorListenerImpl impleme
         writer.println("</BODY></HTML>");
     }
 
-    private void appendNavigationLink(final StringBuffer navigation, final String name, final boolean appendDivider)
-        throws UnsupportedEncodingException {
+    private void appendNavigationLink(final StringBuffer navigation, final String name, final boolean appendDivider) throws UnsupportedEncodingException {
         if (appendDivider) {
             navigation.append(" | ");
         }
@@ -145,6 +144,7 @@ public class MonitorListenerImpl impleme
         // writer.println();
     }
     /*
-     * public void setTarget(final DebugSelection debugInfo2) { target = debugInfo2; }
+     * public void setTarget(final DebugSelection debugInfo2) { target =
+     * debugInfo2; }
      */
 }

Modified: incubator/isis/trunk/framework/runtimes/dflt/monitoring/src/main/java/org/apache/isis/runtimes/dflt/monitoring/servermonitor/SocketServerMonitor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/monitoring/src/main/java/org/apache/isis/runtimes/dflt/monitoring/servermonitor/SocketServerMonitor.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/monitoring/src/main/java/org/apache/isis/runtimes/dflt/monitoring/servermonitor/SocketServerMonitor.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/monitoring/src/main/java/org/apache/isis/runtimes/dflt/monitoring/servermonitor/SocketServerMonitor.java Sun Jan 22 07:36:07 2012
@@ -27,7 +27,6 @@ import org.apache.isis.core.commons.conf
 import org.apache.isis.runtimes.dflt.runtime.system.IsisSystem;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 
-
 public class SocketServerMonitor extends AbstractServerMonitor {
     private static final int DEFAULT_PORT = 8009;
     private static final String PORT = ConfigurationConstants.ROOT + "monitor.telnet.port";

Modified: incubator/isis/trunk/framework/runtimes/dflt/monitoring/src/main/java/org/apache/isis/runtimes/dflt/monitoring/systemconsole/AWTConsole.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/monitoring/src/main/java/org/apache/isis/runtimes/dflt/monitoring/systemconsole/AWTConsole.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/monitoring/src/main/java/org/apache/isis/runtimes/dflt/monitoring/systemconsole/AWTConsole.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/monitoring/src/main/java/org/apache/isis/runtimes/dflt/monitoring/systemconsole/AWTConsole.java Sun Jan 22 07:36:07 2012
@@ -154,11 +154,11 @@ public class AWTConsole extends Frame im
         /*
          * Enumeration e = server.getObjectStore().cache();
          * 
-         * log("Cached objects:-"); while (e.hasMoreElements()) { ObjectAdapter object = (ObjectAdapter)
-         * e.nextElement();
+         * log("Cached objects:-"); while (e.hasMoreElements()) { ObjectAdapter
+         * object = (ObjectAdapter) e.nextElement();
          * 
-         * log(" " + object.getClassName() + "[" + (object.isResolved() ? "" : "~") + object.getOid() + "] " +
-         * object.title()); } log();
+         * log(" " + object.getClassName() + "[" + (object.isResolved() ? "" :
+         * "~") + object.getOid() + "] " + object.title()); } log();
          */
     }
 
@@ -166,11 +166,11 @@ public class AWTConsole extends Frame im
         /*
          * try { Enumeration e = server.getObjectStore().classes();
          * 
-         * log("Loaded classes:-"); while (e.hasMoreElements()) { ObjectSpecification object = (ObjectSpecification)
-         * e.nextElement();
+         * log("Loaded classes:-"); while (e.hasMoreElements()) {
+         * ObjectSpecification object = (ObjectSpecification) e.nextElement();
          * 
-         * log(" " + object); } log(); } catch (ObjectStoreException e) { LOG.error("Error listing classes " +
-         * e.getMessage()); }
+         * log(" " + object); } log(); } catch (ObjectStoreException e) {
+         * LOG.error("Error listing classes " + e.getMessage()); }
          */
     }
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/monitoring/src/main/java/org/apache/isis/runtimes/dflt/monitoring/systemconsole/TerminalConsole.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/monitoring/src/main/java/org/apache/isis/runtimes/dflt/monitoring/systemconsole/TerminalConsole.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/monitoring/src/main/java/org/apache/isis/runtimes/dflt/monitoring/systemconsole/TerminalConsole.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/monitoring/src/main/java/org/apache/isis/runtimes/dflt/monitoring/systemconsole/TerminalConsole.java Sun Jan 22 07:36:07 2012
@@ -26,7 +26,8 @@ import java.io.InputStreamReader;
 import org.apache.log4j.Logger;
 
 /**
- * Marked as final because starts a thread in the {@link #TerminalConsole() constructor}.
+ * Marked as final because starts a thread in the {@link #TerminalConsole()
+ * constructor}.
  */
 public final class TerminalConsole implements ServerConsole, Runnable {
     private static final Logger LOG = Logger.getLogger(TerminalConsole.class);
@@ -58,11 +59,11 @@ public final class TerminalConsole imple
         /*
          * try { Enumeration e = server.getObjectStore().classes();
          * 
-         * log("Loaded classes:-"); while (e.hasMoreElements()) { ObjectSpecification object = (ObjectSpecification)
-         * e.nextElement();
+         * log("Loaded classes:-"); while (e.hasMoreElements()) {
+         * ObjectSpecification object = (ObjectSpecification) e.nextElement();
          * 
-         * log(" " + object); } } catch (ObjectStoreException e) { LOG.error("Error listing classes " + e.getMessage());
-         * }
+         * log(" " + object); } } catch (ObjectStoreException e) {
+         * LOG.error("Error listing classes " + e.getMessage()); }
          */
     }
 

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=1234456&r1=1234455&r2=1234456&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 Sun Jan 22 07:36:07 2012
@@ -84,11 +84,10 @@ public class InMemoryObjectStore impleme
 
     @Override
     public void open() {
-        // TODO: all a bit hacky, but is to keep tests running. Should really sort out using mocks.
-        final InMemoryPersistenceSessionFactory inMemoryPersistenceSessionFactory =
-            getInMemoryPersistenceSessionFactory();
-        persistedObjects =
-            inMemoryPersistenceSessionFactory == null ? null : inMemoryPersistenceSessionFactory.getPersistedObjects();
+        // TODO: all a bit hacky, but is to keep tests running. Should really
+        // sort out using mocks.
+        final InMemoryPersistenceSessionFactory inMemoryPersistenceSessionFactory = getInMemoryPersistenceSessionFactory();
+        persistedObjects = inMemoryPersistenceSessionFactory == null ? null : inMemoryPersistenceSessionFactory.getPersistedObjects();
         if (persistedObjects == null) {
             if (inMemoryPersistenceSessionFactory != null) {
                 persistedObjects = inMemoryPersistenceSessionFactory.createPersistedObjects();
@@ -112,8 +111,10 @@ public class InMemoryObjectStore impleme
     private void recreateAdapters(final ObjectStoreInstances objectStoreInstances) {
         for (final Oid oid : objectStoreInstances.getOids()) {
 
-            // it's important not to "touch" the pojo, not even in log messages. That's because
-            // the toString() will cause bytecode enhancement to try to resolve references.
+            // it's important not to "touch" the pojo, not even in log messages.
+            // That's because
+            // the toString() will cause bytecode enhancement to try to resolve
+            // references.
 
             if (LOG.isDebugEnabled()) {
                 LOG.debug("recreating adapter: oid=" + oid);
@@ -122,7 +123,8 @@ public class InMemoryObjectStore impleme
 
             final ObjectAdapter existingAdapterLookedUpByPojo = getAdapterManager().getAdapterFor(pojo);
             if (existingAdapterLookedUpByPojo != null) {
-                // this could happen if we rehydrate a persisted object that depends on another persisted object
+                // this could happen if we rehydrate a persisted object that
+                // depends on another persisted object
                 // not yet rehydrated.
                 getAdapterManager().removeAdapter(existingAdapterLookedUpByPojo);
             }
@@ -141,9 +143,9 @@ public class InMemoryObjectStore impleme
 
     @Override
     public void close() {
-        final InMemoryPersistenceSessionFactory inMemoryPersistenceSessionFactory =
-            getInMemoryPersistenceSessionFactory();
-        // TODO: this is hacky, only here to keep tests running. Should sort out using mocks
+        final InMemoryPersistenceSessionFactory inMemoryPersistenceSessionFactory = getInMemoryPersistenceSessionFactory();
+        // TODO: this is hacky, only here to keep tests running. Should sort out
+        // using mocks
         if (inMemoryPersistenceSessionFactory != null) {
             inMemoryPersistenceSessionFactory.attach(getPersistenceSession(), persistedObjects);
             persistedObjects = null;
@@ -225,8 +227,7 @@ public class InMemoryObjectStore impleme
     // ///////////////////////////////////////////////////////
 
     @Override
-    public ObjectAdapter getObject(final Oid oid, final ObjectSpecification hint) throws ObjectNotFoundException,
-        ObjectPersistenceException {
+    public ObjectAdapter getObject(final Oid oid, final ObjectSpecification hint) throws ObjectNotFoundException, ObjectPersistenceException {
         LOG.debug("getObject " + oid);
         final ObjectStoreInstances ins = instancesFor(hint);
         final ObjectAdapter object = ins.retrieveObject(oid);
@@ -243,9 +244,11 @@ public class InMemoryObjectStore impleme
 
         // this is a nasty hack, but even though this method is called by
         // PersistenceSessionObjectStore#resolveImmediately which has a check,
-        // seem to be hitting a race condition with another thread that is resolving the object
+        // seem to be hitting a race condition with another thread that is
+        // resolving the object
         // before I get here.
-        // as belt-n-braces, have also made PSOS#resolveImmediately synchronize on
+        // as belt-n-braces, have also made PSOS#resolveImmediately synchronize
+        // on
         // the object being resolved.
         if (adapter.getResolveState().canChangeTo(ResolveState.RESOLVING)) {
             LOG.debug("resolve " + adapter);
@@ -254,14 +257,12 @@ public class InMemoryObjectStore impleme
             PersistorUtil.start(adapter, ResolveState.RESOLVING);
             PersistorUtil.end(adapter); // moves to RESOLVED
         } else {
-            LOG.warn("resolveImmediately ignored, " + "adapter's current state is: " + adapter.getResolveState()
-                + " ; oid: " + adapter.getOid());
+            LOG.warn("resolveImmediately ignored, " + "adapter's current state is: " + adapter.getResolveState() + " ; oid: " + adapter.getOid());
         }
     }
 
     @Override
-    public void resolveField(final ObjectAdapter object, final ObjectAssociation field)
-        throws ObjectPersistenceException {
+    public void resolveField(final ObjectAdapter object, final ObjectAssociation field) throws ObjectPersistenceException {
         final ObjectAdapter reference = field.get(object);
         PersistorUtil.start(reference, ResolveState.RESOLVING);
         PersistorUtil.end(reference);
@@ -308,13 +309,10 @@ public class InMemoryObjectStore impleme
     // ///////////////////////////////////////////////////////
 
     @Override
-    public ObjectAdapter[] getInstances(final PersistenceQuery persistenceQuery) throws ObjectPersistenceException,
-        UnsupportedFindException {
+    public ObjectAdapter[] getInstances(final PersistenceQuery persistenceQuery) throws ObjectPersistenceException, UnsupportedFindException {
 
         if (!(persistenceQuery instanceof PersistenceQueryBuiltIn)) {
-            throw new IllegalArgumentException(MessageFormat.format(
-                "Provided PersistenceQuery not supported; was {0}; " + "the in-memory object store only supports {1}",
-                persistenceQuery.getClass().getName(), PersistenceQueryBuiltIn.class.getName()));
+            throw new IllegalArgumentException(MessageFormat.format("Provided PersistenceQuery not supported; was {0}; " + "the in-memory object store only supports {1}", persistenceQuery.getClass().getName(), PersistenceQueryBuiltIn.class.getName()));
         }
         final PersistenceQueryBuiltIn builtIn = (PersistenceQueryBuiltIn) persistenceQuery;
 
@@ -341,8 +339,7 @@ public class InMemoryObjectStore impleme
         return false;
     }
 
-    private void findInstances(final ObjectSpecification spec, final PersistenceQueryBuiltIn persistenceQuery,
-        final Vector<ObjectAdapter> foundInstances) {
+    private void findInstances(final ObjectSpecification spec, final PersistenceQueryBuiltIn persistenceQuery, final Vector<ObjectAdapter> foundInstances) {
 
         instancesFor(spec).findInstancesAndAdd(persistenceQuery, foundInstances);
 
@@ -499,50 +496,59 @@ public class InMemoryObjectStore impleme
     // ///////////////////////////////////////////////////////
 
     /**
-     * Must use {@link IsisContext context}, because although this object is recreated with each
-     * {@link PersistenceSession session}, the persisted objects that get
-     * {@link #attachPersistedObjects(ObjectStorePersistedObjects) attached} to it span multiple sessions.
+     * Must use {@link IsisContext context}, because although this object is
+     * recreated with each {@link PersistenceSession session}, the persisted
+     * objects that get
+     * {@link #attachPersistedObjects(ObjectStorePersistedObjects) attached} to
+     * it span multiple sessions.
      * 
      * <p>
-     * The alternative design would be to laboriously inject the session into not only this object but also the
-     * {@link ObjectStoreInstances} that do the work.
+     * The alternative design would be to laboriously inject the session into
+     * not only this object but also the {@link ObjectStoreInstances} that do
+     * the work.
      */
     protected PersistenceSession getPersistenceSession() {
         return IsisContext.getPersistenceSession();
     }
 
     /**
-     * Must use {@link IsisContext context}, because although this object is recreated with each
-     * {@link PersistenceSession session}, the persisted objects that get
-     * {@link #attachPersistedObjects(ObjectStorePersistedObjects) attached} to it span multiple sessions.
+     * Must use {@link IsisContext context}, because although this object is
+     * recreated with each {@link PersistenceSession session}, the persisted
+     * objects that get
+     * {@link #attachPersistedObjects(ObjectStorePersistedObjects) attached} to
+     * it span multiple sessions.
      * 
      * <p>
-     * The alternative design would be to laboriously inject the session into not only this object but also the
-     * {@link ObjectStoreInstances} that do the work.
+     * The alternative design would be to laboriously inject the session into
+     * not only this object but also the {@link ObjectStoreInstances} that do
+     * the work.
      */
     protected AdapterManager getAdapterManager() {
         return getPersistenceSession().getAdapterManager();
     }
 
     /**
-     * Must use {@link IsisContext context}, because although this object is recreated with each
-     * {@link PersistenceSession session}, the persisted objects that get
-     * {@link #attachPersistedObjects(ObjectStorePersistedObjects) attached} to it span multiple sessions.
+     * Must use {@link IsisContext context}, because although this object is
+     * recreated with each {@link PersistenceSession session}, the persisted
+     * objects that get
+     * {@link #attachPersistedObjects(ObjectStorePersistedObjects) attached} to
+     * it span multiple sessions.
      * 
      * <p>
-     * The alternative design would be to laboriously inject the session into not only this object but also the
-     * {@link ObjectStoreInstances} that do the work.
+     * The alternative design would be to laboriously inject the session into
+     * not only this object but also the {@link ObjectStoreInstances} that do
+     * the work.
      */
     protected PersistenceSessionHydrator getHydrator() {
         return getPersistenceSession();
     }
 
     /**
-     * Downcasts the {@link PersistenceSessionFactory} to {@link InMemoryPersistenceSessionFactory}.
+     * Downcasts the {@link PersistenceSessionFactory} to
+     * {@link InMemoryPersistenceSessionFactory}.
      */
     protected InMemoryPersistenceSessionFactory getInMemoryPersistenceSessionFactory() {
-        final PersistenceSessionFactory persistenceSessionFactory =
-            getPersistenceSession().getPersistenceSessionFactory();
+        final PersistenceSessionFactory persistenceSessionFactory = getPersistenceSession().getPersistenceSessionFactory();
 
         if (!(persistenceSessionFactory instanceof InMemoryPersistenceSessionFactory)) {
             // for testing support

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryPersistenceMechanismInstaller.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/InMemoryPersistenceMechanismInstaller.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryPersistenceMechanismInstaller.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryPersistenceMechanismInstaller.java Sun Jan 22 07:36:07 2012
@@ -53,8 +53,7 @@ public class InMemoryPersistenceMechanis
      * Hook method to return {@link ObjectStore}.
      */
     @Override
-    protected ObjectStore createObjectStore(final IsisConfiguration configuration,
-        final ObjectAdapterFactory adapterFactory, final AdapterManager adapterManager) {
+    protected ObjectStore createObjectStore(final IsisConfiguration configuration, final ObjectAdapterFactory adapterFactory, final AdapterManager adapterManager) {
         return new InMemoryObjectStore();
     }
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryPersistenceSessionFactory.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/InMemoryPersistenceSessionFactory.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryPersistenceSessionFactory.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryPersistenceSessionFactory.java Sun Jan 22 07:36:07 2012
@@ -33,8 +33,7 @@ public class InMemoryPersistenceSessionF
 
     private ObjectStorePersistedObjects persistedObjects;
 
-    public InMemoryPersistenceSessionFactory(final DeploymentType deploymentType,
-        final PersistenceSessionFactoryDelegate persistenceSessionFactoryDelegate) {
+    public InMemoryPersistenceSessionFactory(final DeploymentType deploymentType, final PersistenceSessionFactoryDelegate persistenceSessionFactoryDelegate) {
         super(deploymentType, persistenceSessionFactoryDelegate);
     }
 
@@ -57,14 +56,16 @@ public class InMemoryPersistenceSessionF
     }
 
     /**
-     * Not API - called when {@link InMemoryObjectStore} first {@link InMemoryObjectStore#open() open}ed.
+     * Not API - called when {@link InMemoryObjectStore} first
+     * {@link InMemoryObjectStore#open() open}ed.
      */
     public ObjectStorePersistedObjects createPersistedObjects() {
         return new ObjectStorePersistedObjectsDefault();
     }
 
     /**
-     * Not API - called when {@link InMemoryObjectStore} is {@link InMemoryObjectStore#close() close}d.
+     * Not API - called when {@link InMemoryObjectStore} is
+     * {@link InMemoryObjectStore#close() close}d.
      */
     public void attach(final PersistenceSession persistenceSession, final ObjectStorePersistedObjects persistedObjects) {
         final OidGenerator oidGenerator = persistenceSession.getOidGenerator();

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/ObjectStoreInstances.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/internal/ObjectStoreInstances.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/ObjectStoreInstances.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/ObjectStoreInstances.java Sun Jan 22 07:36:07 2012
@@ -128,9 +128,11 @@ public class ObjectStoreInstances {
     // ///////////////////////////////////////////////////////
 
     /**
-     * If the pojo exists in the object store, then looks up the {@link ObjectAdapter adapter} from the
-     * {@link AdapterManager}, and only if none found does it
-     * {@link PersistenceSessionHydrator#recreateAdapter(Oid, Object) recreate} a new {@link ObjectAdapter adapter}.
+     * If the pojo exists in the object store, then looks up the
+     * {@link ObjectAdapter adapter} from the {@link AdapterManager}, and only
+     * if none found does it
+     * {@link PersistenceSessionHydrator#recreateAdapter(Oid, Object) recreate}
+     * a new {@link ObjectAdapter adapter}.
      */
     public ObjectAdapter retrieveObject(final Oid oid) {
         final Object pojo = getObjectInstances().get(oid);
@@ -153,10 +155,10 @@ public class ObjectStoreInstances {
     // ///////////////////////////////////////////////////////
 
     /**
-     * Not API, but <tt>public</tt> so can be called by {@link InMemoryObjectStore}.
+     * Not API, but <tt>public</tt> so can be called by
+     * {@link InMemoryObjectStore}.
      */
-    public void findInstancesAndAdd(final PersistenceQueryBuiltIn persistenceQuery,
-        final List<ObjectAdapter> foundInstances) {
+    public void findInstancesAndAdd(final PersistenceQueryBuiltIn persistenceQuery, final List<ObjectAdapter> foundInstances) {
         if (persistenceQuery instanceof PersistenceQueryFindByTitle) {
             for (final Oid oid : titleByOidMap.keySet()) {
                 final String title = titleByOidMap.get(oid);
@@ -214,48 +216,60 @@ public class ObjectStoreInstances {
     // ///////////////////////////////////////////////////////
 
     /**
-     * Must use {@link IsisContext context}, because although this object is recreated with each
-     * {@link PersistenceSession session}, the persisted objects that get
-     * {@link #attachPersistedObjects(MemoryObjectStorePersistedObjects) attached} to it span multiple sessions.
+     * Must use {@link IsisContext context}, because although this object is
+     * recreated with each {@link PersistenceSession session}, the persisted
+     * objects that get
+     * {@link #attachPersistedObjects(MemoryObjectStorePersistedObjects)
+     * attached} to it span multiple sessions.
      * 
      * <p>
-     * The alternative design would be to laboriously inject this object via the {@link InMemoryObjectStore}.
+     * The alternative design would be to laboriously inject this object via the
+     * {@link InMemoryObjectStore}.
      */
     protected PersistenceSession getPersistenceSession() {
         return IsisContext.getPersistenceSession();
     }
 
     /**
-     * Must use {@link IsisContext context}, because although this object is recreated with each
-     * {@link PersistenceSession session}, the persisted objects that get
-     * {@link #attachPersistedObjects(MemoryObjectStorePersistedObjects) attached} to it span multiple sessions.
+     * Must use {@link IsisContext context}, because although this object is
+     * recreated with each {@link PersistenceSession session}, the persisted
+     * objects that get
+     * {@link #attachPersistedObjects(MemoryObjectStorePersistedObjects)
+     * attached} to it span multiple sessions.
      * 
      * <p>
-     * The alternative design would be to laboriously inject this object via the {@link InMemoryObjectStore}.
+     * The alternative design would be to laboriously inject this object via the
+     * {@link InMemoryObjectStore}.
      */
     protected AdapterManager getAdapterManager() {
         return getPersistenceSession().getAdapterManager();
     }
 
     /**
-     * Must use {@link IsisContext context}, because although this object is recreated with each
-     * {@link PersistenceSession session}, the persisted objects that get
-     * {@link #attachPersistedObjects(MemoryObjectStorePersistedObjects) attached} to it span multiple sessions.
+     * Must use {@link IsisContext context}, because although this object is
+     * recreated with each {@link PersistenceSession session}, the persisted
+     * objects that get
+     * {@link #attachPersistedObjects(MemoryObjectStorePersistedObjects)
+     * attached} to it span multiple sessions.
      * 
      * <p>
-     * The alternative design would be to laboriously inject this object via the {@link InMemoryObjectStore}.
+     * The alternative design would be to laboriously inject this object via the
+     * {@link InMemoryObjectStore}.
      */
     protected PersistenceSessionHydrator getHydrator() {
         return getPersistenceSession();
     }
 
     /**
-     * Must use {@link IsisContext context}, because although this object is recreated with each
-     * {@link PersistenceSession session}, the persisted objects that get
-     * {@link #attachPersistedObjects(MemoryObjectStorePersistedObjects) attached} to it span multiple sessions.
+     * Must use {@link IsisContext context}, because although this object is
+     * recreated with each {@link PersistenceSession session}, the persisted
+     * objects that get
+     * {@link #attachPersistedObjects(MemoryObjectStorePersistedObjects)
+     * attached} to it span multiple sessions.
      * 
      * <p>
-     * The alternative design would be to laboriously inject this object via the {@link InMemoryObjectStore}.
+     * The alternative design would be to laboriously inject this object via the
+     * {@link InMemoryObjectStore}.
      */
     protected AuthenticationSession getAuthenticationSession() {
         return IsisContext.getAuthenticationSession();

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/ObjectStorePersistedObjectsDefault.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/internal/ObjectStorePersistedObjectsDefault.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/ObjectStorePersistedObjectsDefault.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/ObjectStorePersistedObjectsDefault.java Sun Jan 22 07:36:07 2012
@@ -64,16 +64,17 @@ public class ObjectStorePersistedObjects
         final Oid oidLookedUpByName = serviceOidByIdMap.get(name);
         if (oidLookedUpByName != null) {
             if (oidLookedUpByName.equals(oid)) {
-                throw new IsisException("Already another service registered as name: " + name + " (existing Oid: "
-                    + oidLookedUpByName + ", " + "intended: " + oid + ")");
+                throw new IsisException("Already another service registered as name: " + name + " (existing Oid: " + oidLookedUpByName + ", " + "intended: " + oid + ")");
             }
         } else {
             serviceOidByIdMap.put(name, oid);
         }
     }
 
-    // TODO: this is where the clever logic needs to go to determine how to save into our custom Map.
-    // also think we shouldn't surface the entire Map, just the API we require (keySet, values etc).
+    // TODO: this is where the clever logic needs to go to determine how to save
+    // into our custom Map.
+    // also think we shouldn't surface the entire Map, just the API we require
+    // (keySet, values etc).
     @Override
     public ObjectStoreInstances instancesFor(final ObjectSpecification spec) {
         ObjectStoreInstances ins = instancesBySpecMap.get(spec);

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/commands/AbstractInMemoryPersistenceCommand.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/internal/commands/AbstractInMemoryPersistenceCommand.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/commands/AbstractInMemoryPersistenceCommand.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/commands/AbstractInMemoryPersistenceCommand.java Sun Jan 22 07:36:07 2012
@@ -33,8 +33,7 @@ public abstract class AbstractInMemoryPe
 
     private final ObjectStorePersistedObjects persistedObjects;
 
-    public AbstractInMemoryPersistenceCommand(final ObjectAdapter adapter,
-        final ObjectStorePersistedObjects persistedObjects) {
+    public AbstractInMemoryPersistenceCommand(final ObjectAdapter adapter, final ObjectStorePersistedObjects persistedObjects) {
         super(adapter);
         this.persistedObjects = persistedObjects;
     }

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/commands/InMemoryCreateObjectCommand.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/internal/commands/InMemoryCreateObjectCommand.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/commands/InMemoryCreateObjectCommand.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/commands/InMemoryCreateObjectCommand.java Sun Jan 22 07:36:07 2012
@@ -26,8 +26,7 @@ import org.apache.isis.runtimes.dflt.run
 import org.apache.isis.runtimes.dflt.runtime.transaction.ObjectPersistenceException;
 import org.apache.log4j.Logger;
 
-public final class InMemoryCreateObjectCommand extends AbstractInMemoryPersistenceCommand implements
-    CreateObjectCommand {
+public final class InMemoryCreateObjectCommand extends AbstractInMemoryPersistenceCommand implements CreateObjectCommand {
     private final static Logger LOG = Logger.getLogger(InMemoryCreateObjectCommand.class);
 
     public InMemoryCreateObjectCommand(final ObjectAdapter object, final ObjectStorePersistedObjects persistedObjects) {

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/commands/InMemoryDestroyObjectCommand.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/internal/commands/InMemoryDestroyObjectCommand.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/commands/InMemoryDestroyObjectCommand.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/main/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/commands/InMemoryDestroyObjectCommand.java Sun Jan 22 07:36:07 2012
@@ -26,8 +26,7 @@ import org.apache.isis.runtimes.dflt.run
 import org.apache.isis.runtimes.dflt.runtime.transaction.ObjectPersistenceException;
 import org.apache.log4j.Logger;
 
-public final class InMemoryDestroyObjectCommand extends AbstractInMemoryPersistenceCommand implements
-    DestroyObjectCommand {
+public final class InMemoryDestroyObjectCommand extends AbstractInMemoryPersistenceCommand implements DestroyObjectCommand {
     private final static Logger LOG = Logger.getLogger(InMemoryDestroyObjectCommand.class);
 
     public InMemoryDestroyObjectCommand(final ObjectAdapter adapter, final ObjectStorePersistedObjects persistedObjects) {

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStore_interactionWithAdapterManager.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_interactionWithAdapterManager.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStore_interactionWithAdapterManager.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStore_interactionWithAdapterManager.java Sun Jan 22 07:36:07 2012
@@ -43,7 +43,8 @@ public class InMemoryObjectStore_interac
     }
 
     /**
-     * Testing, indirectly, that the adapter manager doesn't automatically save objects in the objectstore.
+     * Testing, indirectly, that the adapter manager doesn't automatically save
+     * objects in the objectstore.
      */
     public void testObjectNotPersistedWhenCreated() throws Exception {
         final ObjectAdapter object = system.createPersistentTestObject();

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStore_openAndClose.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_openAndClose.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStore_openAndClose.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStore_openAndClose.java Sun Jan 22 07:36:07 2012
@@ -34,8 +34,8 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 
 /**
- * Tested in style of <i>Working Effectively with Legacy Code</i> (Feathers) and <i>Growing Object-Oriented Software</i>
- * (Freeman &amp; Pryce).
+ * Tested in style of <i>Working Effectively with Legacy Code</i> (Feathers) and
+ * <i>Growing Object-Oriented Software</i> (Freeman &amp; Pryce).
  */
 @RunWith(JMock.class)
 public class InMemoryObjectStore_openAndClose {
@@ -102,8 +102,7 @@ public class InMemoryObjectStore_openAnd
     }
 
     @Test
-    public void whenOpenSubsequentlyThenObtainsPersistedObjectsFromObjectStoreFactoryAndRecreatesAdapters()
-        throws Exception {
+    public void whenOpenSubsequentlyThenObtainsPersistedObjectsFromObjectStoreFactoryAndRecreatesAdapters() throws Exception {
         neverInteractsDirectlyWithPersistenceSession();
         context.checking(new Expectations() {
             {
@@ -125,8 +124,7 @@ public class InMemoryObjectStore_openAnd
 
         context.checking(new Expectations() {
             {
-                one(mockInMemoryPersistenceSessionFactory).attach(with(mockPersistenceSession),
-                    with(mockObjectStorePersistedObjects));
+                one(mockInMemoryPersistenceSessionFactory).attach(with(mockPersistenceSession), with(mockObjectStorePersistedObjects));
                 never(mockPersistenceSession);
             }
         });

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStore_persist.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_persist.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStore_persist.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStore_persist.java Sun Jan 22 07:36:07 2012
@@ -46,8 +46,7 @@ public class InMemoryObjectStore_persist
     public void testSaveInstance() throws Exception {
 
         final ObjectSpecification specification = object.getSpecification();
-        ObjectAdapter[] retrievedInstance =
-            store.getInstances(new PersistenceQueryFindByTitle(specification, "changed"));
+        ObjectAdapter[] retrievedInstance = store.getInstances(new PersistenceQueryFindByTitle(specification, "changed"));
         assertEquals(0, retrievedInstance.length);
 
         ((TestProxyAdapter) object).setupTitleString("changed title");

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStore_retrieve.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_retrieve.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStore_retrieve.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStore_retrieve.java Sun Jan 22 07:36:07 2012
@@ -72,8 +72,7 @@ public class InMemoryObjectStore_retriev
         addObjectToStoreAndDiscardAdapters();
 
         final ObjectSpecification specification = originalAdapter.getSpecification();
-        final ObjectAdapter[] retrievedInstance =
-            store.getInstances(new PersistenceQueryFindByTitle(specification, "le STR"));
+        final ObjectAdapter[] retrievedInstance = store.getInstances(new PersistenceQueryFindByTitle(specification, "le STR"));
         assertEquals(1, retrievedInstance.length);
         assertNotSame(originalAdapter, retrievedInstance[0]);
         assertSame(originalAdapter.getObject(), retrievedInstance[0].getObject());
@@ -83,8 +82,7 @@ public class InMemoryObjectStore_retriev
         addObjectToStoreAndDiscardAdapters();
 
         final ObjectSpecification specification = originalAdapter.getSpecification();
-        final ObjectAdapter[] retrievedAdapters =
-            store.getInstances(new PersistenceQueryFindAllInstances(specification));
+        final ObjectAdapter[] retrievedAdapters = store.getInstances(new PersistenceQueryFindAllInstances(specification));
         assertEquals(1, retrievedAdapters.length);
         assertSame(originalAdapter.getObject(), retrievedAdapters[0].getObject());
         assertNotSame(originalAdapter, retrievedAdapters[0]);

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/fixture/ObjectFixtureFilePersistorTest.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/fixture/ObjectFixtureFilePersistorTest.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/fixture/ObjectFixtureFilePersistorTest.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/fixture/ObjectFixtureFilePersistorTest.java Sun Jan 22 07:36:07 2012
@@ -46,7 +46,8 @@ import org.junit.Before;
 import org.junit.Test;
 
 /**
- * TODO: remove dependency on {@link TestProxySystemII} and move back to runtime.
+ * TODO: remove dependency on {@link TestProxySystemII} and move back to
+ * runtime.
  */
 public class ObjectFixtureFilePersistorTest {
 
@@ -73,8 +74,7 @@ public class ObjectFixtureFilePersistorT
 
     @Test
     public void loadInstance() throws Exception {
-        final StringReader reader =
-            new StringReader(PACKAGE_BASE + ".testdomain.Person#1\n  name: Fred Smith\n  date: 08-Mar-2010 00:00");
+        final StringReader reader = new StringReader(PACKAGE_BASE + ".testdomain.Person#1\n  name: Fred Smith\n  date: 08-Mar-2010 00:00");
         final Set<Object> objects = persistor.loadData(reader);
 
         Assert.assertEquals(1, objects.size());
@@ -122,8 +122,7 @@ public class ObjectFixtureFilePersistorT
         final StringWriter out = new StringWriter();
         persistor.save(objects, out);
         final String string1 = PACKAGE_BASE + ".testdomain.Person#2\n  date: 08-Mar-2010 00:00\n  name: Fred Smith\n";
-        final String string2 =
-            PACKAGE_BASE + ".testdomain.Person#2\r\n  date: 08-Mar-2010 00:00\r\n  name: Fred Smith\r\n";
+        final String string2 = PACKAGE_BASE + ".testdomain.Person#2\r\n  date: 08-Mar-2010 00:00\r\n  name: Fred Smith\r\n";
         // *nix vs Windows?
         if ((out.toString().compareTo(string1) != 0) && (out.toString().compareTo(string2) != 0)) {
             Assert.assertEquals(string1, out.toString());
@@ -154,12 +153,8 @@ public class ObjectFixtureFilePersistorT
         persistor.save(objects, out);
 
         // *nix vs Windows?
-        final String string1 =
-            PACKAGE_BASE + ".testdomain.Person#2\n  date: 08-Mar-2010 00:00\n  name: Fred Smith\n" + PACKAGE_BASE
-                + ".testdomain.Person#3\n  date: \n  name: \n";
-        final String string2 =
-            PACKAGE_BASE + ".testdomain.Person#2\r\n  date: 08-Mar-2010 00:00\r\n  name: Fred Smith\r\n" + PACKAGE_BASE
-                + ".testdomain.Person#3\r\n  date: \r\n  name: \r\n";
+        final String string1 = PACKAGE_BASE + ".testdomain.Person#2\n  date: 08-Mar-2010 00:00\n  name: Fred Smith\n" + PACKAGE_BASE + ".testdomain.Person#3\n  date: \n  name: \n";
+        final String string2 = PACKAGE_BASE + ".testdomain.Person#2\r\n  date: 08-Mar-2010 00:00\r\n  name: Fred Smith\r\n" + PACKAGE_BASE + ".testdomain.Person#3\r\n  date: \r\n  name: \r\n";
         if ((out.toString().compareTo(string1) != 0) && (out.toString().compareTo(string2) != 0)) {
             Assert.assertEquals(string1, out.toString());
         }
@@ -188,14 +183,8 @@ public class ObjectFixtureFilePersistorT
 
         final StringWriter out = new StringWriter();
         persistor.save(objects, out);
-        final String string1 =
-            PACKAGE_BASE + ".testdomain.Movie#2\n  director: " + PACKAGE_BASE
-                + ".testdomain.Person#3\n  name: The Blockbuster\n  roles: \n" + PACKAGE_BASE
-                + ".testdomain.Person#3\n  date: 08-Mar-2010 00:00\n  name: Fred Smith\n";
-        final String string2 =
-            PACKAGE_BASE + ".testdomain.Movie#2\r\n  director: " + PACKAGE_BASE
-                + ".testdomain.Person#3\r\n  name: The Blockbuster\r\n  roles: \r\n" + PACKAGE_BASE
-                + ".testdomain.Person#3\r\n  date: 08-Mar-2010 00:00\r\n  name: Fred Smith\r\n";
+        final String string1 = PACKAGE_BASE + ".testdomain.Movie#2\n  director: " + PACKAGE_BASE + ".testdomain.Person#3\n  name: The Blockbuster\n  roles: \n" + PACKAGE_BASE + ".testdomain.Person#3\n  date: 08-Mar-2010 00:00\n  name: Fred Smith\n";
+        final String string2 = PACKAGE_BASE + ".testdomain.Movie#2\r\n  director: " + PACKAGE_BASE + ".testdomain.Person#3\r\n  name: The Blockbuster\r\n  roles: \r\n" + PACKAGE_BASE + ".testdomain.Person#3\r\n  date: 08-Mar-2010 00:00\r\n  name: Fred Smith\r\n";
         if ((out.toString().compareTo(string1) != 0) && (out.toString().compareTo(string2) != 0)) {
             Assert.assertEquals(string1, out.toString());
         }

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/fixture/ObjectFixtureServiceTest.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/fixture/ObjectFixtureServiceTest.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/fixture/ObjectFixtureServiceTest.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/fixture/ObjectFixtureServiceTest.java Sun Jan 22 07:36:07 2012
@@ -41,7 +41,8 @@ import org.junit.Before;
 import org.junit.Test;
 
 /**
- * TODO: remove dependency on {@link TestProxySystemII} and move back to runtime.
+ * TODO: remove dependency on {@link TestProxySystemII} and move back to
+ * runtime.
  */
 public class ObjectFixtureServiceTest {
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/ObjectStoreInstances_findInstancesAndAdd.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/internal/ObjectStoreInstances_findInstancesAndAdd.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/ObjectStoreInstances_findInstancesAndAdd.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/ObjectStoreInstances_findInstancesAndAdd.java Sun Jan 22 07:36:07 2012
@@ -37,8 +37,8 @@ import org.junit.runner.RunWith;
 import com.google.common.collect.Lists;
 
 /**
- * Tested in style of <i>Working Effectively with Legacy Code</i> (Feathers) and <i>Growing Object-Oriented Software</i>
- * (Freeman &amp; Pryce).
+ * Tested in style of <i>Working Effectively with Legacy Code</i> (Feathers) and
+ * <i>Growing Object-Oriented Software</i> (Freeman &amp; Pryce).
  */
 @RunWith(JMock.class)
 public class ObjectStoreInstances_findInstancesAndAdd {

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/ObjectStoreInstances_init.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/internal/ObjectStoreInstances_init.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/ObjectStoreInstances_init.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/ObjectStoreInstances_init.java Sun Jan 22 07:36:07 2012
@@ -35,8 +35,8 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 
 /**
- * Tested in style of <i>Working Effectively with Legacy Code</i> (Feathers) and <i>Growing Object-Oriented Software</i>
- * (Freeman &amp; Pryce).
+ * Tested in style of <i>Working Effectively with Legacy Code</i> (Feathers) and
+ * <i>Growing Object-Oriented Software</i> (Freeman &amp; Pryce).
  */
 @RunWith(JMock.class)
 public class ObjectStoreInstances_init {

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/ObjectStoreInstances_save.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/internal/ObjectStoreInstances_save.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/ObjectStoreInstances_save.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/internal/ObjectStoreInstances_save.java Sun Jan 22 07:36:07 2012
@@ -39,8 +39,8 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 
 /**
- * Tested in style of <i>Working Effectively with Legacy Code</i> (Feathers) and <i>Growing Object-Oriented Software</i>
- * (Freeman &amp; Pryce).
+ * Tested in style of <i>Working Effectively with Legacy Code</i> (Feathers) and
+ * <i>Growing Object-Oriented Software</i> (Freeman &amp; Pryce).
  */
 @RunWith(JMock.class)
 public class ObjectStoreInstances_save {

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/testsystem/TestProxySystemII.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/testsystem/TestProxySystemII.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/testsystem/TestProxySystemII.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/dflt/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/testsystem/TestProxySystemII.java Sun Jan 22 07:36:07 2012
@@ -60,7 +60,8 @@ public class TestProxySystemII {
         servicesList = Collections.emptyList();
 
         final TemplateImageLoader mockTemplateImageLoader = mockery.mock(TemplateImageLoader.class);
-        // final SpecificationLoader mockSpecificationLoader = mockery.mock(SpecificationLoader.class);
+        // final SpecificationLoader mockSpecificationLoader =
+        // mockery.mock(SpecificationLoader.class);
         // final PersistenceSessionFactory mockPersistenceSessionFactory =
         // mockery.mock(PersistenceSessionFactory.class);
         final UserProfileLoader mockUserProfileLoader = mockery.mock(UserProfileLoader.class);
@@ -87,18 +88,13 @@ public class TestProxySystemII {
 
         ((ObjectReflectorDefault) mockSpecificationLoader).setRuntimeContext(new RuntimeContextFromSession());
 
-        final InMemoryPersistenceMechanismInstaller persistenceMechanismInstaller =
-            new InMemoryPersistenceMechanismInstaller();
+        final InMemoryPersistenceMechanismInstaller persistenceMechanismInstaller = new InMemoryPersistenceMechanismInstaller();
         persistenceMechanismInstaller.setConfiguration(configuration);
-        final PersistenceSessionFactory mockPersistenceSessionFactory =
-            persistenceMechanismInstaller.createPersistenceSessionFactory(DeploymentType.PROTOTYPE);
+        final PersistenceSessionFactory mockPersistenceSessionFactory = persistenceMechanismInstaller.createPersistenceSessionFactory(DeploymentType.PROTOTYPE);
 
         // mockPersistenceSessionFactory.init();
 
-        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);
         final IsisContext context = IsisContextStatic.createRelaxedInstance(sessionFactory);
         IsisContext.setConfiguration(sessionFactory.getConfiguration());
         sessionFactory.init();

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/DataEncryption.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/DataEncryption.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/DataEncryption.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/DataEncryption.java Sun Jan 22 07:36:07 2012
@@ -21,15 +21,13 @@ package org.apache.isis.runtimes.dflt.ob
 import org.apache.isis.core.commons.config.IsisConfiguration;
 
 public interface DataEncryption {
-    
+
     String getType();
-    
+
     void init(IsisConfiguration configuration);
 
     String encrypt(String plainText);
-    
-    String decrypt(String encryptedText);
 
+    String decrypt(String encryptedText);
 
 }
-

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoEncryption.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/NoEncryption.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoEncryption.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoEncryption.java Sun Jan 22 07:36:07 2012
@@ -20,20 +20,24 @@ package org.apache.isis.runtimes.dflt.ob
 
 import org.apache.isis.core.commons.config.IsisConfiguration;
 
-
 public class NoEncryption implements DataEncryption {
 
+    @Override
     public String getType() {
         return "none";
     }
-    
-    public void init(IsisConfiguration configuration) {}
 
-    public String encrypt(String plainText) {
+    @Override
+    public void init(final IsisConfiguration configuration) {
+    }
+
+    @Override
+    public String encrypt(final String plainText) {
         return plainText;
     }
 
-    public String decrypt(String encryptedText) {
+    @Override
+    public String decrypt(final String encryptedText) {
         return encryptedText;
     }
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlCreateObjectCommand.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/NoSqlCreateObjectCommand.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlCreateObjectCommand.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlCreateObjectCommand.java Sun Jan 22 07:36:07 2012
@@ -23,11 +23,7 @@ import org.apache.isis.runtimes.dflt.run
 
 final class NoSqlCreateObjectCommand extends WriteObjectCommand implements CreateObjectCommand {
 
-    public NoSqlCreateObjectCommand(
-            final KeyCreator keyCreator,
-            final VersionCreator versionCreator,
-            final DataEncryption dataEncrypter,
-            final ObjectAdapter object) {
+    public NoSqlCreateObjectCommand(final KeyCreator keyCreator, final VersionCreator versionCreator, final DataEncryption dataEncrypter, final ObjectAdapter object) {
         super(false, keyCreator, versionCreator, dataEncrypter, object);
     }
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlDestroyObjectCommand.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/NoSqlDestroyObjectCommand.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlDestroyObjectCommand.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlDestroyObjectCommand.java Sun Jan 22 07:36:07 2012
@@ -29,8 +29,7 @@ final class NoSqlDestroyObjectCommand im
     private final KeyCreator keyCreator;
     private final VersionCreator versionCreator;
 
-    public NoSqlDestroyObjectCommand(final KeyCreator keyCreator, final VersionCreator versionCreator,
-        final ObjectAdapter object) {
+    public NoSqlDestroyObjectCommand(final KeyCreator keyCreator, final VersionCreator versionCreator, final ObjectAdapter object) {
         this.keyCreator = keyCreator;
         this.versionCreator = versionCreator;
         this.object = object;

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=1234456&r1=1234455&r2=1234456&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 Sun Jan 22 07:36:07 2012
@@ -43,7 +43,6 @@ import org.apache.isis.runtimes.dflt.run
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceQuery;
 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>();
@@ -55,13 +54,7 @@ public class NoSqlObjectStore implements
     private final Map<String, DataEncryption> availableDataEncrypters;
     private final boolean isDataLoaded;
 
-    public NoSqlObjectStore(
-            final NoSqlDataDatabase db,
-            final NoSqlOidGenerator oidGenerator,
-            final KeyCreator keyCreator,
-            final VersionCreator versionCreator,
-            final DataEncryption writingDataEncrypter,
-            final Map<String, DataEncryption> availableDataEncrypters) {
+    public NoSqlObjectStore(final NoSqlDataDatabase db, final NoSqlOidGenerator oidGenerator, final KeyCreator keyCreator, final VersionCreator versionCreator, final DataEncryption writingDataEncrypter, final Map<String, DataEncryption> availableDataEncrypters) {
         this.database = db;
         this.oidGenerator = oidGenerator;
         this.keyCreator = keyCreator;
@@ -80,7 +73,8 @@ public class NoSqlObjectStore implements
 
     @Override
     public CreateObjectCommand createCreateObjectCommand(final ObjectAdapter object) {
-        // TODO should this be done at a higher level so it is applicable for all OSes
+        // TODO should this be done at a higher level so it is applicable for
+        // all OSes
         if (object.getSpecification().isAggregated()) {
             // throw new
             // UnexpectedCallException("Aggregated objects should not be created outside of their owner");
@@ -101,7 +95,8 @@ public class NoSqlObjectStore implements
 
     @Override
     public SaveObjectCommand createSaveObjectCommand(final ObjectAdapter adapter) {
-        // TODO should this be done at a higher level so it is applicable for all OSes
+        // TODO should this be done at a higher level so it is applicable for
+        // all OSes
         final ObjectAdapter rootAdapter = aggregateRootAdapterFor(adapter);
         if (rootAdapter.getOid() instanceof AggregatedOid) {
             throw new NoSqlStoreException("Unexpected aggregated object to save: " + rootAdapter + " (" + adapter + ")");
@@ -129,10 +124,7 @@ public class NoSqlObjectStore implements
         return instances.toArray(new ObjectAdapter[instances.size()]);
     }
 
-    private void instances(
-            final PersistenceQuery persistenceQuery,
-            final ObjectSpecification specification,
-            final List<ObjectAdapter> instances) {
+    private void instances(final PersistenceQuery persistenceQuery, final ObjectSpecification specification, final List<ObjectAdapter> instances) {
         String specificationName = specification.getFullIdentifier();
         final Iterator<StateReader> instanceData = database.instancesOf(specificationName);
         while (instanceData.hasNext()) {
@@ -187,7 +179,8 @@ public class NoSqlObjectStore implements
     }
 
     @Override
-    public void reset() {}
+    public void reset() {
+    }
 
     @Override
     public void resolveField(final ObjectAdapter object, final ObjectAssociation field) {
@@ -202,7 +195,9 @@ public class NoSqlObjectStore implements
         final Oid oid = object.getOid();
         ;
         if (oid instanceof AggregatedOid) {
-            // throw new UnexpectedCallException("Aggregated objects should not need to be resolved: " +
+            // throw new
+            // UnexpectedCallException("Aggregated objects should not need to be resolved: "
+            // +
             // object);
         } else {
             final String specificationName = object.getSpecification().getFullIdentifier();
@@ -238,13 +233,16 @@ public class NoSqlObjectStore implements
     }
 
     @Override
-    public void abortTransaction() {}
+    public void abortTransaction() {
+    }
 
     @Override
-    public void endTransaction() {}
+    public void endTransaction() {
+    }
 
     @Override
-    public void startTransaction() {}
+    public void startTransaction() {
+    }
 
     // ////////////////////////////////////////////////////////////////
     // Dependencies (from context)

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=1234456&r1=1234455&r2=1234456&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 Sun Jan 22 07:36:07 2012
@@ -52,8 +52,7 @@ public class NoSqlOidGenerator extends O
 
         public synchronized long nextSubId(final NoSqlDataDatabase connectionPool) {
             if (nextSubId > newSubIdBatchAt) {
-                final String message =
-                    "ID exception, last id (" + nextSubId + ") past new batch boundary (" + newSubIdBatchAt + ")";
+                final String message = "ID exception, last id (" + nextSubId + ") past new batch boundary (" + newSubIdBatchAt + ")";
                 throw new NoSqlStoreException(message);
             }
             if (nextSubId == newSubIdBatchAt) {
@@ -66,8 +65,7 @@ public class NoSqlOidGenerator extends O
 
         public synchronized long nextPersistentId(final NoSqlDataDatabase connectionPool) {
             if (nextId > newIdBatchAt) {
-                final String message =
-                    "ID exception, last id (" + nextId + ") past new batch boundary (" + newIdBatchAt + ")";
+                final String message = "ID exception, last id (" + nextId + ") past new batch boundary (" + newIdBatchAt + ")";
                 throw new NoSqlStoreException(message);
             }
             if (nextId == newIdBatchAt) {

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=1234456&r1=1234455&r2=1234456&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 Sun Jan 22 07:36:07 2012
@@ -40,7 +40,7 @@ public abstract class NoSqlPersistorMech
 
     private static final Logger LOG = Logger.getLogger(NoSqlPersistorMechanismInstaller.class);
 
-    private static final String NAKEDOBJECTS_ENCRYPTION_CLASSES = ConfigurationConstants.ROOT  + "nosql.encryption";
+    private static final String NAKEDOBJECTS_ENCRYPTION_CLASSES = ConfigurationConstants.ROOT + "nosql.encryption";
 
     private NoSqlObjectStore objectStore;
 
@@ -49,8 +49,7 @@ public abstract class NoSqlPersistorMech
     }
 
     @Override
-    protected ObjectStore createObjectStore(final IsisConfiguration configuration,
-        final ObjectAdapterFactory objectFactory, final AdapterManager adapterManager) {
+    protected ObjectStore createObjectStore(final IsisConfiguration configuration, final ObjectAdapterFactory objectFactory, final AdapterManager adapterManager) {
         return getObjectStore(configuration);
     }
 
@@ -71,8 +70,8 @@ public abstract class NoSqlPersistorMech
             final VersionCreator versionCreator = createVersionCreator();
             final NoSqlDataDatabase db = createNoSqlDatabase(configuration);
             final NoSqlOidGenerator oidGenerator = createOidGenerator(db);
-            
-            Map<String, DataEncryption> availableDataEncryption = new HashMap<String, DataEncryption>();
+
+            final Map<String, DataEncryption> availableDataEncryption = new HashMap<String, DataEncryption>();
             try {
                 final String[] encryptionClasses = getConfiguration().getList(NAKEDOBJECTS_ENCRYPTION_CLASSES);
                 DataEncryption writeWithEncryption = null;

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlSaveObjectCommand.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/NoSqlSaveObjectCommand.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlSaveObjectCommand.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/NoSqlSaveObjectCommand.java Sun Jan 22 07:36:07 2012
@@ -23,11 +23,7 @@ import org.apache.isis.runtimes.dflt.run
 
 final class NoSqlSaveObjectCommand extends WriteObjectCommand implements SaveObjectCommand {
 
-    public NoSqlSaveObjectCommand(
-            final KeyCreator keyCreator,
-            final VersionCreator versionCreator,
-            final DataEncryption dataEncrypter,
-            final ObjectAdapter object) {
+    public NoSqlSaveObjectCommand(final KeyCreator keyCreator, final VersionCreator versionCreator, final DataEncryption dataEncrypter, final ObjectAdapter object) {
         super(true, keyCreator, versionCreator, dataEncrypter, object);
     }
 

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=1234456&r1=1234455&r2=1234456&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 Sun Jan 22 07:36:07 2012
@@ -40,11 +40,7 @@ import org.apache.isis.runtimes.dflt.run
 
 class ObjectReader {
 
-    public ObjectAdapter load(
-            final StateReader reader,
-            final KeyCreator keyCreator,
-            final VersionCreator versionCreator,
-            final Map<String, DataEncryption> dataEncrypters) {
+    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 String id = reader.readId();
@@ -73,22 +69,12 @@ class ObjectReader {
         return object;
     }
 
-    public void update(
-            final StateReader reader,
-            final KeyCreator keyCreator,
-            final VersionCreator versionCreator,
-            final Map<String, DataEncryption> dataEncrypters,
-            final ObjectAdapter object) {
+    public void update(final StateReader reader, final KeyCreator keyCreator, final VersionCreator versionCreator, final Map<String, DataEncryption> dataEncrypters, final ObjectAdapter object) {
         loadState(reader, keyCreator, versionCreator, dataEncrypters, object);
     }
 
-    private void loadState(
-            final StateReader reader,
-            final KeyCreator keyCreator,
-            final VersionCreator versionCreator,
-            final Map<String, DataEncryption> dataEncrypters,
-            final ObjectAdapter object) {
-    final ResolveState resolveState = ResolveState.RESOLVING;
+    private void loadState(final StateReader reader, final KeyCreator keyCreator, final VersionCreator versionCreator, final Map<String, DataEncryption> dataEncrypters, final ObjectAdapter object) {
+        final ResolveState resolveState = ResolveState.RESOLVING;
         object.changeState(resolveState);
         Version version = null;
         final String versionString = reader.readVersion();
@@ -97,17 +83,13 @@ class ObjectReader {
             final String time = reader.readTime();
             version = versionCreator.version(versionString, user, time);
         }
-        String encryptionType = reader.readEncrytionType();
+        final String encryptionType = reader.readEncrytionType();
         readFields(reader, object, keyCreator, dataEncrypters.get(encryptionType));
         object.setOptimisticLock(version);
         object.changeState(resolveState.getEndState());
     }
 
-    private void readFields(
-            final StateReader reader,
-            final ObjectAdapter object,
-            final KeyCreator keyCreator,
-            final DataEncryption dataEncrypter) {
+    private void readFields(final StateReader reader, final ObjectAdapter object, final KeyCreator keyCreator, final DataEncryption dataEncrypter) {
         final ObjectAssociationContainer specification = object.getSpecification();
         final List<ObjectAssociation> associations = specification.getAssociations();
         for (final ObjectAssociation association : associations) {
@@ -126,12 +108,7 @@ class ObjectReader {
         }
     }
 
-    private void readAggregate(
-            final StateReader reader,
-            final KeyCreator keyCreator,
-            final DataEncryption dataEncrypter,
-            final OneToOneAssociation association,
-            final ObjectAdapter object) {
+    private void readAggregate(final StateReader reader, final KeyCreator keyCreator, final DataEncryption dataEncrypter, final OneToOneAssociation association, final ObjectAdapter object) {
         final String id = association.getId();
         final StateReader aggregateReader = reader.readAggregate(id);
         if (aggregateReader != null) {
@@ -144,11 +121,7 @@ class ObjectReader {
         }
     }
 
-    private ObjectAdapter restoreAggregatedObject(
-            final StateReader aggregateReader,
-            final Oid oid,
-            final KeyCreator keyCreator,
-            final DataEncryption dataEncrypter) {
+    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 ObjectAdapter fieldObject = getAdapter(specification, oid);
@@ -161,26 +134,21 @@ class ObjectReader {
         return fieldObject;
     }
 
-    private void readValue(
-            final StateReader reader,
-            final DataEncryption dataEncrypter,
-            final OneToOneAssociation association,
-            final ObjectAdapter object) {
+    private void readValue(final StateReader reader, final DataEncryption dataEncrypter, final OneToOneAssociation association, final ObjectAdapter object) {
         final String fieldData = reader.readField(association.getId());
         if (fieldData != null) {
             if (fieldData.equals("null")) {
                 association.initAssociation(object, null);
             } else {
                 final EncodableFacet encodeableFacet = association.getSpecification().getFacet(EncodableFacet.class);
-                String decryptedData = dataEncrypter.decrypt(fieldData);
+                final String decryptedData = dataEncrypter.decrypt(fieldData);
                 final ObjectAdapter value = encodeableFacet.fromEncodedString(decryptedData);
                 association.initAssociation(object, value);
             }
         }
     }
 
-    private void readReference(final StateReader reader, final KeyCreator keyCreator,
-        final OneToOneAssociation association, final ObjectAdapter object) {
+    private void readReference(final StateReader reader, final KeyCreator keyCreator, final OneToOneAssociation association, final ObjectAdapter object) {
         ObjectAdapter fieldObject;
         final String ref = reader.readField(association.getId());
         if (ref == null || ref.equals("null")) {
@@ -193,12 +161,7 @@ class ObjectReader {
         association.initAssociation(object, fieldObject);
     }
 
-    private void readCollection(
-            final StateReader reader,
-            final KeyCreator keyCreator,
-            final DataEncryption dataEncrypter,
-            final OneToManyAssociation association,
-            final ObjectAdapter object) {
+    private void readCollection(final StateReader reader, final KeyCreator keyCreator, final DataEncryption dataEncrypter, final OneToManyAssociation association, final ObjectAdapter object) {
         final ObjectAdapter collection = association.get(object);
         final CollectionFacet facet = collection.getSpecification().getFacet(CollectionFacet.class);
         if (association.getSpecification().isAggregated()) {

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/StateWriter.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/StateWriter.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/StateWriter.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/StateWriter.java Sun Jan 22 07:36:07 2012
@@ -28,7 +28,7 @@ public interface StateWriter {
     void writeId(String oid);
 
     void writeType(String type);
-    
+
     void writeEncryptionType(String type);
 
     void writeField(String id, String data);

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/WriteObjectCommand.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/WriteObjectCommand.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/WriteObjectCommand.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/nosql/src/main/java/org/apache/isis/runtimes/dflt/objectstores/nosql/WriteObjectCommand.java Sun Jan 22 07:36:07 2012
@@ -41,12 +41,7 @@ class WriteObjectCommand implements Pers
     private final DataEncryption dataEncrypter;
     private final boolean isUpdate;
 
-    WriteObjectCommand(
-            final boolean isUpdate,
-            final KeyCreator keyCreator,
-            final VersionCreator versionCreator,
-            final DataEncryption dataEncrypter,
-            final ObjectAdapter object) {
+    WriteObjectCommand(final boolean isUpdate, final KeyCreator keyCreator, final VersionCreator versionCreator, final DataEncryption dataEncrypter, final ObjectAdapter object) {
         this.isUpdate = isUpdate;
         this.keyCreator = keyCreator;
         this.versionCreator = versionCreator;
@@ -64,8 +59,7 @@ class WriteObjectCommand implements Pers
         final String user = IsisContext.getAuthenticationSession().getUserName();
 
         final Version currentVersion = object.getVersion();
-        final Version newVersion =
-            isUpdate ? versionCreator.nextVersion(currentVersion) : versionCreator.newVersion(user);
+        final Version newVersion = isUpdate ? versionCreator.nextVersion(currentVersion) : versionCreator.newVersion(user);
         object.setOptimisticLock(newVersion);
         if (newVersion != null) {
             final String version = currentVersion == null ? null : versionCreator.versionString(currentVersion);
@@ -103,8 +97,7 @@ class WriteObjectCommand implements Pers
         }
     }
 
-    private void writeAggregatedObject(final StateWriter writer, final ObjectAssociation association,
-        final ObjectAdapter field, final KeyCreator keyCreator) {
+    private void writeAggregatedObject(final StateWriter writer, final ObjectAssociation association, final ObjectAdapter field, final KeyCreator keyCreator) {
         if (field == null) {
             writer.writeField(association.getId(), null);
         } else if (field.getOid() instanceof AggregatedOid) {
@@ -113,13 +106,11 @@ class WriteObjectCommand implements Pers
             aggregateWriter.writeId(((AggregatedOid) field.getOid()).getId());
             writeFields(aggregateWriter, specName, field);
         } else {
-            throw new NoSqlStoreException("Object type is inconsistent with it OID - it should have an AggregatedOid: "
-                + field);
+            throw new NoSqlStoreException("Object type is inconsistent with it OID - it should have an AggregatedOid: " + field);
         }
     }
 
-    private void writeReference(final StateWriter writer, final ObjectAssociation association,
-        final ObjectAdapter reference, final KeyCreator keyCreator) {
+    private void writeReference(final StateWriter writer, final ObjectAssociation association, final ObjectAdapter reference, final KeyCreator keyCreator) {
         if (reference == null) {
             writer.writeField(association.getId(), null);
         } else {
@@ -135,13 +126,12 @@ class WriteObjectCommand implements Pers
         } else {
             final EncodableFacet encodeableFacet = value.getSpecification().getFacet(EncodableFacet.class);
             data = encodeableFacet.toEncodedString(value);
-            data  = dataEncrypter.encrypt(data);
+            data = dataEncrypter.encrypt(data);
         }
         writer.writeField(association.getId(), data);
     }
 
-    private void writeCollection(final StateWriter writer, final ObjectAssociation association,
-        final ObjectAdapter collection, final KeyCreator keyCreator) {
+    private void writeCollection(final StateWriter writer, final ObjectAssociation association, final ObjectAdapter collection, final KeyCreator keyCreator) {
         final CollectionFacet collectionFacet = collection.getSpecification().getFacet(CollectionFacet.class);
         if (association.getSpecification().isAggregated()) {
             final List<StateWriter> elements = new ArrayList<StateWriter>();
@@ -156,9 +146,7 @@ class WriteObjectCommand implements Pers
             String refs = "";
             for (final ObjectAdapter element : collectionFacet.iterable(collection)) {
                 if (element.isAggregated()) {
-                    throw new DomainModelException(
-                        "Can't store an aggregated object within a collection that is not exoected aggregates: "
-                            + element + " (" + collection + ")");
+                    throw new DomainModelException("Can't store an aggregated object within a collection that is not exoected aggregates: " + element + " (" + collection + ")");
                 }
                 refs += keyCreator.reference(element) + "|";
             }



Mime
View raw message