incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1352489 - in /incubator/isis/trunk/framework: runtimes/dflt/objectstores/jpa/jpa-openjpa/src/main/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/persistence/spi/ runtimes/dflt/objectstores/jpa/jpa-openjpa/src/test/java/org/apa...
Date Thu, 21 Jun 2012 10:22:42 GMT
Author: danhaywood
Date: Thu Jun 21 10:22:40 2012
New Revision: 1352489

URL: http://svn.apache.org/viewvc?rev=1352489&view=rev
Log:
ISIS-48, ISIS-232: more on jpa object store, starting on wicket about page view

Added:
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/OpenJpaPersistenceMechanismInstallerTest_persist.java
  (with props)
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/OpenJpaPersistenceMechanismInstallerTest_services.java
      - copied, changed from r1344519, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/OpenJpaPersistenceMechanismInstallerTest_openAndClose.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/AboutModel.java
  (with props)
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.css
  (with props)
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.html
  (with props)
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.java
  (with props)
Removed:
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/OpenJpaPersistenceMechanismInstallerTest_openAndClose.java
Modified:
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/main/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/persistence/spi/OpenJpaIdentifierGenerator.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/Utils.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/runner/IsisModule.java
    incubator/isis/trunk/framework/viewer/json/json-viewer/src/main/java/org/apache/isis/viewer/json/viewer/ResourceContext.java
    incubator/isis/trunk/framework/viewer/json/json-viewer/src/main/java/org/apache/isis/viewer/json/viewer/resources/ResourceAbstract.java
    incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/ResourceContextTest_ensureCompatibleAcceptHeader.java
    incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/ResourceContextTest_getArg.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentType.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageType.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/pages/PageClassListDefault.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication_Pages.java

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/main/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/persistence/spi/OpenJpaIdentifierGenerator.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/main/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/persistence/spi/OpenJpaIdentifierGenerator.java?rev=1352489&r1=1352488&r2=1352489&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/main/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/persistence/spi/OpenJpaIdentifierGenerator.java
(original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/main/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/persistence/spi/OpenJpaIdentifierGenerator.java
Thu Jun 21 10:22:40 2012
@@ -44,7 +44,9 @@ public class OpenJpaIdentifierGenerator 
 
     @Override
     public String createPersistentIdentifierFor(ObjectSpecId objectSpecId, Object pojo, RootOid
transientRootOid) {
+        
         final Object identifier = getPersistenceUnitUtil().getIdentifier(pojo);
+        
         if(identifier == null) {
             // is a service
             return "1";
@@ -91,12 +93,10 @@ public class OpenJpaIdentifierGenerator 
         this.adapterMap = adapterMap;
     }
 
-
     @Override
     public void setSpecificationLookup(SpecificationLookup specificationLookup) {
         this.specificationLookup = specificationLookup;
     }
-
     
     // //////////////////////////////////////////////////////////////
     // Dependencies (from context)
@@ -113,7 +113,5 @@ public class OpenJpaIdentifierGenerator 
         return (OpenJpaObjectStore) IsisContext.getPersistenceSession().getObjectStore();
     }
 
-
-
 }
 // Copyright (c) Naked Objects Group Ltd.

