You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2010/11/18 02:11:42 UTC

svn commit: r1036307 [2/2] - in /incubator/isis/trunk: alternatives/ alternatives/objectstore/xml/ alternatives/objectstore/xml/src/main/java/org/apache/isis/alternatives/objectstore/xml/ alternatives/objectstore/xml/src/main/java/org/apache/isis/alter...

Modified: incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestProxySystem.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestProxySystem.java?rev=1036307&r1=1036306&r2=1036307&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestProxySystem.java (original)
+++ incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestProxySystem.java Thu Nov 18 01:11:40 2010
@@ -17,13 +17,12 @@
  *  under the License.
  */
 
+package org.apache.isis.core.runtime.testsystem;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Vector;
 
-package org.apache.isis.core.runtime.testsystem;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.Vector;
-
 import org.apache.isis.core.commons.ensure.Assert;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.ResolveState;
@@ -55,227 +54,215 @@ import org.apache.isis.core.runtime.tran
 import org.apache.isis.core.runtime.transaction.updatenotifier.UpdateNotifierDefault;
 import org.apache.isis.core.runtime.userprofile.UserProfileLoader;
 import org.apache.isis.core.runtime.userprofile.UserProfileLoaderDefault;
-import org.apache.isis.core.runtime.userprofile.UserProfileStore;
 import org.apache.isis.core.runtime.userprofile.UserProfileLoaderDefault.Mode;
-import org.apache.isis.core.runtime.userprofile.inmemory.InMemoryUserProfileStore;
-
-
-//TODO replace with TestProxySystemII
-public class TestProxySystem {
-    
-    private int nextId = 1;
-    private final TestProxyConfiguration configuration;
-    private IsisContext context;
-    
-    private UserProfileLoader userProfileLoader;
-    private UserProfileStore userprofileStore;
-    private TestProxyPersistenceSessionFactory persistenceSessionFactory;
-    
-    private PersistenceSession persistenceSession;
-    private final TestProxyReflector reflector;
-    private final UpdateNotifierDefault updateNotifier;
-    private final TemplateImageLoader noopTemplateImageLoader;
-    protected AuthenticationManager authenticationManager;
-    protected AuthorizationManager authorizationManager;
-	private List<Object> servicesList;
-
-
-    public TestProxySystem() {
-        noopTemplateImageLoader = new TemplateImageLoaderNoop();
-        reflector = new TestProxyReflector();
-        
-        servicesList = Collections.emptyList();
-
-        // all a bit hacky...
-        persistenceSessionFactory = new TestProxyPersistenceSessionFactory();
-        userprofileStore = new InMemoryUserProfileStore();
-        userProfileLoader = new UserProfileLoaderDefault(userprofileStore, Mode.RELAXED);
-        persistenceSession = new TestProxyPersistenceSession(persistenceSessionFactory);
-        persistenceSessionFactory.setPersistenceSessionToCreate(persistenceSession);
-        
-        configuration = new TestProxyConfiguration();
-        configuration.add(ConfigurationConstants.ROOT + "locale", "en_GB");
-        authenticationManager = new AuthenticationManagerNoop();
-        authorizationManager = new AuthorizationManagerNoop();
-        updateNotifier = new UpdateNotifierDefault();
-    }
-    
-
-    public TestProxyAdapter createAdapterForTransient(final Object associate) {
-        final TestProxyAdapter testProxyObjectAdapter = new TestProxyAdapter();
-        testProxyObjectAdapter.setupObject(associate);
-        testProxyObjectAdapter.setupSpecification(getSpecification(associate.getClass()));
-        testProxyObjectAdapter.setupResolveState(ResolveState.TRANSIENT);
-        testProxyObjectAdapter.setupOid(new TestProxyOid(nextId++));
-        return testProxyObjectAdapter;
-    }
-
-    public void init() {
-    	reflector.setRuntimeContext(new RuntimeContextFromSession());
-    	
-        IsisSessionFactory sessionFactory = 
-            new IsisSessionFactoryDefault(
-                    DeploymentType.EXPLORATION, 
-                    configuration, 
-                    noopTemplateImageLoader, 
-                    reflector, 
-                    authenticationManager, 
-                    authorizationManager,
-                    userProfileLoader, 
-                    persistenceSessionFactory, servicesList);
-        
-        persistenceSession.setSpecificationLoader(reflector);
-        // this implementation of persistenceSession will automatically inject 
-        // its own transaction manager into itself.
-        
-        sessionFactory.init();
-        context = IsisContextStatic.createRelaxedInstance(sessionFactory);
-        
-        // commented out cos think now redundant since calling openExecutionContext below
-        // persistor.open();
-
-        IsisContext.openSession(new TestProxySession());
-
-    }
-
-    public void shutdown() {
-        IsisContext.closeAllSessions();
-    }
-
-    public void resetLoader() {
-        persistenceSession.testReset();
-    }
-
-    public ObjectAdapter createPersistentTestObject() {
-        final TestPojo pojo = new TestPojo();
-        return createPersistentTestObject(pojo);
-    }
-
-    public ObjectAdapter createPersistentTestObject(final Object domainObject) {
-        final ObjectAdapter adapter = createTransientTestObject(domainObject);
-        
-        // similar to object store implementation
-        getAdapterManagerPersist().remapAsPersistent(adapter);
-        
-        // would be done by the object store, we must do ourselves.
-        adapter.setOptimisticLock(new TestProxyVersion(1));
-        
-        return adapter;
-    }
-
-    public void makePersistent(final TestProxyAdapter adapter) {
-        final Oid oid = adapter.getOid();
-        getOidGenerator().convertTransientToPersistentOid(oid);
-        adapter.setupOid(oid);
-        persistenceSession.makePersistent(adapter);
-    }
-
-    // commented out since never used locally
-//    private void setUpSpecification(final TestPojo pojo, final TestProxyAdapter adapter) {
-//        adapter.setupSpecification(reflector.loadSpecification(pojo.getClass()));
-//    }
-
-    // commented out since never used locally
-//    private void addAdapterToIdentityMap(final Object domainObject, final ObjectAdapter adapter) {
-//        ((PersistenceSessionSpy) persistor).addAdapter(domainObject, adapter);
-//    }
-
-    public ObjectAdapter createTransientTestObject() {
-        final TestPojo pojo = new TestPojo();
-        return createTransientTestObject(pojo);
-    }
-
-    public ObjectAdapter createTransientTestObject(final Object domainObject) {
-        final TestProxyOid oid = new TestProxyOid(nextId++, false);
-        final ObjectAdapter adapterFor = getAdapterManagerTestSupport().testCreateTransient(domainObject, oid);
-        Assert.assertEquals("", ResolveState.TRANSIENT, adapterFor.getResolveState());
-        return adapterFor;
-    }
-
-    public TestProxySpecification getSpecification(final Class<?> type) {
-        return (TestProxySpecification) reflector.loadSpecification(type);
-    }
-
-    public void setPersistenceSession(final PersistenceSession persistor) {
-        this.persistenceSession = persistor;
-        if (context != null) {
-            IsisSessionDefault current = (IsisSessionDefault) context.getSessionInstance();
-            current.testSetObjectPersistor(persistor);
-        }
-    }
-
+import org.apache.isis.core.runtime.userprofile.UserProfileStore;
+
+//TODO replace with TestProxySystemII
+public class TestProxySystem {
+
+    private int nextId = 1;
+    private final TestProxyConfiguration configuration;
+    private IsisContext context;
+
+    private final UserProfileLoader userProfileLoader;
+    private final UserProfileStore userprofileStore;
+    private final TestProxyPersistenceSessionFactory persistenceSessionFactory;
+
+    private PersistenceSession persistenceSession;
+    private final TestProxyReflector reflector;
+    private final UpdateNotifierDefault updateNotifier;
+    private final TemplateImageLoader noopTemplateImageLoader;
+    protected AuthenticationManager authenticationManager;
+    protected AuthorizationManager authorizationManager;
+    private final List<Object> servicesList;
+
+    public TestProxySystem() {
+        noopTemplateImageLoader = new TemplateImageLoaderNoop();
+        reflector = new TestProxyReflector();
+
+        servicesList = Collections.emptyList();
+
+        // all a bit hacky...
+        persistenceSessionFactory = new TestProxyPersistenceSessionFactory();
+        userprofileStore = new TestUserProfileStore();
+        userProfileLoader = new UserProfileLoaderDefault(userprofileStore, Mode.RELAXED);
+        persistenceSession = new TestProxyPersistenceSession(persistenceSessionFactory);
+        persistenceSessionFactory.setPersistenceSessionToCreate(persistenceSession);
+
+        configuration = new TestProxyConfiguration();
+        configuration.add(ConfigurationConstants.ROOT + "locale", "en_GB");
+        authenticationManager = new AuthenticationManagerNoop();
+        authorizationManager = new AuthorizationManagerNoop();
+        updateNotifier = new UpdateNotifierDefault();
+    }
+
+    public TestProxyAdapter createAdapterForTransient(final Object associate) {
+        final TestProxyAdapter testProxyObjectAdapter = new TestProxyAdapter();
+        testProxyObjectAdapter.setupObject(associate);
+        testProxyObjectAdapter.setupSpecification(getSpecification(associate.getClass()));
+        testProxyObjectAdapter.setupResolveState(ResolveState.TRANSIENT);
+        testProxyObjectAdapter.setupOid(new TestProxyOid(nextId++));
+        return testProxyObjectAdapter;
+    }
+
+    public void init() {
+        reflector.setRuntimeContext(new RuntimeContextFromSession());
+
+        IsisSessionFactory sessionFactory =
+            new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, noopTemplateImageLoader,
+                reflector, authenticationManager, authorizationManager, userProfileLoader, persistenceSessionFactory,
+                servicesList);
+
+        persistenceSession.setSpecificationLoader(reflector);
+        // this implementation of persistenceSession will automatically inject
+        // its own transaction manager into itself.
+
+        sessionFactory.init();
+        context = IsisContextStatic.createRelaxedInstance(sessionFactory);
+
+        // commented out cos think now redundant since calling openExecutionContext below
+        // persistor.open();
+
+        IsisContext.openSession(new TestProxySession());
+
+    }
+
+    public void shutdown() {
+        IsisContext.closeAllSessions();
+    }
+
+    public void resetLoader() {
+        persistenceSession.testReset();
+    }
+
+    public ObjectAdapter createPersistentTestObject() {
+        final TestPojo pojo = new TestPojo();
+        return createPersistentTestObject(pojo);
+    }
+
+    public ObjectAdapter createPersistentTestObject(final Object domainObject) {
+        final ObjectAdapter adapter = createTransientTestObject(domainObject);
+
+        // similar to object store implementation
+        getAdapterManagerPersist().remapAsPersistent(adapter);
+
+        // would be done by the object store, we must do ourselves.
+        adapter.setOptimisticLock(new TestProxyVersion(1));
+
+        return adapter;
+    }
+
+    public void makePersistent(final TestProxyAdapter adapter) {
+        final Oid oid = adapter.getOid();
+        getOidGenerator().convertTransientToPersistentOid(oid);
+        adapter.setupOid(oid);
+        persistenceSession.makePersistent(adapter);
+    }
+
+    // commented out since never used locally
+    // private void setUpSpecification(final TestPojo pojo, final TestProxyAdapter adapter) {
+    // adapter.setupSpecification(reflector.loadSpecification(pojo.getClass()));
+    // }
+
+    // commented out since never used locally
+    // private void addAdapterToIdentityMap(final Object domainObject, final ObjectAdapter adapter) {
+    // ((PersistenceSessionSpy) persistor).addAdapter(domainObject, adapter);
+    // }
+
+    public ObjectAdapter createTransientTestObject() {
+        final TestPojo pojo = new TestPojo();
+        return createTransientTestObject(pojo);
+    }
+
+    public ObjectAdapter createTransientTestObject(final Object domainObject) {
+        final TestProxyOid oid = new TestProxyOid(nextId++, false);
+        final ObjectAdapter adapterFor = getAdapterManagerTestSupport().testCreateTransient(domainObject, oid);
+        Assert.assertEquals("", ResolveState.TRANSIENT, adapterFor.getResolveState());
+        return adapterFor;
+    }
+
+    public TestProxySpecification getSpecification(final Class<?> type) {
+        return (TestProxySpecification) reflector.loadSpecification(type);
+    }
+
+    public void setPersistenceSession(final PersistenceSession persistor) {
+        this.persistenceSession = persistor;
+        if (context != null) {
+            IsisSessionDefault current = (IsisSessionDefault) context.getSessionInstance();
+            current.testSetObjectPersistor(persistor);
+        }
+    }
+
     /**
      * 
-     */
-    public TestProxyCollectionAdapter createPersistentTestCollection() {
-        final TestProxyCollectionAdapter collection = new TestProxyCollectionAdapter(new Vector());
-        final TestProxySpecification specification = getSpecification(Vector.class);
-        final TestProxySpecification elementSpecification = getSpecification(Object.class);
-        specification.addFacet(new TestProxyCollectionFacet());
-        specification.addFacet(new TypeOfFacetDefaultToObject(elementSpecification, reflector) {});
-        collection.setupSpecification(specification);
-        return collection;
-    }
-
-    public TestProxySpecification getSpecification(final ObjectAdapter object) {
-        return (TestProxySpecification) object.getSpecification();
-    }
-
-    public void addSpecification(final ObjectSpecification specification) {
-        reflector.addSpecification(specification);
-    }
-
-    public void addConfiguration(final String name, final String value) {
-        configuration.add(name, value);
-    }
-
-    public UpdateNotifier getUpdateNotifer() {
-        return updateNotifier;
-    }
-
-    public ObjectReflector getReflector() {
-        return reflector;
-    }
-
-    public PersistenceSession getPersistenceSession() {
-        return persistenceSession;
-    }
-    
-    public TestProxyConfiguration getConfiguration() {
-        return configuration;
-    }
-
-    /**
-     * Created automatically by the persistor.
-     */
-    public AdapterFactory getAdapterFactory() {
-        return  persistenceSession.getAdapterFactory();
-    }
-    
-    /**
-     * Created automatically by the persistor.
-     */
-    public AdapterManager getAdapterManager() {
-        return persistenceSession.getAdapterManager();
-    }
-
-    public AdapterManagerTestSupport getAdapterManagerTestSupport() {
-        return (AdapterManagerTestSupport) persistenceSession.getAdapterManager();
-    }
-
-    public AdapterManagerPersist getAdapterManagerPersist() {
-        return (AdapterManagerPersist) persistenceSession.getAdapterManager();
-    }
-
-
-    private IsisTransactionManager getTransactionManager() {
-        return persistenceSession.getTransactionManager();
-    }
-
-
-    private OidGenerator getOidGenerator() {
-        return persistenceSession.getOidGenerator();
-    }
-
-
-}
+     */
+    public TestProxyCollectionAdapter createPersistentTestCollection() {
+        final TestProxyCollectionAdapter collection = new TestProxyCollectionAdapter(new Vector());
+        final TestProxySpecification specification = getSpecification(Vector.class);
+        final TestProxySpecification elementSpecification = getSpecification(Object.class);
+        specification.addFacet(new TestProxyCollectionFacet());
+        specification.addFacet(new TypeOfFacetDefaultToObject(elementSpecification, reflector) {
+        });
+        collection.setupSpecification(specification);
+        return collection;
+    }
+
+    public TestProxySpecification getSpecification(final ObjectAdapter object) {
+        return (TestProxySpecification) object.getSpecification();
+    }
+
+    public void addSpecification(final ObjectSpecification specification) {
+        reflector.addSpecification(specification);
+    }
+
+    public void addConfiguration(final String name, final String value) {
+        configuration.add(name, value);
+    }
+
+    public UpdateNotifier getUpdateNotifer() {
+        return updateNotifier;
+    }
+
+    public ObjectReflector getReflector() {
+        return reflector;
+    }
+
+    public PersistenceSession getPersistenceSession() {
+        return persistenceSession;
+    }
+
+    public TestProxyConfiguration getConfiguration() {
+        return configuration;
+    }
+
+    /**
+     * Created automatically by the persistor.
+     */
+    public AdapterFactory getAdapterFactory() {
+        return persistenceSession.getAdapterFactory();
+    }
+
+    /**
+     * Created automatically by the persistor.
+     */
+    public AdapterManager getAdapterManager() {
+        return persistenceSession.getAdapterManager();
+    }
+
+    public AdapterManagerTestSupport getAdapterManagerTestSupport() {
+        return (AdapterManagerTestSupport) persistenceSession.getAdapterManager();
+    }
+
+    public AdapterManagerPersist getAdapterManagerPersist() {
+        return (AdapterManagerPersist) persistenceSession.getAdapterManager();
+    }
+
+    private IsisTransactionManager getTransactionManager() {
+        return persistenceSession.getTransactionManager();
+    }
+
+    private OidGenerator getOidGenerator() {
+        return persistenceSession.getOidGenerator();
+    }
+
+}