Added: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/OpenJpaPersistenceMechanismInstallerTest_persist.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/OpenJpaPersistenceMechanismInstallerTest_persist.java?rev=1352489&view=auto
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/OpenJpaPersistenceMechanismInstallerTest_persist.java
(added)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/OpenJpaPersistenceMechanismInstallerTest_persist.java
Thu Jun 21 10:22:40 2012
@@ -0,0 +1,95 @@
+package org.apache.isis.runtimes.dflt.objectstores.jpa.openjpa;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.ResolveState;
+import org.apache.isis.runtimes.dflt.testsupport.IsisSystemWithFixtures;
+import org.apache.isis.tck.dom.scalars.PrimitiveValuedEntity;
+import org.apache.isis.tck.dom.scalars.PrimitiveValuedEntityRepository;
+
+public class OpenJpaPersistenceMechanismInstallerTest_persist {
+
+    private PrimitiveValuedEntityRepository repo = new PrimitiveValuedEntityRepository();
+    
+    @Rule
+    public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+        .with(Utils.listenerToDeleteFrom("PRIMITIVEVALUEDENTITY"))
+        .withServices(repo)
+        .build();
+
+    @Test
+    public void emptyList() {
+        iswf.beginTran();
+        final List<PrimitiveValuedEntity> list = repo.list();
+        assertThat(list.size(), is(0));
+        iswf.commitTran();
+    }
+
+    @Test
+    public void retrieveWithoutBouncing() throws Exception {
+        iswf.beginTran();
+        PrimitiveValuedEntity entity = repo.newEntity();
+        entity.setId(1);
+        entity = repo.newEntity();
+        entity.setId(2);
+        iswf.commitTran();
+
+        // don't bounce
+        iswf.beginTran();
+        List<PrimitiveValuedEntity> list = repo.list();
+        assertThat(list.size(), is(2));
+        iswf.commitTran();
+    }
+
+    @Test
+    public void retrieveAfterBouncingSystem() throws Exception {
+        iswf.beginTran();
+        PrimitiveValuedEntity entity = repo.newEntity();
+        entity.setId(1);
+        entity = repo.newEntity();
+        entity.setId(2);
+        iswf.commitTran();
+
+        iswf.bounceSystem();
+        
+        iswf.beginTran();
+        List<PrimitiveValuedEntity> list = repo.list();
+        assertThat(list.size(), is(2));
+        iswf.commitTran();
+    }
+
+    @Test
+    public void adapterResolveStateChanges() throws Exception {
+        iswf.beginTran();
+        PrimitiveValuedEntity entity = repo.newEntity();
+        ObjectAdapter adapter = iswf.adapterFor(entity);
+        
+        assertThat(adapter.isTransient(), is(true));
+        assertThat(adapter.getResolveState(), is(ResolveState.TRANSIENT));
+        assertThat(adapter.getOid().isTransient(), is(true));
+        
+        entity.setId(1);
+        iswf.commitTran();
+        
+        iswf.bounceSystem();
+        
+        iswf.beginTran();
+        final List<PrimitiveValuedEntity> list = repo.list();
+        assertThat(list.size(), is(1));
+        
+        adapter = iswf.adapterFor(list.get(0));
+        assertThat(adapter.getResolveState(), is(ResolveState.GHOST));
+        assertThat(adapter.isTransient(), is(false));
+        assertThat(adapter.getOid().enString(), is("PRMV:1"));
+
+        iswf.commitTran();
+    }
+
+}