Added: incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestUserProfileStore.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestUserProfileStore.java?rev=1036307&view=auto
==============================================================================
--- incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestUserProfileStore.java (added)
+++ incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestUserProfileStore.java Thu Nov 18 01:11:40 2010
@@ -0,0 +1,59 @@
+/*
+ *  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.runtime.testsystem;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.isis.core.commons.debug.DebugInfo;
+import org.apache.isis.core.commons.debug.DebugString;
+import org.apache.isis.core.runtime.userprofile.UserProfile;
+import org.apache.isis.core.runtime.userprofile.UserProfileStore;
+
+public class TestUserProfileStore implements UserProfileStore, DebugInfo {
+	
+    private static final Map<String, UserProfile> profiles = new HashMap<String, UserProfile>();
+    
+    public boolean isFixturesInstalled() {
+    	return false;
+    }
+    
+    public UserProfile getUserProfile(String name) {
+        return profiles.get(name);
+    }
+
+    public void save(String name, UserProfile userProfile) {
+        profiles.put(name, userProfile);
+    }
+
+    public void debugData(DebugString debug) {
+        for (String name : profiles.keySet()) {
+            debug.appendln(name, profiles.get(name));
+        }
+    }
+
+    public String debugTitle() {
+        return "InMemoryUserProfileStore";
+    }
+
+}
+
+

Modified: incubator/isis/trunk/defaults/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/defaults/pom.xml?rev=1036307&r1=1036306&r2=1036307&view=diff
==============================================================================
--- incubator/isis/trunk/defaults/pom.xml (original)
+++ incubator/isis/trunk/defaults/pom.xml Thu Nov 18 01:11:40 2010
@@ -33,6 +33,7 @@
         <module>bytecode</module>
         <module>security</module>
         <module>objectstore</module>
+        <module>profilestore</module>
         <module>progmodel</module>
     </modules>
 
@@ -104,6 +105,18 @@
 
             <dependency>
                 <groupId>org.apache.isis.defaults</groupId>
+                <artifactId>profilestore</artifactId>
+                <version>0.1-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.isis.defaults</groupId>
+                <artifactId>profilestore</artifactId>
+                <version>0.1-SNAPSHOT</version>
+                <type>test-jar</type>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.isis.defaults</groupId>
                 <artifactId>security</artifactId>
                 <version>0.1-SNAPSHOT</version>
             </dependency>

Propchange: incubator/isis/trunk/defaults/profilestore/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Nov 18 01:11:40 2010
@@ -0,0 +1,4 @@
+.settings
+target
+.classpath
+.project

Copied: incubator/isis/trunk/defaults/profilestore/src/main/java/org/apache/isis/defaults/profilestore/InMemoryUserProfileStore.java (from r1036141, incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/userprofile/inmemory/InMemoryUserProfileStore.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/defaults/profilestore/src/main/java/org/apache/isis/defaults/profilestore/InMemoryUserProfileStore.java?p2=incubator/isis/trunk/defaults/profilestore/src/main/java/org/apache/isis/defaults/profilestore/InMemoryUserProfileStore.java&p1=incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/userprofile/inmemory/InMemoryUserProfileStore.java&r1=1036141&r2=1036307&rev=1036307&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/userprofile/inmemory/InMemoryUserProfileStore.java (original)
+++ incubator/isis/trunk/defaults/profilestore/src/main/java/org/apache/isis/defaults/profilestore/InMemoryUserProfileStore.java Thu Nov 18 01:11:40 2010
@@ -18,7 +18,7 @@
  */
 
 
-package org.apache.isis.core.runtime.userprofile.inmemory;
+package org.apache.isis.defaults.profilestore;
 
 import java.util.HashMap;
 import java.util.Map;

Copied: incubator/isis/trunk/defaults/profilestore/src/main/java/org/apache/isis/defaults/profilestore/InMemoryUserProfileStoreInstaller.java (from r1036141, incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/userprofile/inmemory/InMemoryUserProfileStoreInstaller.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/defaults/profilestore/src/main/java/org/apache/isis/defaults/profilestore/InMemoryUserProfileStoreInstaller.java?p2=incubator/isis/trunk/defaults/profilestore/src/main/java/org/apache/isis/defaults/profilestore/InMemoryUserProfileStoreInstaller.java&p1=incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/userprofile/inmemory/InMemoryUserProfileStoreInstaller.java&r1=1036141&r2=1036307&rev=1036307&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/userprofile/inmemory/InMemoryUserProfileStoreInstaller.java (original)
+++ incubator/isis/trunk/defaults/profilestore/src/main/java/org/apache/isis/defaults/profilestore/InMemoryUserProfileStoreInstaller.java Thu Nov 18 01:11:40 2010
@@ -18,7 +18,7 @@
  */
 
 
-package org.apache.isis.core.runtime.userprofile.inmemory;
+package org.apache.isis.defaults.profilestore;
 
 import java.util.List;
 

Modified: incubator/isis/trunk/release/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/release/pom.xml?rev=1036307&r1=1036306&r2=1036307&view=diff
==============================================================================
--- incubator/isis/trunk/release/pom.xml (original)
+++ incubator/isis/trunk/release/pom.xml Thu Nov 18 01:11:40 2010
@@ -42,6 +42,8 @@
         <isis.alternatives-objectstore-sql.version>0.1-SNAPSHOT</isis.alternatives-objectstore-sql.version>
         <isis.alternatives-objectstore-nosql.version>0.1-SNAPSHOT</isis.alternatives-objectstore-nosql.version>
 
+        <isis.alternatives-profilestore-xml.version>0.1-SNAPSHOT</isis.alternatives-profilestore-xml.version>
+
         <!-- used for javassist, identity -->
         <isis.alternatives-bytecode.version>0.1-SNAPSHOT</isis.alternatives-bytecode.version>
 
@@ -131,6 +133,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.defaults</groupId>
+                <artifactId>profilestore</artifactId>
+                <version>${isis.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.isis.defaults</groupId>
                 <artifactId>security</artifactId>
                 <version>${isis.version}</version>
             </dependency>
@@ -269,6 +276,13 @@
                 <version>${isis.alternatives-objectstore-sql.version}</version>
             </dependency>
 
+            <!-- alternatives: profilestore: xml -->
+            <dependency>
+                <groupId>org.apache.isis.alternatives.profilestore</groupId>
+                <artifactId>xml</artifactId>
+                <version>${isis.alternatives-profilestore-xml.version}</version>
+            </dependency>
+
             <!-- alternatives: progmodel: wrapper -->
             <dependency>
                 <groupId>org.apache.isis.alternatives.progmodel</groupId>

Modified: incubator/isis/trunk/support/prototype/quickrun/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/quickrun/pom.xml?rev=1036307&r1=1036306&r2=1036307&view=diff
==============================================================================
--- incubator/isis/trunk/support/prototype/quickrun/pom.xml (original)
+++ incubator/isis/trunk/support/prototype/quickrun/pom.xml Thu Nov 18 01:11:40 2010
@@ -39,6 +39,10 @@
         </dependency>
         <dependency>
             <groupId>org.apache.isis.defaults</groupId>
+            <artifactId>profilestore</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.isis.defaults</groupId>
             <artifactId>progmodel</artifactId>
         </dependency>
         <dependency>

Modified: incubator/isis/trunk/support/prototype/viewer-html/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/viewer-html/pom.xml?rev=1036307&r1=1036306&r2=1036307&view=diff
==============================================================================
--- incubator/isis/trunk/support/prototype/viewer-html/pom.xml (original)
+++ incubator/isis/trunk/support/prototype/viewer-html/pom.xml Thu Nov 18 01:11:40 2010
@@ -55,6 +55,10 @@
         </dependency>
         <dependency>
             <groupId>org.apache.isis.defaults</groupId>
+            <artifactId>profilestore</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.isis.defaults</groupId>
             <artifactId>bytecode</artifactId>
         </dependency>
         <dependency>

Modified: incubator/isis/trunk/support/prototype/viewer-restful/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/viewer-restful/pom.xml?rev=1036307&r1=1036306&r2=1036307&view=diff
==============================================================================
--- incubator/isis/trunk/support/prototype/viewer-restful/pom.xml (original)
+++ incubator/isis/trunk/support/prototype/viewer-restful/pom.xml Thu Nov 18 01:11:40 2010
@@ -55,6 +55,10 @@
         </dependency>
         <dependency>
             <groupId>org.apache.isis.defaults</groupId>
+            <artifactId>profilestore</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.isis.defaults</groupId>
             <artifactId>bytecode</artifactId>
         </dependency>
         <dependency>

Modified: incubator/isis/trunk/support/prototype/viewer-scimpi/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/viewer-scimpi/pom.xml?rev=1036307&r1=1036306&r2=1036307&view=diff
==============================================================================
--- incubator/isis/trunk/support/prototype/viewer-scimpi/pom.xml (original)
+++ incubator/isis/trunk/support/prototype/viewer-scimpi/pom.xml Thu Nov 18 01:11:40 2010
@@ -55,6 +55,10 @@
         </dependency>
         <dependency>
             <groupId>org.apache.isis.defaults</groupId>
+            <artifactId>profilestore</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.isis.defaults</groupId>
             <artifactId>bytecode</artifactId>
         </dependency>
         <dependency>

Modified: incubator/isis/trunk/support/prototype/viewer-wicket/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/viewer-wicket/pom.xml?rev=1036307&r1=1036306&r2=1036307&view=diff
==============================================================================
--- incubator/isis/trunk/support/prototype/viewer-wicket/pom.xml (original)
+++ incubator/isis/trunk/support/prototype/viewer-wicket/pom.xml Thu Nov 18 01:11:40 2010
@@ -72,6 +72,10 @@
         </dependency>
         <dependency>
             <groupId>org.apache.isis.defaults</groupId>
+            <artifactId>profilestore</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.isis.defaults</groupId>
             <artifactId>bytecode</artifactId>
         </dependency>
         <dependency>

Modified: incubator/isis/trunk/viewer/bdd/common/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/bdd/common/pom.xml?rev=1036307&r1=1036306&r2=1036307&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/bdd/common/pom.xml (original)
+++ incubator/isis/trunk/viewer/bdd/common/pom.xml Thu Nov 18 01:11:40 2010
@@ -29,6 +29,10 @@
         </dependency>
         <dependency>
             <groupId>org.apache.isis.defaults</groupId>
+            <artifactId>profilestore</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.isis.defaults</groupId>
             <artifactId>security</artifactId>
         </dependency>
 	    <dependency>

Modified: incubator/isis/trunk/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/CellBinding.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/CellBinding.java?rev=1036307&r1=1036306&r2=1036307&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/CellBinding.java (original)
+++ incubator/isis/trunk/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/CellBinding.java Thu Nov 18 01:11:40 2010
@@ -5,7 +5,6 @@ import java.util.List;
 
 import org.apache.isis.viewer.bdd.common.util.Strings;
 
-
 public abstract class CellBinding {
 
     private boolean found = false;
@@ -19,18 +18,19 @@ public abstract class CellBinding {
     private final boolean autoCreate;
     private final boolean ditto;
     private final boolean optional;
-	private boolean dittoed;
 
-    protected CellBinding(final String name, final boolean autoCreate,
-            final boolean ditto, final boolean optional,
-            final String[] headTexts) {
+    // ///////////////////////////////////////////////////////////////
+    // Constructor
+    // ///////////////////////////////////////////////////////////////
+
+    protected CellBinding(final String name, final boolean autoCreate, final boolean ditto, final boolean optional,
+        final String[] headTexts) {
         this.name = name;
         this.autoCreate = autoCreate;
         this.ditto = ditto;
         this.optional = optional;
         if (headTexts.length == 0) {
-            throw new IllegalArgumentException(
-                    "Require at least one heading text");
+            throw new IllegalArgumentException("Require at least one heading text");
         }
         final List<String> headTextList = new ArrayList<String>();
         for (final String headText : headTexts) {
@@ -39,67 +39,101 @@ public abstract class CellBinding {
         this.headTexts = headTextList;
     }
 
+    public String getName() {
+        return name;
+    }
+
+    public boolean isOptional() {
+        return optional;
+    }
+
+    public boolean isAutoCreate() {
+        return autoCreate;
+    }
+
+    private void ditto(final StoryCell previousCell) {
+        copy(previousCell, getCurrentCell());
+    }
+
+    public List<String> getHeadTexts() {
+        return headTexts;
+    }
+
+    public boolean isDitto() {
+        return ditto;
+    }
+
+    // ///////////////////////////////////////////////////////////////
+    // matches (for searching head column)
+    // ///////////////////////////////////////////////////////////////
+
     /**
-     * Whether the head cell was found.
+     * For the BDD framework integration to search whether this particular {@link CellBinding} corresponds to a
+     * particular head text.
      */
-    public boolean isFound() {
-        return found;
+    public boolean matches(final String candidateText) {
+        final String candidateTextCamelLower = Strings.camel(candidateText).toLowerCase();
+        for (final String headText : getHeadTexts()) {
+            if (headText.equalsIgnoreCase(candidateTextCamelLower)) {
+                return true;
+            }
+        }
+        return false;
     }
 
+    // ///////////////////////////////////////////////////////////////
+    // set Head Column
+    // ///////////////////////////////////////////////////////////////
+
     /**
-     * The column that is found, if any.
+     * For the BDD framework integration to indicate the head column, but without no {@link #getHeadCell() head cell}.
      */
-    public int getColumn() {
-        return column;
+    public void setHeadColumn(final int column) {
+        this.found = true;
+        setColumnAndHeadCell(column, null);
     }
 
     /**
-     * The head cell with the text, if any.
+     * For the BDD framework integration to indicate that the head cell has been found.
      */
-    public StoryCell getHeadCell() {
-        return headCell;
+    public void setHeadColumn(final int column, final StoryCell headCell) {
+        this.found = true;
+        setColumnAndHeadCell(column, headCell);
     }
 
     /**
-     * Indicate that the head cell has been found.
+     * For the BDD framework integration to indicate that the head cell was not found and has been created.
      */
-    public void foundHeadColumn(final int column, final StoryCell headCell) {
-        this.found = true;
-        set(column, headCell);
+    public void createHeadCell(final int column, final StoryCell headCell) {
+        setColumnAndHeadCell(column, headCell);
     }
 
     /**
-     * Indicate that the head column.
+     * Whether the head cell was found.
      */
-    public void setHeadColumn(final int column) {
-        this.found = true;
-        set(column, null);
+    public boolean isFound() {
+        return found;
     }
 
+    /**
+     * The column that is found, if any.
+     */
+    public int getColumn() {
+        return column;
+    }
 
     /**
-     * Indicate that the head cell was not found and has been created.
+     * The head cell with the text, if any.
      */
-    public void create(final int column, final StoryCell headCell) {
-        set(column, headCell);
+    public StoryCell getHeadCell() {
+        return headCell;
     }
 
-    private void set(final int column, final StoryCell headCell) {
+    private void setColumnAndHeadCell(final int column, final StoryCell headCell) {
         this.column = column;
         this.headCell = headCell;
     }
 
-    public boolean matches(final String candidateText) {
-        final String candidateTextCamelLower = Strings.camel(candidateText)
-                .toLowerCase();
-        for (final String headText : getHeadTexts()) {
-            if (headText.equalsIgnoreCase(candidateTextCamelLower)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
     /**
      * Holds onto a current (body) cell.
      */
@@ -114,78 +148,60 @@ public abstract class CellBinding {
         this.currentCell = cell;
     }
 
-    public boolean isOptional() {
-        return optional;
-    }
-
-    public String getName() {
-        return name;
-    }
+    // ///////////////////////////////////////////////////////////////
+    // capture current value
+    // ///////////////////////////////////////////////////////////////
 
+    private boolean dittoed;
 
-	/**
-	 * Captures the current, but checking that the column in which the
-	 * {@link StoryCell value} has been provided corresponds to the
-	 * {@link #getColumn() column} of this binding.
-	 * 
-	 * @see #captureCurrent(StoryCell)
-	 */
-	public void captureCurrent(final StoryCell cell, final int column) {
+    /**
+     * Captures the current value, but also checking that the column in which the {@link StoryCell value} has been
+     * provided corresponds to the {@link #getColumn() column} of this binding.
+     * 
+     * @see #captureCurrent(StoryCell)
+     */
+    public void captureCurrent(final StoryCell cell, final int column) {
         if (column != getColumn()) {
-        	return;
-		}
+            return;
+        }
         captureCurrent(cell);
     }
 
-	/**
-	 * Captures the current {@link StoryCell value} for this binding. 
-	 * 
-	 * <p>
-	 * For implementations where we already know that the value provided is for this
-	 * particular binding.
-	 */
-	public void captureCurrent(final StoryCell cell) {
+    /**
+     * Captures the current {@link StoryCell value} for this binding.
+     * 
+     * <p>
+     * For implementations where we already know that the value provided is for this particular binding.
+     */
+    public void captureCurrent(final StoryCell cell) {
         final StoryCell previousCell = getCurrentCell();
         setCurrentCell(cell);
-		boolean shouldDitto = Strings.emptyString(cell.getText());
-		boolean canDitto = isDitto() && previousCell != null;
-		if (shouldDitto && canDitto) {
-			ditto(previousCell);
-			dittoed = true;
+        boolean shouldDitto = Strings.emptyString(cell.getText());
+        boolean canDitto = isDitto() && previousCell != null;
+        if (shouldDitto && canDitto) {
+            ditto(previousCell);
+            dittoed = true;
         } else {
-        	dittoed = false;
+            dittoed = false;
         }
     }
-	
-	/**
-	 * Whether the most recent call to {@link #captureCurrent(StoryCell)} resulted in a ditto.
-	 */
-	public boolean isDittoed() {
-		return dittoed;
-	}
-
-	private void ditto(final StoryCell previousCell) {
-		copy(previousCell, getCurrentCell());
-	}
-
-	protected abstract void copy(final StoryCell from, StoryCell to);
 
-    @Override
-    public String toString() {
-        return found ? ("found, current=" + getCurrentCell().getText())
-                : "not found";
+    /**
+     * Whether the most recent call to {@link #captureCurrent(StoryCell)} resulted in a ditto.
+     */
+    public boolean isDittoed() {
+        return dittoed;
     }
 
-	public boolean isAutoCreate() {
-		return autoCreate;
-	}
+    protected abstract void copy(final StoryCell from, StoryCell to);
 
-	public List<String> getHeadTexts() {
-		return headTexts;
-	}
+    // ///////////////////////////////////////////////////////////////
+    // toString
+    // ///////////////////////////////////////////////////////////////
 
-	public boolean isDitto() {
-		return ditto;
-	}
+    @Override
+    public String toString() {
+        return found ? ("found, current=" + getCurrentCell().getText()) : "not found";
+    }
 
 }

Modified: incubator/isis/trunk/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/Story.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/Story.java?rev=1036307&r1=1036306&r2=1036307&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/Story.java (original)
+++ incubator/isis/trunk/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/Story.java Thu Nov 18 01:11:40 2010
@@ -27,7 +27,7 @@ import org.apache.isis.core.runtime.syst
 import org.apache.isis.core.runtime.system.SystemConstants;
 import org.apache.isis.core.runtime.system.internal.InitialisationSession;
 import org.apache.isis.core.runtime.transaction.IsisTransactionManager;
-import org.apache.isis.core.runtime.userprofile.inmemory.InMemoryUserProfileStoreInstaller;
+import org.apache.isis.defaults.profilestore.InMemoryUserProfileStoreInstaller;
 import org.apache.isis.viewer.bdd.common.components.StoryAuthenticationManagerInstaller;
 import org.apache.isis.viewer.bdd.common.components.StoryInMemoryPersistenceMechanismInstaller;
 import org.apache.isis.viewer.bdd.common.story.bootstrapping.OpenSession;

Modified: incubator/isis/trunk/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/components/IsisSystemUsingInstallersWithinStory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/components/IsisSystemUsingInstallersWithinStory.java?rev=1036307&r1=1036306&r2=1036307&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/components/IsisSystemUsingInstallersWithinStory.java (original)
+++ incubator/isis/trunk/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/components/IsisSystemUsingInstallersWithinStory.java Thu Nov 18 01:11:40 2010
@@ -6,27 +6,22 @@ import org.apache.isis.core.runtime.pers
 import org.apache.isis.core.runtime.system.DeploymentType;
 import org.apache.isis.core.runtime.system.installers.IsisSystemUsingInstallers;
 import org.apache.isis.core.runtime.userprofile.UserProfileStoreInstaller;
-import org.apache.isis.core.runtime.userprofile.inmemory.InMemoryUserProfileStoreInstaller;
+import org.apache.isis.defaults.profilestore.InMemoryUserProfileStoreInstaller;
 
-public class IsisSystemUsingInstallersWithinStory extends
-        IsisSystemUsingInstallers {
+public class IsisSystemUsingInstallersWithinStory extends IsisSystemUsingInstallers {
 
-    public IsisSystemUsingInstallersWithinStory(
-            final DeploymentType deploymentType,
-            final InstallerLookup installerLookup) {
+    public IsisSystemUsingInstallersWithinStory(final DeploymentType deploymentType,
+        final InstallerLookup installerLookup) {
         super(deploymentType, installerLookup);
 
         final AuthenticationManagerInstaller authManagerInstaller = new StoryAuthenticationManagerInstaller();
-        setAuthenticationInstaller(getInstallerLookup().injectDependenciesInto(
-                authManagerInstaller));
+        setAuthenticationInstaller(getInstallerLookup().injectDependenciesInto(authManagerInstaller));
 
         final PersistenceMechanismInstaller persistorInstaller = new StoryInMemoryPersistenceMechanismInstaller();
-        setPersistenceMechanismInstaller(getInstallerLookup()
-                .injectDependenciesInto(persistorInstaller));
+        setPersistenceMechanismInstaller(getInstallerLookup().injectDependenciesInto(persistorInstaller));
 
         final UserProfileStoreInstaller userProfileStoreInstaller = new InMemoryUserProfileStoreInstaller();
-        setUserProfileStoreInstaller(getInstallerLookup()
-                .injectDependenciesInto(userProfileStoreInstaller));
+        setUserProfileStoreInstaller(getInstallerLookup().injectDependenciesInto(userProfileStoreInstaller));
     }
 
 }

Modified: incubator/isis/trunk/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/internal/fixtures/AliasItemsInListForConcordion.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/internal/fixtures/AliasItemsInListForConcordion.java?rev=1036307&r1=1036306&r2=1036307&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/internal/fixtures/AliasItemsInListForConcordion.java (original)
+++ incubator/isis/trunk/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/internal/fixtures/AliasItemsInListForConcordion.java Thu Nov 18 01:11:40 2010
@@ -55,7 +55,7 @@ public class AliasItemsInListForConcordi
 		getPeer().getAliasBinding().setHeadColumn(1);
 
 		if (type != null) {
-			getPeer().getTypeBinding().foundHeadColumn(2,
+			getPeer().getTypeBinding().setHeadColumn(2,
 					new StoryCellDefault(type));
 		}
 		

Modified: incubator/isis/trunk/viewer/bdd/fitnesse/src/main/java/net/sf/isiscontrib/bdd/fitnesse/internal/CellBindingForFitNesse.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/bdd/fitnesse/src/main/java/net/sf/isiscontrib/bdd/fitnesse/internal/CellBindingForFitNesse.java?rev=1036307&r1=1036306&r2=1036307&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/bdd/fitnesse/src/main/java/net/sf/isiscontrib/bdd/fitnesse/internal/CellBindingForFitNesse.java (original)
+++ incubator/isis/trunk/viewer/bdd/fitnesse/src/main/java/net/sf/isiscontrib/bdd/fitnesse/internal/CellBindingForFitNesse.java Thu Nov 18 01:11:40 2010
@@ -69,7 +69,7 @@ public class CellBindingForFitNesse exte
             final int size = storyValuesMap.size();
             final Parse aliasCell = new Parse("td", Fixture.gray(getHeadTexts().get(0)), null, null);
             heads.last().more = aliasCell;
-            create(size, new StoryCellForFitNesse(aliasCell));
+            createHeadCell(size, new StoryCellForFitNesse(aliasCell));
         }
     }
 
@@ -89,7 +89,7 @@ public class CellBindingForFitNesse exte
             final String headText = storyValue.getText();
 
             if (matches(headText)) {
-                foundHeadColumn(colNum, storyValue);
+                setHeadColumn(colNum, storyValue);
                 break;
             }
         }

Modified: incubator/isis/trunk/viewer/bdd/fitnesse/src/main/java/net/sf/isiscontrib/bdd/fitnesse/internal/util/Aliases.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/bdd/fitnesse/src/main/java/net/sf/isiscontrib/bdd/fitnesse/internal/util/Aliases.java?rev=1036307&r1=1036306&r2=1036307&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/bdd/fitnesse/src/main/java/net/sf/isiscontrib/bdd/fitnesse/internal/util/Aliases.java (original)
+++ incubator/isis/trunk/viewer/bdd/fitnesse/src/main/java/net/sf/isiscontrib/bdd/fitnesse/internal/util/Aliases.java Thu Nov 18 01:11:40 2010
@@ -19,7 +19,7 @@ public final class Aliases {
             final String headText = eachHead.body;
 
             if (aliasInfo.matches(headText)) {
-                aliasInfo.foundHeadColumn(i, new StoryCellForFitNesse(eachHead));
+                aliasInfo.setHeadColumn(i, new StoryCellForFitNesse(eachHead));
                 return aliasInfo;
             }
         }
@@ -29,7 +29,7 @@ public final class Aliases {
             final int size = heads.size();
             final Parse aliasCell = new Parse("td", Fixture.gray(Constants.ALIAS_RESULT_HEAD), null, null);
             heads.last().more = aliasCell;
-            aliasInfo.create(size, new StoryCellForFitNesse(aliasCell));
+            aliasInfo.createHeadCell(size, new StoryCellForFitNesse(aliasCell));
         }
         return aliasInfo;
     }

Modified: incubator/isis/trunk/viewer/bdd/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/bdd/pom.xml?rev=1036307&r1=1036306&r2=1036307&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/bdd/pom.xml (original)
+++ incubator/isis/trunk/viewer/bdd/pom.xml Thu Nov 18 01:11:40 2010
@@ -115,5 +115,22 @@
 	    <module>fitnesse</module>
         -->
 	</modules>
+    
+    <profiles>
+        <profile>
+            <id>bdd-all</id>
+            <activation>
+                <property>
+                    <name>bdd</name>
+                    <value>all</value>
+                </property>
+            </activation>
+            <modules>
+                <module>common</module>
+                <module>concordion</module>
+                <module>fitnesse</module>
+            </modules>
+        </profile>
+    </profiles>
 
 </project>

Modified: incubator/isis/trunk/viewer/bdd/src/docbkx/guide/isis-bdd-viewer.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/bdd/src/docbkx/guide/isis-bdd-viewer.xml?rev=1036307&r1=1036306&r2=1036307&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/bdd/src/docbkx/guide/isis-bdd-viewer.xml (original)
+++ incubator/isis/trunk/viewer/bdd/src/docbkx/guide/isis-bdd-viewer.xml Thu Nov 18 01:11:40 2010
@@ -148,23 +148,30 @@
           <acronym>BDD</acronym> frameworks (such as
           <emphasis>FitNesse</emphasis>) where the provided text from the
           story needs to be parsed in some way, matching up columns with the
-          fixture. Other <acronym>BDD</acronym> frameworks (eg
+          fixture. The relevant methods for framework integrations that must
+          match <classname>CellBinding</classname>s to header columns are
+          <methodname>#matches(...)</methodname>,
+          <methodname>#setHeadColumn(..)</methodname> and
+          <methodname>#createHeadColumn(..)</methodname>. Note though that
+          other <acronym>BDD</acronym> frameworks (eg
           <emphasis>Concordion</emphasis>) don't need this particular feature
           (the <emphasis>Concordion</emphasis> integration calls pre-canned
           methods so the matching is done simply by parameter position to
           these method).</para>
 
-          <para>***</para>
-
-          <para></para>
-
-          <para></para>
-
-          <para></para>
+          <para>The other main method provided by
+          <classname>CellBinding</classname> is
+          <methodname>#captureCurrent(..)</methodname>. This is used (by all
+          framework integrations) to capture the current value for the column
+          which this binding represents. For example, for a column
+          representing a property name, it might hold the value
+          "firstName".</para>
 
           <para>The library provides a default implementation of
           <classname>CellBinding</classname>, though subclasses can override
-          if required.</para>
+          if required. (For example, <emphasis>FitNesse</emphasis> does this
+          in order to map to underlying mutable data structures that represent
+          cells in the FIT tables).</para>
         </listitem>
       </itemizedlist>
 
@@ -2282,7 +2289,7 @@ and running in &lt;span concordion:set="
         <para>Typically used in the "Then", though can be helpful as a way of
         confirming/documenting a "Given".</para>
 
-        <para>See also AliasItemsInList (<xref
+        <para>See also <classname>AliasItemsInList</classname> (<xref
         linkend="sec.AliasItemsInList" />), which also performs an implicit
         check (will fail if the objects are not in the list) and aliases them
         for further use.</para>
@@ -2320,7 +2327,7 @@ and running in &lt;span concordion:set="
         <para>Allows an alias to be associated with items in a list. The list
         items are located by their title, and are presumed to exist. This
         fixture can therefore also be used as a way of checking for presence
-        of items in a list (similar to CheckList, <xref
+        of items in a list (similar to <classname>CheckList</classname>, <xref
         linkend="sec.CheckList" />).</para>
 
         <para>Typically used both in the "Given" (to simplify writing the rest

Modified: incubator/isis/trunk/viewer/junit/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/junit/pom.xml?rev=1036307&r1=1036306&r2=1036307&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/junit/pom.xml (original)
+++ incubator/isis/trunk/viewer/junit/pom.xml Thu Nov 18 01:11:40 2010
@@ -1,31 +1,31 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.isis</groupId>
+        <artifactId>viewer</artifactId>
+        <version>0.1-SNAPSHOT</version>
+    </parent>
 
-	<parent>
-		<groupId>org.apache.isis</groupId>
-		<artifactId>viewer</artifactId>
-		<version>0.1-SNAPSHOT</version>
-	</parent>
+    <groupId>org.apache.isis.viewer</groupId>
+    <artifactId>junit</artifactId>
 
-	<groupId>org.apache.isis.viewer</groupId>
-	<artifactId>junit</artifactId>
+    <name>JUnit Viewer</name>
 
-	<name>JUnit Viewer</name>
-
-	<properties>
+    <properties>
         <siteBaseDir>../..</siteBaseDir>
-		<relativeUrl>viewer/junit/</relativeUrl>
+        <relativeUrl>viewer/junit/</relativeUrl>
 
-        <core.version>0.1-SNAPSHOT</core.version>
-    	<wrapper-progmodel.version>0.1-SNAPSHOT</wrapper-progmodel.version>
+        <wrapper-progmodel.version>0.1-SNAPSHOT</wrapper-progmodel.version>
         <identity-bytecode.version>0.1-SNAPSHOT</identity-bytecode.version>
 
         <docbkxGuideTitle>Apache Isis JUnit Support</docbkxGuideTitle>
         <docbkxGuideSubTitle>Acceptance Testing using JUnit</docbkxGuideSubTitle>
         <docbkxGuideName>isis-junit-support</docbkxGuideName>
-	</properties>
+    </properties>
 
-	<url>http://incubator.apache.org/isis/${relativeUrl}</url>
+    <url>http://incubator.apache.org/isis/${relativeUrl}</url>
 
     <build>
         <plugins>
@@ -42,10 +42,10 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-project-info-reports-plugin</artifactId>
-				<version>${maven-project-info-reports-plugin}</version>
+                <version>${maven-project-info-reports-plugin}</version>
                 <inherited>false</inherited>
                 <configuration>
-                	<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
+                    <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                 </configuration>
                 <reportSets>
                     <reportSet>
@@ -65,11 +65,6 @@
     <dependencyManagement>
         <dependencies>
             <dependency>
-                <groupId>org.apache.isis.defaults</groupId>
-                <artifactId>security</artifactId>
-                <version>${core.version}</version>
-            </dependency>
-            <dependency>
                 <groupId>org.apache.isis.alternatives.progmodel</groupId>
                 <artifactId>wrapper-metamodel</artifactId>
                 <version>${wrapper-progmodel.version}</version>
@@ -77,44 +72,50 @@
             <dependency>
                 <groupId>org.apache.isis.alternatives.bytecode</groupId>
                 <artifactId>identity</artifactId>
-                    <version>${identity-bytecode.version}</version>
+                <version>${identity-bytecode.version}</version>
             </dependency>
         </dependencies>
     </dependencyManagement>
-	<dependencies>
-		<dependency>
-			<groupId>org.apache.isis.alternatives.progmodel</groupId>
-			<artifactId>wrapper-metamodel</artifactId>
-			<version>${wrapper-progmodel.version}</version>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.isis.alternatives.progmodel</groupId>
+            <artifactId>wrapper-metamodel</artifactId>
         </dependency>
 
         <dependency>
             <groupId>org.apache.isis.defaults</groupId>
             <artifactId>security</artifactId>
-            <version>${core.version}</version>
         </dependency>
 
-		<dependency>
-		    <groupId>org.apache.isis.core</groupId>
-		    <artifactId>metamodel</artifactId>
-		    <type>test-jar</type>
-		    <scope>test</scope>
+        <dependency>
+            <groupId>org.apache.isis.defaults</groupId>
+            <artifactId>profilestore</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>metamodel</artifactId>
+            <type>test-jar</type>
+            <scope>test</scope>
         </dependency>
 
-		<dependency>
-		    <groupId>org.apache.isis.core</groupId>
-		    <artifactId>runtime</artifactId>
-		    <type>test-jar</type>
-		    <scope>test</scope>
+        <dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>runtime</artifactId>
+            <type>test-jar</type>
+            <scope>test</scope>
         </dependency>
 
-        <!--  Required for InMemoryObjectStore -->
         <dependency>
             <groupId>org.apache.isis.defaults</groupId>
             <artifactId>objectstore</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.isis.defaults</groupId>
+            <artifactId>profilestore</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.isis.defaults</groupId>
             <artifactId>progmodel</artifactId>
         </dependency>
 
@@ -123,20 +124,20 @@
             <artifactId>identity</artifactId>
         </dependency>
 
-		<dependency>
-			<groupId>asm</groupId>
-			<artifactId>asm</artifactId>
-		</dependency>
-
-		<dependency>
-			<groupId>org.objenesis</groupId>
-			<artifactId>objenesis</artifactId>
-		</dependency>
-
-		<dependency>
-			<groupId>cglib</groupId>
-			<artifactId>cglib-nodep</artifactId>
-		</dependency>
+        <dependency>
+            <groupId>asm</groupId>
+            <artifactId>asm</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.objenesis</groupId>
+            <artifactId>objenesis</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>cglib</groupId>
+            <artifactId>cglib-nodep</artifactId>
+        </dependency>
 
         <dependency>
             <groupId>org.jmock</groupId>
@@ -148,18 +149,19 @@
             <artifactId>jmock-junit4</artifactId>
         </dependency>
 
-		<dependency>
-			<groupId>org.jmock</groupId>
-			<artifactId>jmock-legacy</artifactId>
-		</dependency>
+        <dependency>
+            <groupId>org.jmock</groupId>
+            <artifactId>jmock-legacy</artifactId>
+        </dependency>
 
-        <!-- hack: override to be compatible with org.jmock:jmock's dependency on junit:junit-dep -->
+        <!-- hack: override to be compatible with org.jmock:jmock's dependency 
+            on junit:junit-dep -->
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <version>4.4</version>
         </dependency>
 
-	</dependencies>
+    </dependencies>
 
 </project>

Modified: incubator/isis/trunk/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/IsisSystemUsingInstallersWithinJunit.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/IsisSystemUsingInstallersWithinJunit.java?rev=1036307&r1=1036306&r2=1036307&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/IsisSystemUsingInstallersWithinJunit.java (original)
+++ incubator/isis/trunk/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/IsisSystemUsingInstallersWithinJunit.java Thu Nov 18 01:11:40 2010
@@ -24,7 +24,7 @@ import org.apache.isis.core.commons.exce
 import org.apache.isis.core.runtime.installers.InstallerLookup;
 import org.apache.isis.core.runtime.system.DeploymentType;
 import org.apache.isis.core.runtime.system.installers.IsisSystemUsingInstallers;
-import org.apache.isis.core.runtime.userprofile.inmemory.InMemoryUserProfileStoreInstaller;
+import org.apache.isis.defaults.profilestore.InMemoryUserProfileStoreInstaller;
 import org.apache.isis.defaults.security.authentication.NoopAuthenticationManagerInstaller;
 import org.apache.isis.defaults.security.authorization.NoopAuthorizationManagerInstaller;
 import org.junit.internal.runners.TestClass;

Modified: incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/embedded/RestfulViewerInstaller.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/embedded/RestfulViewerInstaller.java?rev=1036307&r1=1036306&r2=1036307&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/embedded/RestfulViewerInstaller.java (original)
+++ incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/embedded/RestfulViewerInstaller.java Thu Nov 18 01:11:40 2010
@@ -1,35 +1,33 @@
 package org.apache.isis.viewer.restful.viewer.embedded;
 
+import org.apache.isis.Isis;
 import org.apache.isis.core.runtime.viewer.IsisViewer;
 import org.apache.isis.core.runtime.viewer.IsisViewerInstallerAbstract;
 import org.apache.isis.core.runtime.web.WebAppSpecification;
 
 /**
- * Convenience implementation of a {@link NakedObjectsViewer} providing the
- * ability to configured for the Restful viewer from the {@link NakedObjects command line} using
- * <tt>--viewer org.starobjects.restful.viewer.embedded.RestfulViewerInstaller</tt> flag.
+ * Convenience implementation of a {@link IsisViewer} providing the ability to configured for the Restful viewer from
+ * the {@link Isis command line} using <tt>--viewer restful</tt> command line option.
  * 
  * <p>
- * In a production deployment the configuration represented by the
- * {@link WebAppSpecification} would be specified in the <tt>web.xml<tt> file.
+ * In a production deployment the configuration represented by the {@link WebAppSpecification} would be specified in the
+ * <tt>web.xml<tt> file.
  */
 public class RestfulViewerInstaller extends IsisViewerInstallerAbstract {
 
-	static final String JAVAX_WS_RS_APPLICATION = "javax.ws.rs.Application";
-	
-	protected static final String EVERYTHING = "*";
-	protected static final String ROOT = "/";
-	protected static final String[] STATIC_CONTENT = new String[]{"*.js", "*.gif", "*.png"};
-
-	public RestfulViewerInstaller() {
-		super("restful");
-	}
-	
-	@Override
-	protected IsisViewer doCreateViewer() {
-		return new EmbeddedWebViewerRestful();
-	}
-	
-	
+    static final String JAVAX_WS_RS_APPLICATION = "javax.ws.rs.Application";
+
+    protected static final String EVERYTHING = "*";
+    protected static final String ROOT = "/";
+    protected static final String[] STATIC_CONTENT = new String[] { "*.js", "*.gif", "*.png" };
+
+    public RestfulViewerInstaller() {
+        super("restful");
+    }
+
+    @Override
+    protected IsisViewer doCreateViewer() {
+        return new EmbeddedWebViewerRestful();
+    }
 
 }