Propchange: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/OpenJpaPersistenceMechanismInstallerTest_persist.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/OpenJpaPersistenceMechanismInstallerTest_services.java
(from r1344519, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/OpenJpaPersistenceMechanismInstallerTest_openAndClose.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/OpenJpaPersistenceMechanismInstallerTest_services.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/OpenJpaPersistenceMechanismInstallerTest_services.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/OpenJpaPersistenceMechanismInstallerTest_openAndClose.java&r1=1344519&r2=1352489&rev=1352489&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/OpenJpaPersistenceMechanismInstallerTest_openAndClose.java
(original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/OpenJpaPersistenceMechanismInstallerTest_services.java
Thu Jun 21 10:22:40 2012
@@ -6,45 +6,27 @@ import static org.hamcrest.CoreMatchers.
 import static org.hamcrest.CoreMatchers.nullValue;
 import static org.junit.Assert.assertThat;
 
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.sql.Statement;
 import java.util.List;
-import java.util.Properties;
 
 import org.junit.Rule;
 import org.junit.Test;
 
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.commons.config.IsisConfigurationDefault;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.ResolveState;
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
 import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
 import org.apache.isis.core.metamodel.spec.ObjectSpecId;
-import org.apache.isis.extensions.jpa.metamodel.specloader.progmodelfacets.JpaProgrammingModelFacets;
-import org.apache.isis.extensions.jpa.metamodel.specloader.validator.JpaMetaModelValidator;
-import org.apache.isis.runtimes.dflt.objectstores.jpa.openjpa.metamodel.specloader.progmodelfacets.OpenJpaProgrammingModelFacets;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.runtimes.dflt.testsupport.IsisSystemWithFixtures;
-import org.apache.isis.tck.dom.scalars.PrimitiveValuedEntity;
 import org.apache.isis.tck.dom.scalars.PrimitiveValuedEntityRepository;
 
-public class OpenJpaPersistenceMechanismInstallerTest_openAndClose {
+public class OpenJpaPersistenceMechanismInstallerTest_services {
 
     private PrimitiveValuedEntityRepository repo = new PrimitiveValuedEntityRepository();
     
     @Rule
-    public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder()
-        .with(Utils.configurationForOpenJpaOverHsqlDb())
-        .with(Utils.listenerToDeleteFrom("PRIMITIVEVALUEDENTITY"))
-        .with(new OpenJpaProgrammingModelFacets())
-        .with(new JpaMetaModelValidator())
-        .with(new OpenJpaPersistenceMechanismInstaller())
+    public IsisSystemWithFixtures iswf = Utils.systemBuilder()
         .withServices(repo)
-        .build()
-        ;
-
+        .build();
 
     @Test
     public void servicesBootstrapped() {
@@ -58,69 +40,5 @@ public class OpenJpaPersistenceMechanism
         assertThat(serviceAdapter.getOid(), is(equalTo((Oid)RootOidDefault.create(ObjectSpecId.of("PrimitiveValuedEntities"),
"1"))));
     }
     
-    @Test
-    public void beginTranAndThenCommit() {
-        iswf.beginTran();
-        iswf.commitTran();
-    }
-
-    @Test
-    public void emptyList() {
-        iswf.beginTran();
-        final List<PrimitiveValuedEntity> list = repo.list();
-        assertThat(list.size(), is(0));
-        iswf.commitTran();
-    }
-
-    @Test
-    public void persistThenRetrieve() throws Exception {
-        iswf.beginTran();
-        PrimitiveValuedEntity entity = repo.newEntity();
-        entity.setId(1);
-        entity = repo.newEntity();
-        entity.setId(2);
-        iswf.commitTran();
-
-        // don't bounce
-        iswf.beginTran();
-        List<PrimitiveValuedEntity> list = repo.list();
-        assertThat(list.size(), is(2));
-        iswf.commitTran();
-
-        // do bounce
-        iswf.bounceSystem();
-        
-        iswf.beginTran();
-        list = repo.list();
-        assertThat(list.size(), is(2));
-        iswf.commitTran();
-    }
-
-    @Test
-    public void persistAdapters() throws Exception {
-        iswf.beginTran();
-        PrimitiveValuedEntity entity = repo.newEntity();
-        ObjectAdapter adapter = iswf.adapterFor(entity);
-        
-        assertThat(adapter.isTransient(), is(true));
-        assertThat(adapter.getResolveState(), is(ResolveState.TRANSIENT));
-        assertThat(adapter.getOid().isTransient(), is(true));
-        
-        entity.setId(1);
-        iswf.commitTran();
-        
-        iswf.bounceSystem();
-        
-        iswf.beginTran();
-        final List<PrimitiveValuedEntity> list = repo.list();
-        assertThat(list.size(), is(1));
-        
-        adapter = iswf.adapterFor(list.get(0));
-        assertThat(adapter.getResolveState(), is(ResolveState.GHOST));
-        assertThat(adapter.isTransient(), is(false));
-        assertThat(adapter.getOid().enString(), is("PRMV:1"));
-
-        iswf.commitTran();
-    }
 
 }

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/Utils.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/Utils.java?rev=1352489&r1=1352488&r2=1352489&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/Utils.java
(original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jpa/jpa-openjpa/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jpa/openjpa/Utils.java
Thu Jun 21 10:22:40 2012
@@ -7,6 +7,8 @@ import java.util.Properties;
 
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.commons.config.IsisConfigurationDefault;
+import org.apache.isis.extensions.jpa.metamodel.specloader.validator.JpaMetaModelValidator;
+import org.apache.isis.runtimes.dflt.objectstores.jpa.openjpa.metamodel.specloader.progmodelfacets.OpenJpaProgrammingModelFacets;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.runtimes.dflt.testsupport.IsisSystemWithFixtures;
 
@@ -14,6 +16,14 @@ public class Utils {
 
     private Utils(){}
 
+    public static IsisSystemWithFixtures.Builder systemBuilder() {
+        return IsisSystemWithFixtures.builder()
+        .with(configurationForOpenJpaOverHsqlDb())
+        .with(new OpenJpaProgrammingModelFacets())
+        .with(new JpaMetaModelValidator())
+        .with(new OpenJpaPersistenceMechanismInstaller());
+    }
+
     public static IsisSystemWithFixtures.Listener listenerToDeleteFrom(final String... tables)
{
         return new IsisSystemWithFixtures.ListenerAdapter(){
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/runner/IsisModule.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/runner/IsisModule.java?rev=1352489&r1=1352488&r2=1352489&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/runner/IsisModule.java
(original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/runner/IsisModule.java
Thu Jun 21 10:22:40 2012
@@ -147,11 +147,10 @@ public class IsisModule extends Abstract
         return systemFactory;
     }
 
-    @SuppressWarnings("unused")
     @Provides
     @Inject
     @Singleton
-    private IsisSystem provideIsisSystem(final DeploymentType deploymentType, final IsisSystemFactory
systemFactory) {
+    protected IsisSystem provideIsisSystem(final DeploymentType deploymentType, final IsisSystemFactory
systemFactory) {
         final IsisSystem system = systemFactory.createSystem(deploymentType);
         system.init();
         return system;

Modified: incubator/isis/trunk/framework/viewer/json/json-viewer/src/main/java/org/apache/isis/viewer/json/viewer/ResourceContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/json/json-viewer/src/main/java/org/apache/isis/viewer/json/viewer/ResourceContext.java?rev=1352489&r1=1352488&r2=1352489&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/json/json-viewer/src/main/java/org/apache/isis/viewer/json/viewer/ResourceContext.java
(original)
+++ incubator/isis/trunk/framework/viewer/json/json-viewer/src/main/java/org/apache/isis/viewer/json/viewer/ResourceContext.java
Thu Jun 21 10:22:40 2012
@@ -36,6 +36,7 @@ import com.google.common.collect.Lists;
 
 import org.apache.isis.applib.profiles.Localization;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
+import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapterLookup;
 import org.apache.isis.core.metamodel.adapter.oid.stringable.OidStringifier;
 import org.apache.isis.core.metamodel.spec.SpecificationLookup;
@@ -56,6 +57,7 @@ public class ResourceContext {
     private final SecurityContext securityContext;
     private final OidStringifier oidStringifier;
     private final Localization localization;
+    private final IsisConfiguration configuration;
     private final AuthenticationSession authenticationSession;
     private final PersistenceSession persistenceSession;
     private final ObjectAdapterLookup objectAdapterLookup;
@@ -78,7 +80,7 @@ public class ResourceContext {
     private JsonRepresentation readQueryStringAsMap;
 
     public ResourceContext(final RepresentationType representationType, final HttpHeaders
httpHeaders, final UriInfo uriInfo, final Request request, final HttpServletRequest httpServletRequest,
final HttpServletResponse httpServletResponse, final SecurityContext securityContext,
-            final OidStringifier oidStringifier, final Localization localization, final AuthenticationSession
authenticationSession, final PersistenceSession persistenceSession, final ObjectAdapterLookup
objectAdapterLookup, final SpecificationLookup specificationLookup) {
+            final OidStringifier oidStringifier, final Localization localization, final AuthenticationSession
authenticationSession, final PersistenceSession persistenceSession, final ObjectAdapterLookup
objectAdapterLookup, final SpecificationLookup specificationLookup, IsisConfiguration configuration)
{
 
         this.httpHeaders = httpHeaders;
         this.uriInfo = uriInfo;
@@ -88,6 +90,7 @@ public class ResourceContext {
         this.securityContext = securityContext;
         this.oidStringifier = oidStringifier;
         this.localization = localization;
+        this.configuration = configuration;
         this.authenticationSession = authenticationSession;
         this.persistenceSession = persistenceSession;
         this.objectAdapterLookup = objectAdapterLookup;

Modified: incubator/isis/trunk/framework/viewer/json/json-viewer/src/main/java/org/apache/isis/viewer/json/viewer/resources/ResourceAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/json/json-viewer/src/main/java/org/apache/isis/viewer/json/viewer/resources/ResourceAbstract.java?rev=1352489&r1=1352488&r2=1352489&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/json/json-viewer/src/main/java/org/apache/isis/viewer/json/viewer/resources/ResourceAbstract.java
(original)
+++ incubator/isis/trunk/framework/viewer/json/json-viewer/src/main/java/org/apache/isis/viewer/json/viewer/resources/ResourceAbstract.java
Thu Jun 21 10:22:40 2012
@@ -39,6 +39,7 @@ import org.codehaus.jackson.map.JsonMapp
 
 import org.apache.isis.applib.profiles.Localization;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
+import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.oid.stringable.OidStringifier;
 import org.apache.isis.core.metamodel.adapter.version.Version;
@@ -118,7 +119,7 @@ public abstract class ResourceAbstract {
             throw JsonApplicationException.create(HttpStatusCode.UNAUTHORIZED);
         }
 
-        this.resourceContext = new ResourceContext(representationType, httpHeaders, uriInfo,
request, httpServletRequest, httpServletResponse, securityContext, getOidStringifier(), getLocalization(),
getAuthenticationSession(), getPersistenceSession(), getAdapterManager(), getSpecificationLoader());
+        this.resourceContext = new ResourceContext(representationType, httpHeaders, uriInfo,
request, httpServletRequest, httpServletResponse, securityContext, getOidStringifier(), getLocalization(),
getAuthenticationSession(), getPersistenceSession(), getAdapterManager(), getSpecificationLoader(),
getConfiguration());
     }
 
     protected ResourceContext getResourceContext() {
@@ -211,6 +212,10 @@ public abstract class ResourceAbstract {
     // Dependencies (from singletons)
     // //////////////////////////////////////////////////////////////
 
+    protected IsisConfiguration getConfiguration () {
+        return IsisContext.getConfiguration();
+    }
+
     protected AuthenticationSession getAuthenticationSession() {
         return IsisContext.getAuthenticationSession();
     }

Modified: incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/ResourceContextTest_ensureCompatibleAcceptHeader.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/ResourceContextTest_ensureCompatibleAcceptHeader.java?rev=1352489&r1=1352488&r2=1352489&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/ResourceContextTest_ensureCompatibleAcceptHeader.java
(original)
+++ incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/ResourceContextTest_ensureCompatibleAcceptHeader.java
Thu Jun 21 10:22:40 2012
@@ -126,7 +126,7 @@ public class ResourceContextTest_ensureC
     }
 
     private ResourceContext instantiateResourceContext(final RepresentationType representationType)
{
-        return new ResourceContext(representationType, httpHeaders, null, null, httpServletRequest,
null, null, null, null, null, null, null, null);
+        return new ResourceContext(representationType, httpHeaders, null, null, httpServletRequest,
null, null, null, null, null, null, null, null, null);
     }
 
 }

Modified: incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/ResourceContextTest_getArg.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/ResourceContextTest_getArg.java?rev=1352489&r1=1352488&r2=1352489&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/ResourceContextTest_getArg.java
(original)
+++ incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/ResourceContextTest_getArg.java
Thu Jun 21 10:22:40 2012
@@ -57,7 +57,7 @@ public class ResourceContextTest_getArg 
                 will(returnValue(queryString));
             }
         });
-        resourceContext = new ResourceContext(null, null, null, null, httpServletRequest,
null, null, null, null, null, null, null, null) {
+        resourceContext = new ResourceContext(null, null, null, null, httpServletRequest,
null, null, null, null, null, null, null, null, null) {
             @Override
             void init(final RepresentationType representationType) {
                 //
@@ -77,7 +77,7 @@ public class ResourceContextTest_getArg 
                 will(returnValue(queryString));
             }
         });
-        resourceContext = new ResourceContext(null, null, null, null, httpServletRequest,
null, null, null, null, null, null, null, null) {
+        resourceContext = new ResourceContext(null, null, null, null, httpServletRequest,
null, null, null, null, null, null, null, null, null) {
             @Override
             void init(final RepresentationType representationType) {
                 //

Added: incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/AboutModel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/AboutModel.java?rev=1352489&view=auto
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/AboutModel.java
(added)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/AboutModel.java
Thu Jun 21 10:22:40 2012
@@ -0,0 +1,39 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.viewer.wicket.model.models;
+
+/**
+ * Model providing welcome text.
+ */
+public class AboutModel extends ModelAbstract<String> {
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    protected String load() {
+        return "about text";
+    }
+
+    @Override
+    public void setObject(final String unused) {
+        super.setObject(unused);
+    }
+
+}

Propchange: incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/AboutModel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentType.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentType.java?rev=1352489&r1=1352488&r2=1352489&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentType.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentType.java
Thu Jun 21 10:22:40 2012
@@ -35,8 +35,13 @@ import org.apache.isis.viewer.wicket.mod
  */
 public enum ComponentType {
 
+    
     /**
-     * Welcome page.
+     * About page text.
+     */
+    ABOUT,
+    /**
+     * Welcome page text.
      */
     WELCOME,
     /**

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageType.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageType.java?rev=1352489&r1=1352488&r2=1352489&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageType.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageType.java
Thu Jun 21 10:22:40 2012
@@ -22,6 +22,7 @@ package org.apache.isis.viewer.wicket.ui
 import org.apache.wicket.Page;
 import org.apache.wicket.markup.html.WebPage;
 
+import org.apache.isis.viewer.wicket.ui.pages.about.AboutPage;
 import org.apache.isis.viewer.wicket.ui.pages.action.ActionPage;
 import org.apache.isis.viewer.wicket.ui.pages.entity.EntityPage;
 import org.apache.isis.viewer.wicket.ui.pages.home.HomePage;
@@ -35,7 +36,11 @@ import org.apache.isis.viewer.wicket.ui.
  * layout (eg headers, footers) to be altered.
  */
 public enum PageType {
-    SIGN_IN(WebPage.class), HOME(HomePage.class), ENTITY(EntityPage.class), ACTION(ActionPage.class);
+    SIGN_IN(WebPage.class), 
+    HOME(HomePage.class), 
+    ABOUT(AboutPage.class), 
+    ENTITY(EntityPage.class), 
+    ACTION(ActionPage.class);
 
     private Class<? extends Page> superClass;
 

Added: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.css
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.css?rev=1352489&view=auto
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.css
(added)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.css
Thu Jun 21 10:22:40 2012
@@ -0,0 +1,18 @@
+/*
+ *  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.
+ */

Propchange: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.css
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.html
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.html?rev=1352489&view=auto
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.html
(added)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.html
Thu Jun 21 10:22:40 2012
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"  
+      xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd"  
+      xml:lang="en"  
+      lang="en">
+	<wicket:head>
+		<wicket:link>
+			<link href="AboutPage.css" rel="stylesheet" type="text/css"/>
+		</wicket:link>
+	</wicket:head>
+	<body>
+		<wicket:extend>
+			<div class="aboutPage">
+				<div wicket:id="about"/>
+			</div>
+		</wicket:extend>
+	</body>
+</html>

Propchange: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.java?rev=1352489&view=auto
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.java
(added)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.java
Thu Jun 21 10:22:40 2012
@@ -0,0 +1,44 @@
+/*
+ *  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.viewer.wicket.ui.pages.about;
+
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.model.IModel;
+
+import org.apache.isis.viewer.wicket.model.models.AboutModel;
+import org.apache.isis.viewer.wicket.ui.ComponentType;
+import org.apache.isis.viewer.wicket.ui.pages.PageAbstract;
+
+/**
+ * Web page representing the about page.
+ */
+public class AboutPage extends PageAbstract {
+
+    public AboutPage() {
+        super(new PageParameters(), ComponentType.ABOUT);
+        final IModel<?> model = buildModel();
+        addChildComponents(model);
+    }
+
+    private IModel<?> buildModel() {
+        return new AboutModel();
+    }
+
+}

Propchange: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java?rev=1352489&r1=1352488&r2=1352489&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
Thu Jun 21 10:22:40 2012
@@ -181,13 +181,17 @@ public class IsisWicketApplication exten
 
         final IsisConfigurationBuilder isisConfigurationBuilder = createConfigBuilder();
 
-        final IsisModule isisModule = new IsisModule(deploymentType, isisConfigurationBuilder);
+        final IsisModule isisModule = newIsisModule(deploymentType, isisConfigurationBuilder);
         final Injector injector = Guice.createInjector(isisModule, newIsisWicketModule());
         injector.injectMembers(this);
 
         initWicketComponentInjection(injector);
     }
 
+    protected IsisModule newIsisModule(final DeploymentType deploymentType, final IsisConfigurationBuilder
isisConfigurationBuilder) {
+        return new IsisModule(deploymentType, isisConfigurationBuilder);
+    }
+
     private DeploymentType determineDeploymentType() {
         if (getConfigurationType().equalsIgnoreCase(WICKET_CONFIGURATION_TYPE_DEVELOPMENT))
{
             return new WicketServerPrototype();

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/pages/PageClassListDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/pages/PageClassListDefault.java?rev=1352489&r1=1352488&r2=1352489&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/pages/PageClassListDefault.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/pages/PageClassListDefault.java
Thu Jun 21 10:22:40 2012
@@ -24,6 +24,7 @@ import com.google.inject.Singleton;
 import org.apache.isis.viewer.wicket.ui.pages.PageClassList;
 import org.apache.isis.viewer.wicket.ui.pages.PageRegistrySpi;
 import org.apache.isis.viewer.wicket.ui.pages.PageType;
+import org.apache.isis.viewer.wicket.ui.pages.about.AboutPage;
 import org.apache.isis.viewer.wicket.ui.pages.action.ActionPage;
 import org.apache.isis.viewer.wicket.ui.pages.entity.EntityPage;
 import org.apache.isis.viewer.wicket.ui.pages.home.HomePage;
@@ -39,6 +40,7 @@ public class PageClassListDefault implem
     @Override
     public void registerPages(final PageRegistrySpi pageRegistry) {
         pageRegistry.registerPage(PageType.SIGN_IN, WicketSignInPage.class);
+        pageRegistry.registerPage(PageType.ABOUT, AboutPage.class);
         pageRegistry.registerPage(PageType.ENTITY, EntityPage.class);
         pageRegistry.registerPage(PageType.HOME, HomePage.class);
         pageRegistry.registerPage(PageType.ACTION, ActionPage.class);

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication_Pages.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication_Pages.java?rev=1352489&r1=1352488&r2=1352489&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication_Pages.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication_Pages.java
Thu Jun 21 10:22:40 2012
@@ -25,6 +25,7 @@ import static org.junit.Assert.assertTha
 import org.apache.wicket.Page;
 import org.apache.wicket.markup.html.WebPage;
 import org.jmock.Expectations;
+import org.jmock.auto.Mock;
 import org.junit.Rule;
 import org.junit.Test;
 
@@ -39,14 +40,16 @@ public class IsisWicketApplication_Pages
     @Rule
     public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_ONLY);
 
+    @Mock
+    private PageClassRegistry mockPageClassRegistry;
+    
     private IsisWicketApplication application;
 
     @Test
     public void delegatesToPageClassRegistryToObtainPageTypes() {
         final PageType pageType = PageType.HOME;
         final Class<HomePage> expectedPageClass = HomePage.class;
-
-        final PageClassRegistry mockPageClassRegistry = context.mock(PageClassRegistry.class);
+        
         application = new IsisWicketApplication() {
             private static final long serialVersionUID = 1L;
 



Mime
View raw message