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 2016/03/25 07:59:48 UTC

[01/15] isis git commit: ISIS-1287: for simpleapp archetype, bumping surefire plugin to latest (2.19.1 from 2.16), also removing 'testFailureIgnore' configuration.

Repository: isis
Updated Branches:
  refs/heads/master d02852adc -> 5e518980c


ISIS-1287: for simpleapp archetype, bumping surefire plugin to latest (2.19.1 from 2.16), also removing 'testFailureIgnore' configuration.


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/5e518980
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/5e518980
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/5e518980

Branch: refs/heads/master
Commit: 5e518980cc79ed92263107ef06dd213dec584531
Parents: 4143bc9
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Mar 24 16:37:17 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Mar 25 06:35:58 2016 +0000

----------------------------------------------------------------------
 example/application/simpleapp/integtests/pom.xml | 3 ---
 example/application/simpleapp/pom.xml            | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/5e518980/example/application/simpleapp/integtests/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/integtests/pom.xml b/example/application/simpleapp/integtests/pom.xml
index b87ae82..3ed484b 100644
--- a/example/application/simpleapp/integtests/pom.xml
+++ b/example/application/simpleapp/integtests/pom.xml
@@ -159,9 +159,6 @@
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-surefire-plugin</artifactId>
-                        <configuration>
-                            <testFailureIgnore>true</testFailureIgnore>
-                        </configuration>
                     </plugin>
                     <plugin>
                         <groupId>net.masterthought</groupId>

http://git-wip-us.apache.org/repos/asf/isis/blob/5e518980/example/application/simpleapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/pom.xml b/example/application/simpleapp/pom.xml
index 124b8f9..5b57218 100644
--- a/example/application/simpleapp/pom.xml
+++ b/example/application/simpleapp/pom.xml
@@ -123,7 +123,7 @@
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-surefire-plugin</artifactId>
-                    <version>2.16</version>
+                    <version>2.19.1</version>
                     <configuration>
                         <includes>
                             <include>**/*Test.java</include>


[15/15] isis git commit: ISIS-1287: removing unused method (getAuthenticationManager) from IsisSessionFilter.

Posted by da...@apache.org.
ISIS-1287: removing unused method (getAuthenticationManager) from IsisSessionFilter.


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/2efa4131
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/2efa4131
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/2efa4131

Branch: refs/heads/master
Commit: 2efa4131d0b9f1e36433e2e1ef9e82c65b4fe20f
Parents: ec410bf
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Mar 24 16:32:19 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Mar 25 06:35:58 2016 +0000

----------------------------------------------------------------------
 .../main/java/org/apache/isis/core/webapp/IsisSessionFilter.java | 4 ----
 1 file changed, 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/2efa4131/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisSessionFilter.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisSessionFilter.java b/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisSessionFilter.java
index af3a5cf..9e1e640 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisSessionFilter.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisSessionFilter.java
@@ -392,10 +392,6 @@ public class IsisSessionFilter implements Filter {
         return IsisContext.getTransactionManager();
     }
 
-    private AuthenticationManager getAuthenticationManager() {
-        return IsisContext.getAuthenticationManager();
-    }
-
     private IsisSession openSession(final AuthenticationSession authSession) {
         return IsisContext.openSession(authSession);
     }


[09/15] isis git commit: ISIS-1342: IsisSystem no longer throws MetaModelException, instead pushes it onto the IsisContext. Its callers (IsisWicketApplication, or IsisSessionFilter - for RO - or CukeGlueAbstract, or IsisSystemForTest) then expose the er

Posted by da...@apache.org.
ISIS-1342: IsisSystem no longer throws MetaModelException, instead pushes it onto the IsisContext.  Its callers (IsisWicketApplication, or IsisSessionFilter - for RO - or CukeGlueAbstract, or IsisSystemForTest) then expose the error appropriately, accessing from IsisContext.

Additional details:
- IsisSystem no longer initializes the AuthenticationManager, AuthorizationManager or PersistenceSessionFactory if there was a metamodel validation, to minimize impact on runtime.
- IsisSystemForTest will fail with a minimal error for any subsequent tests
- IsisContext now as new metamodeInvalidException field.  This is static rather than held on the IsisContext instance as a threadlocal; that's because IsisSystemForTest actually calls IsisContext.testReset() to discard the IsisContext singleton.
- IsisSessionFilter (which sits in front of RO viewer) now always checks that the metamodel is vaild.  It does this simply by querying the IsisContext.  (If WebAppBootstrapper was used to bootstrap, rather than wicket viewer, then IsisSystem.init() is still called so no diff in end result)
- ScenarioException simply does a fail() if no instance available on threadlocal.
- CukeGlueAbstract similarly has simple guards for if ScenarioException available, to reduce amount of noise when problem is metamodel invalid
- formatting changes only for IsisWicketApplication
- WebRequestCycleForIsis looks for validation errors first-off in its onException handler, if any are found then immediately redirects to the MmvErrorPage.  This seems to work fine for always rendering MMV page.

Improvements:
- IsisMojoAbstract keeps the IsisSystem initialized while it executes.


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/8bf7fd7f
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/8bf7fd7f
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/8bf7fd7f

Branch: refs/heads/master
Commit: 8bf7fd7f04049e3632454c34e1ca329df1a936f7
Parents: 7f068ef
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Mar 24 15:23:57 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Mar 25 06:35:58 2016 +0000

----------------------------------------------------------------------
 .../integtestsupport/IsisSystemForTest.java     | 85 +++++++++++++-------
 .../isis/tool/mavenplugin/IsisMojoAbstract.java | 17 ++--
 .../core/runtime/runner/IsisInjectModule.java   |  2 +
 .../isis/core/runtime/system/IsisSystem.java    | 69 +++++++++++-----
 .../runtime/system/context/IsisContext.java     | 15 ++++
 .../isis/core/webapp/IsisSessionFilter.java     | 19 ++++-
 .../scenarios/ScenarioExecution.java            |  3 +-
 .../specsupport/specs/CukeGlueAbstract.java     | 23 +++---
 .../wicket/viewer/IsisWicketApplication.java    | 61 +++++++-------
 .../wicket/WebRequestCycleForIsis.java          | 11 ++-
 10 files changed, 195 insertions(+), 110 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/8bf7fd7f/core/integtestsupport/src/main/java/org/apache/isis/core/integtestsupport/IsisSystemForTest.java
----------------------------------------------------------------------
diff --git a/core/integtestsupport/src/main/java/org/apache/isis/core/integtestsupport/IsisSystemForTest.java b/core/integtestsupport/src/main/java/org/apache/isis/core/integtestsupport/IsisSystemForTest.java
index 2dc250c..16b4f84 100644
--- a/core/integtestsupport/src/main/java/org/apache/isis/core/integtestsupport/IsisSystemForTest.java
+++ b/core/integtestsupport/src/main/java/org/apache/isis/core/integtestsupport/IsisSystemForTest.java
@@ -21,12 +21,12 @@ package org.apache.isis.core.integtestsupport;
 
 import java.util.Arrays;
 import java.util.List;
+import java.util.Set;
 
 import com.google.common.base.Joiner;
 import com.google.common.collect.Lists;
 
 import org.junit.After;
-import org.junit.Assert;
 import org.junit.Before;
 import org.junit.runner.Description;
 import org.junit.runners.model.Statement;
@@ -46,6 +46,7 @@ import org.apache.isis.core.metamodel.adapter.oid.RootOid;
 import org.apache.isis.core.metamodel.progmodel.ProgrammingModel;
 import org.apache.isis.core.metamodel.services.ServicesInjectorSpi;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.specloader.validator.MetaModelInvalidException;
 import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidator;
 import org.apache.isis.core.runtime.authentication.AuthenticationManager;
 import org.apache.isis.core.runtime.authentication.AuthenticationRequest;
@@ -67,6 +68,8 @@ import org.apache.isis.core.runtime.systemusinginstallers.IsisComponentProvider;
 import org.apache.isis.core.security.authentication.AuthenticationRequestNameOnly;
 import org.apache.isis.core.specsupport.scenarios.DomainServiceProvider;
 
+import static org.junit.Assert.fail;
+
 /**
  * Wraps a plain {@link IsisSystem}, and provides a number of features to assist with testing.
  */
@@ -272,7 +275,7 @@ public class IsisSystemForTest implements org.junit.rules.TestRule, DomainServic
         }
 
         public IsisSystemForTest build() {
-            final IsisSystemForTest isisSystem =
+            final IsisSystemForTest isisSystemForTest =
                     new IsisSystemForTest(
                             appManifestIfAny,
                             configuration,
@@ -281,24 +284,20 @@ public class IsisSystemForTest implements org.junit.rules.TestRule, DomainServic
                             authenticationRequest,
                             listeners);
             if(level != null) {
-                isisSystem.setLevel(level);
+                isisSystemForTest.setLevel(level);
             }
 
             Runtime.getRuntime().addShutdownHook(new Thread() {
                 @Override
                 public synchronized void run() {
                     try {
-                        if (isisSystem != null) {
-                            isisSystem.tearDownSystem();
-                        }
+                        isisSystemForTest.tearDownSystem();
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
 
                     try {
-                        if (isisSystem != null) {
-                            isisSystem.shutdown();
-                        }
+                        isisSystemForTest.shutdown();
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -310,7 +309,7 @@ public class IsisSystemForTest implements org.junit.rules.TestRule, DomainServic
                 }
             });
 
-            return isisSystem;
+            return isisSystemForTest;
         }
 
 
@@ -380,11 +379,17 @@ public class IsisSystemForTest implements org.junit.rules.TestRule, DomainServic
 
     private void setUpSystem(FireListeners fireListeners) throws Exception {
 
+        // exit as quickly as possible for this case... (will already have been logged)
+        if(IsisContext.getMetaModelInvalidExceptionIfAny() != null) {
+            fail("Metamodel invalid");
+            return;
+        }
+
         boolean firstTime = isisSystem == null;
         if(fireListeners.shouldFire()) {
             fireInitAndPreSetupSystem(firstTime);
         }
-        
+
         if(firstTime) {
             IsisLoggingConfigurer isisLoggingConfigurer = new IsisLoggingConfigurer(getLevel());
             isisLoggingConfigurer.configureLogging(".", new String[] {});
@@ -401,18 +406,33 @@ public class IsisSystemForTest implements org.junit.rules.TestRule, DomainServic
 
             isisSystem = new IsisSystem(componentProvider);
 
-
             // ensures that a FixtureClock is installed as the singleton underpinning the ClockService
             FixtureClock.initialize();
 
             isisSystem.init();
             IsisContext.closeSession();
+
+            // if the IsisSystem does not initialize properly, then - as a side effect - the resulting
+            // MetaModelInvalidException will be pushed onto the IsisContext (as a static field).
+            final MetaModelInvalidException ex = IsisContext.getMetaModelInvalidExceptionIfAny();
+            if (ex != null) {
+
+                // for subsequent tests; the attempt to bootstrap the framework will leave
+                // the IsisContext singleton as set.
+                IsisContext.testReset();
+
+                final Set<String> validationErrors = ex.getValidationErrors();
+                final StringBuilder buf = new StringBuilder();
+                for (String validationError : validationErrors) {
+                    buf.append(validationError).append("\n");
+                }
+                fail("Metamodel is invalid: \n" + buf.toString());
+            }
         }
 
-        final AuthenticationManager authenticationManager = isisSystem.getSessionFactory().getAuthenticationManager();
-        authenticationSession = authenticationManager.authenticate(authenticationRequestIfAny);
 
-        setContainer(getContainer());
+        final AuthenticationManager authenticationManager = IsisContext.getAuthenticationManager();
+        authenticationSession = authenticationManager.authenticate(authenticationRequestIfAny);
 
         openSession();
 
@@ -422,7 +442,6 @@ public class IsisSystemForTest implements org.junit.rules.TestRule, DomainServic
         }
     }
 
-
     private void wireAndInstallFixtures() {
         FixturesInstaller fixturesInstaller = componentProvider.provideFixturesInstaller();
         fixturesInstaller.installFixtures();
@@ -437,7 +456,7 @@ public class IsisSystemForTest implements org.junit.rules.TestRule, DomainServic
     }
 
     public DomainObjectContainer getContainer() {
-        for (Object service : isisSystem.getSessionFactory().getServices()) {
+        for (Object service : IsisContext.getSessionFactory().getServices()) {
             if(service instanceof DomainObjectContainer) {
                 return (DomainObjectContainer) service;
             }
@@ -456,14 +475,18 @@ public class IsisSystemForTest implements org.junit.rules.TestRule, DomainServic
         if(fireListeners.shouldFire()) {
             firePreTeardownSystem();
         }
-        IsisContext.closeSession();
+        if(IsisContext.exists() && IsisContext.inSession()) {
+            IsisContext.closeSession();
+        }
         if(fireListeners.shouldFire()) {
             firePostTeardownSystem();
         }
     }
 
     private void shutdown() {
-        isisSystem.shutdown();
+        if(IsisContext.exists() && isisSystem != null) {
+            isisSystem.shutdown();
+        }
     }
 
     public void bounceSystem() throws Exception {
@@ -662,10 +685,10 @@ public class IsisSystemForTest implements org.junit.rules.TestRule, DomainServic
                 // nothing to do
                 break;
             case MUST_ABORT:
-                Assert.fail("Transaction is in state of '" + state + "'");
+                fail("Transaction is in state of '" + state + "'");
                 break;
             default:
-                Assert.fail("Unknown transaction state '" + state + "'");
+                fail("Unknown transaction state '" + state + "'");
         }
         
     }
@@ -689,7 +712,7 @@ public class IsisSystemForTest implements org.junit.rules.TestRule, DomainServic
         final IsisTransactionManager transactionManager = getTransactionManager();
         final IsisTransaction transaction = transactionManager.getTransaction();
         if(transaction == null) {
-            Assert.fail("No transaction exists");
+            fail("No transaction exists");
             return;
         }
 
@@ -702,13 +725,13 @@ public class IsisSystemForTest implements org.junit.rules.TestRule, DomainServic
             case ABORTED:
                 break;
             case IN_PROGRESS:
-                Assert.fail("Transaction is still in state of '" + state + "'");
+                fail("Transaction is still in state of '" + state + "'");
                 break;
             case MUST_ABORT:
-                Assert.fail("Transaction is still in state of '" + state + "'");
+                fail("Transaction is still in state of '" + state + "'");
                 break;
             default:
-                Assert.fail("Unknown transaction state '" + state + "'");
+                fail("Unknown transaction state '" + state + "'");
         }
     }
 
@@ -722,7 +745,7 @@ public class IsisSystemForTest implements org.junit.rules.TestRule, DomainServic
         final IsisTransactionManager transactionManager = getTransactionManager();
         final IsisTransaction transaction = transactionManager.getTransaction();
         if(transaction == null) {
-            Assert.fail("No transaction exists");
+            fail("No transaction exists");
             return;
         } 
         final State state = transaction.getState();
@@ -730,13 +753,13 @@ public class IsisSystemForTest implements org.junit.rules.TestRule, DomainServic
             case COMMITTED:
             case ABORTED:
             case MUST_ABORT:
-                Assert.fail("Transaction is in state of '" + state + "'");
+                fail("Transaction is in state of '" + state + "'");
                 break;
             case IN_PROGRESS:
                 transactionManager.endTransaction();
                 break;
             default:
-                Assert.fail("Unknown transaction state '" + state + "'");
+                fail("Unknown transaction state '" + state + "'");
         }
     }
 
@@ -750,7 +773,7 @@ public class IsisSystemForTest implements org.junit.rules.TestRule, DomainServic
         final IsisTransactionManager transactionManager = getTransactionManager();
         final IsisTransaction transaction = transactionManager.getTransaction();
         if(transaction == null) {
-            Assert.fail("No transaction exists");
+            fail("No transaction exists");
             return;
         } 
         final State state = transaction.getState();
@@ -758,14 +781,14 @@ public class IsisSystemForTest implements org.junit.rules.TestRule, DomainServic
             case ABORTED:
                 break;
             case COMMITTED:
-                Assert.fail("Transaction is in state of '" + state + "'");
+                fail("Transaction is in state of '" + state + "'");
                 break;
             case MUST_ABORT:
             case IN_PROGRESS:
                 transactionManager.abortTransaction();
                 break;
             default:
-                Assert.fail("Unknown transaction state '" + state + "'");
+                fail("Unknown transaction state '" + state + "'");
         }
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/8bf7fd7f/core/maven-plugin/src/main/java/org/apache/isis/tool/mavenplugin/IsisMojoAbstract.java
----------------------------------------------------------------------
diff --git a/core/maven-plugin/src/main/java/org/apache/isis/tool/mavenplugin/IsisMojoAbstract.java b/core/maven-plugin/src/main/java/org/apache/isis/tool/mavenplugin/IsisMojoAbstract.java
index 8ecfc9b..c8af7e3 100644
--- a/core/maven-plugin/src/main/java/org/apache/isis/tool/mavenplugin/IsisMojoAbstract.java
+++ b/core/maven-plugin/src/main/java/org/apache/isis/tool/mavenplugin/IsisMojoAbstract.java
@@ -64,20 +64,17 @@ public abstract class IsisMojoAbstract extends AbstractMojo {
         try {
             isisSystem.init();
 
-        } catch(RuntimeException ex) {
-            ;
-            // ignore
+            try {
+                doExecute(context, isisSystem);
+            } catch (IOException e) {
+                ;
+                // ignore
+            }
+
         } finally {
             isisSystem.shutdown();
         }
 
-        try {
-            doExecute(context, isisSystem);
-        } catch (IOException e) {
-            ;
-            // ignore
-        }
-
     }
 
     protected abstract void doExecute(final ContextForMojo context, final IsisSystem system)

http://git-wip-us.apache.org/repos/asf/isis/blob/8bf7fd7f/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/IsisInjectModule.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/IsisInjectModule.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/IsisInjectModule.java
index 27a40b6..6241769 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/IsisInjectModule.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/IsisInjectModule.java
@@ -137,6 +137,8 @@ public class IsisInjectModule extends AbstractModule {
             final IsisSystemFactory systemFactory,
             final AppManifest appManifestIfAny) {
         final IsisSystem system = systemFactory.createSystem(deploymentType, appManifestIfAny);
+        // as a side-effect, if the metamodel turns out to be invalid, then
+        // this will push the MetaModelInvalidException into IsisContext.
         system.init();
         return system;
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/8bf7fd7f/core/runtime/src/main/java/org/apache/isis/core/runtime/system/IsisSystem.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/IsisSystem.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/IsisSystem.java
index 84fda30..1b2f88c 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/IsisSystem.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/IsisSystem.java
@@ -46,6 +46,7 @@ import org.apache.isis.core.metamodel.services.ServicesInjectorSpi;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
 import org.apache.isis.core.metamodel.specloader.ServiceInitializer;
+import org.apache.isis.core.metamodel.specloader.validator.MetaModelInvalidException;
 import org.apache.isis.core.runtime.authentication.AuthenticationManager;
 import org.apache.isis.core.runtime.authentication.exploration.ExplorationSession;
 import org.apache.isis.core.runtime.authorization.AuthorizationManager;
@@ -197,20 +198,35 @@ public class IsisSystem implements DebugSelection, ApplicationScopedComponent {
 
             specificationLoader.init(runtimeContext);
 
-            authenticationManager.init();
-            authorizationManager.init();
+            try {
+                // validate here after all entities have been registered in the persistence session factory
+                specificationLoader.validateAndAssert();
+
+
+                //
+                // remaining functionality only done if metamodel is valid.
+                //
+                authenticationManager.init();
+                authorizationManager.init();
 
-            persistenceSessionFactory.init();
+                persistenceSessionFactory.init();
 
-            // validate here after all entities have been registered in the persistence session factory
-            specificationLoader.validateAndAssert();
+                // do postConstruct.  We store the initializer to do preDestroy on shutdown
+                this.serviceInitializer = initializeServices();
 
-            // store simply so can do postConstruct when shutdown
-            this.serviceInitializer = initializeServices();
+                installFixturesIfRequired();
 
-            installFixturesIfRequired();
+                translateServicesAndEnumConstants();
+
+            } catch (final MetaModelInvalidException ex) {
+                // no need to use a higher level, such as error(...); the calling code will expose any metamodel
+                // validation errors in their own particular way.
+                if(LOG.isDebugEnabled()) {
+                    LOG.debug("Meta model invalid", ex);
+                }
+                IsisContext.setMetaModelInvalidException(ex);
+            }
 
-            translateServicesAndEnumConstants();
 
         } catch (final IsisSystemException ex) {
             LOG.error("failed to initialise", ex);
@@ -344,25 +360,28 @@ public class IsisSystem implements DebugSelection, ApplicationScopedComponent {
      */
     private void shutdownServices(final ServiceInitializer serviceInitializer) {
 
+        // may not be set if the metamodel validation failed during initialization
+        if (serviceInitializer == null) {
+            return;
+        }
+
         // call @PostDestroy (in a session)
-        if(serviceInitializer != null) {
-            IsisContext.openSession(new InitialisationSession());
+        IsisContext.openSession(new InitialisationSession());
+        try {
+            getTransactionManager().startTransaction();
             try {
-                getTransactionManager().startTransaction();
-                try {
 
-                    serviceInitializer.preDestroy();
+                serviceInitializer.preDestroy();
 
-                } catch (RuntimeException ex) {
-                    getTransactionManager().getTransaction().setAbortCause(
-                            new IsisTransactionManagerException(ex));
-                } finally {
-                    // will commit or abort
-                    getTransactionManager().endTransaction();
-                }
+            } catch (RuntimeException ex) {
+                getTransactionManager().getTransaction().setAbortCause(
+                        new IsisTransactionManagerException(ex));
             } finally {
-                IsisContext.closeSession();
+                // will commit or abort
+                getTransactionManager().endTransaction();
             }
+        } finally {
+            IsisContext.closeSession();
         }
     }
 
@@ -380,6 +399,12 @@ public class IsisSystem implements DebugSelection, ApplicationScopedComponent {
     }
     //endregion
 
+    // region > metaModel validity
+    public boolean isMetaModelValid() {
+        return IsisContext.getMetaModelInvalidExceptionIfAny() == null;
+    }
+    //endregion
+
     //region > logonFixture
     private LogonFixture logonFixture;
 

http://git-wip-us.apache.org/repos/asf/isis/blob/8bf7fd7f/core/runtime/src/main/java/org/apache/isis/core/runtime/system/context/IsisContext.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/context/IsisContext.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/context/IsisContext.java
index 238d297..718e3bd 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/context/IsisContext.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/context/IsisContext.java
@@ -38,6 +38,7 @@ import org.apache.isis.core.commons.exceptions.IsisException;
 import org.apache.isis.core.metamodel.runtimecontext.LocalizationDefault;
 import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
+import org.apache.isis.core.metamodel.specloader.validator.MetaModelInvalidException;
 import org.apache.isis.core.runtime.authentication.AuthenticationManager;
 import org.apache.isis.core.runtime.system.DeploymentType;
 import org.apache.isis.core.runtime.system.internal.InitialisationSession;
@@ -68,6 +69,11 @@ public class IsisContext implements DebuggableWithTitle {
 
     private static IsisConfiguration configuration;
 
+    /**
+     * Populated only if the metamodel was found to be invalid
+     */
+    private static MetaModelInvalidException metamodelInvalidException;
+
     // ///////////////////////////////////////////////////////////
     // Singleton & Constructor, shutdown
     // ///////////////////////////////////////////////////////////
@@ -93,6 +99,15 @@ public class IsisContext implements DebuggableWithTitle {
         singleton = null;
     }
 
+
+    public static MetaModelInvalidException getMetaModelInvalidExceptionIfAny() {
+        return IsisContext.metamodelInvalidException;
+    }
+    public static void setMetaModelInvalidException(final MetaModelInvalidException metaModelInvalid) {
+        IsisContext.metamodelInvalidException = metaModelInvalid;
+    }
+
+
     protected static enum SessionClosePolicy {
         /**
          * Sessions must be explicitly closed.

http://git-wip-us.apache.org/repos/asf/isis/blob/8bf7fd7f/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisSessionFilter.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisSessionFilter.java b/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisSessionFilter.java
index 5ab43d5..af3a5cf 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisSessionFilter.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisSessionFilter.java
@@ -23,6 +23,7 @@ import java.io.IOException;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
+import java.util.Set;
 import java.util.regex.Pattern;
 
 import javax.servlet.Filter;
@@ -42,7 +43,7 @@ import com.google.common.collect.Lists;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.factory.InstanceUtil;
 import org.apache.isis.core.commons.lang.StringExtensions;
-import org.apache.isis.core.runtime.authentication.AuthenticationManager;
+import org.apache.isis.core.metamodel.specloader.validator.MetaModelInvalidException;
 import org.apache.isis.core.runtime.system.context.IsisContext;
 import org.apache.isis.core.runtime.system.session.IsisSession;
 import org.apache.isis.core.runtime.system.transaction.IsisTransactionManager;
@@ -306,6 +307,8 @@ public class IsisSessionFilter implements Filter {
     @Override
     public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) throws IOException, ServletException {
 
+        ensureMetamodelIsValid();
+
         final HttpServletRequest httpServletRequest = (HttpServletRequest) request;
         final HttpServletResponse httpServletResponse = (HttpServletResponse) response;
 
@@ -357,6 +360,20 @@ public class IsisSessionFilter implements Filter {
 
     }
 
+
+    private static void ensureMetamodelIsValid() {
+        final MetaModelInvalidException ex = IsisContext.getMetaModelInvalidExceptionIfAny();
+        if(ex != null) {
+            final Set<String> validationErrors = ex.getValidationErrors();
+            final StringBuilder buf = new StringBuilder();
+            for (String validationError : validationErrors) {
+                buf.append(validationError).append("\n");
+            }
+            throw new IllegalStateException("Metamodel validation errors: \n" + buf.toString());
+        }
+    }
+
+
     protected boolean requestIsPassThru(final HttpServletRequest httpServletRequest) {
         return passThru != null && httpServletRequest.getRequestURI().startsWith(passThru);
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/8bf7fd7f/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/ScenarioExecution.java
----------------------------------------------------------------------
diff --git a/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/ScenarioExecution.java b/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/ScenarioExecution.java
index c9ce6a0..511e3cb 100644
--- a/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/ScenarioExecution.java
+++ b/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/ScenarioExecution.java
@@ -35,6 +35,7 @@ import org.apache.isis.applib.services.wrapper.WrapperFactory;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.exceptions.MetaModelException;
 
+import static org.junit.Assert.fail;
 
 /**
  * Represents the currently executing scenario, allowing information to be shared 
@@ -72,7 +73,7 @@ public abstract class ScenarioExecution {
     public static ScenarioExecution current() {
         final ScenarioExecution execution = current.get();
         if(execution == null) {
-            throw new IllegalStateException("Scenario has not yet been instantiated");
+            fail();
         } 
         return execution;
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/8bf7fd7f/core/specsupport/src/main/java/org/apache/isis/core/specsupport/specs/CukeGlueAbstract.java
----------------------------------------------------------------------
diff --git a/core/specsupport/src/main/java/org/apache/isis/core/specsupport/specs/CukeGlueAbstract.java b/core/specsupport/src/main/java/org/apache/isis/core/specsupport/specs/CukeGlueAbstract.java
index 3aa51b0..675ea26 100644
--- a/core/specsupport/src/main/java/org/apache/isis/core/specsupport/specs/CukeGlueAbstract.java
+++ b/core/specsupport/src/main/java/org/apache/isis/core/specsupport/specs/CukeGlueAbstract.java
@@ -16,9 +16,6 @@
  */
 package org.apache.isis.core.specsupport.specs;
 
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.util.List;
@@ -29,10 +26,6 @@ import com.google.common.collect.Lists;
 import org.jmock.Sequence;
 import org.jmock.States;
 import org.jmock.internal.ExpectationBuilder;
-import org.junit.Assert;
-
-import cucumber.api.DataTable;
-import cucumber.api.java.Before;
 
 import org.apache.isis.applib.DomainObjectContainer;
 import org.apache.isis.applib.services.wrapper.WrapperFactory;
@@ -40,6 +33,10 @@ import org.apache.isis.core.specsupport.scenarios.ScenarioExecution;
 import org.apache.isis.core.specsupport.scenarios.ScenarioExecutionForUnit;
 import org.apache.isis.core.specsupport.scenarios.ScenarioExecutionScope;
 
+import cucumber.api.java.Before;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
 
 /**
  * Base class for Cucumber-JVM step definitions.
@@ -58,7 +55,8 @@ public abstract class CukeGlueAbstract {
      */
     protected ScenarioExecution scenarioExecution() {
         if(ScenarioExecution.current() == null) {
-            throw new IllegalStateException("The scenario execution has not been set up; call #before(ScenarioExecutionScope) first");
+            fail();
+            return null;
         }
         return ScenarioExecution.current();
     }
@@ -74,8 +72,11 @@ public abstract class CukeGlueAbstract {
      * then {@link ScenarioExecution#beginTran() starts a new one}.
      */
     protected void nextTransaction() {
-        scenarioExecution().endTran(true);
-        scenarioExecution().beginTran();
+        final ScenarioExecution scenarioExecution = scenarioExecution();
+        if(scenarioExecution != null) {
+            scenarioExecution.endTran(true);
+            scenarioExecution.beginTran();
+        }
     }
     
 
@@ -205,7 +206,7 @@ public abstract class CukeGlueAbstract {
             }
         }
         if(buf.length() != 0) {
-            Assert.fail("\n" + buf.toString());
+            fail("\n" + buf.toString());
         }
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/8bf7fd7f/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
index 9f712c6..2b24c80 100644
--- a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
+++ b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
@@ -27,15 +27,12 @@ import java.util.Set;
 import javax.servlet.ServletContext;
 
 import com.google.common.base.Function;
-import com.google.common.base.Throwables;
-import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 import com.google.inject.Guice;
 import com.google.inject.Inject;
 import com.google.inject.Injector;
 import com.google.inject.Module;
-import org.wicketstuff.select2.ApplicationSettings;
 
 import org.apache.wicket.Application;
 import org.apache.wicket.ConverterLocator;
@@ -60,6 +57,7 @@ import org.apache.wicket.settings.IRequestCycleSettings.RenderStrategy;
 import org.apache.wicket.util.time.Duration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.wicketstuff.select2.ApplicationSettings;
 
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.authentication.AuthenticationSessionProvider;
@@ -196,9 +194,8 @@ public class IsisWicketApplication
     /**
      * {@link Inject}ed when {@link #init() initialized}.
      */
-    @SuppressWarnings("unused")
     @Inject
-    private IsisSystem system;
+    private IsisSystem isisSystem;
 
 
     private boolean determiningDeploymentType;
@@ -291,31 +288,34 @@ public class IsisWicketApplication
 
             @SuppressWarnings("unused")
             SharedResources sharedResources = getSharedResources();
-            
-        } catch(RuntimeException ex) {
-            List<MetaModelInvalidException> mmies = locateMetaModelInvalidExceptions(ex);
-            if(!mmies.isEmpty()) {
-                final MetaModelInvalidException mmie = mmies.get(0);
-                log("");
-                logBanner();
-                log("");
-                validationErrors.addAll(mmie.getValidationErrors());
-                for (String validationError : validationErrors) {
-                    logError(validationError);
-                }
-                log("");
-                log("Please inspect the above messages and correct your domain model.");
-                log("");
-                logBanner();
-                log("");
-            } else {
-                // because Wicket's handling in its WicketFilter (that calls this method) does not log the exception.
-                LOG.error("Failed to initialize", ex);
-                throw ex;
+
+            final MetaModelInvalidException mmie = IsisContext.getMetaModelInvalidExceptionIfAny();
+            if(mmie != null) {
+                this.validationErrors.addAll(mmie.getValidationErrors());
+                log(this.validationErrors);
             }
+
+        } catch(RuntimeException ex) {
+            // because Wicket's handling in its WicketFilter (that calls this method) does not log the exception.
+            LOG.error("Failed to initialize", ex);
+            throw ex;
         }
     }
 
+    private void log(final List<String> validationErrors) {
+        log("");
+        logBanner();
+        log("");
+        for (String validationError : validationErrors) {
+            logError(validationError);
+        }
+        log("");
+        log("Please inspect the above messages and correct your domain model.");
+        log("");
+        logBanner();
+        log("");
+    }
+
     private void configureWicketSelect2() {
         ApplicationSettings select2Settings = ApplicationSettings.get();
         select2Settings.setCssReference(new Select2BootstrapCssReference());
@@ -609,11 +609,6 @@ public class IsisWicketApplication
 
     // //////////////////////////////////////
 
-    protected List<MetaModelInvalidException> locateMetaModelInvalidExceptions(RuntimeException ex) {
-        return Lists.newArrayList(
-                Iterables.filter(Throwables.getCausalChain(ex), MetaModelInvalidException.class));
-    }
-
     /**
      * The validation errors, if any, that occurred on {@link #init() startup}.
      */
@@ -678,8 +673,8 @@ public class IsisWicketApplication
     @Override
     protected void onDestroy() {
         try {
-            if (system != null) {
-                system.shutdown();
+            if (isisSystem != null) {
+                isisSystem.shutdown();
             }
             IsisContext.shutdown();
             super.onDestroy();

http://git-wip-us.apache.org/repos/asf/isis/blob/8bf7fd7f/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/WebRequestCycleForIsis.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/WebRequestCycleForIsis.java b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/WebRequestCycleForIsis.java
index 64d239d..6bcf74c 100644
--- a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/WebRequestCycleForIsis.java
+++ b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/WebRequestCycleForIsis.java
@@ -145,9 +145,18 @@ public class WebRequestCycleForIsis extends AbstractRequestCycleListener {
 
     @Override
     public IRequestHandler onException(RequestCycle cycle, Exception ex) {
+
+        List<String> validationErrors = IsisWicketApplication.get().getValidationErrors();
+        if(!validationErrors.isEmpty()) {
+            final MmvErrorPage mmvErrorPage = new MmvErrorPage(Model.ofList(validationErrors));
+            return new RenderPageRequestHandler(new PageProvider(mmvErrorPage), RedirectPolicy.ALWAYS_REDIRECT);
+        }
+
         PageProvider errorPageProvider = errorPageProviderFor(ex);
         // avoid infinite redirect loops
-        RedirectPolicy redirectPolicy = ex instanceof PageExpiredException? RedirectPolicy.NEVER_REDIRECT: RedirectPolicy.ALWAYS_REDIRECT;
+        RedirectPolicy redirectPolicy = ex instanceof PageExpiredException
+                ? RedirectPolicy.NEVER_REDIRECT
+                : RedirectPolicy.ALWAYS_REDIRECT;
         return errorPageProvider != null 
                 ? new RenderPageRequestHandler(errorPageProvider, redirectPolicy)
                 : null;


[11/15] isis git commit: ISIS-1287: removing unused methods and fields (this.viewerNames) in IsisInjectorModule

Posted by da...@apache.org.
ISIS-1287: removing unused methods and fields (this.viewerNames) in IsisInjectorModule


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/190284fa
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/190284fa
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/190284fa

Branch: refs/heads/master
Commit: 190284fa07ca176609381f2b8157a12ee21b8cb6
Parents: 74259aa
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Mar 24 16:30:30 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Mar 25 06:35:58 2016 +0000

----------------------------------------------------------------------
 .../isis/core/runtime/runner/IsisInjectModule.java      | 12 ------------
 1 file changed, 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/190284fa/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/IsisInjectModule.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/IsisInjectModule.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/IsisInjectModule.java
index 6241769..76bc2f3 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/IsisInjectModule.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/IsisInjectModule.java
@@ -19,9 +19,6 @@
 
 package org.apache.isis.core.runtime.runner;
 
-import java.util.List;
-
-import com.google.common.collect.Lists;
 import com.google.inject.AbstractModule;
 import com.google.inject.Inject;
 import com.google.inject.Provides;
@@ -42,8 +39,6 @@ public class IsisInjectModule extends AbstractModule {
     private final InstallerLookup installerLookup;
     private final IsisConfigurationBuilder isisConfigurationBuilder;
 
-    private final List<String> viewerNames = Lists.newArrayList();
-
     private static InstallerLookup defaultInstallerLookup() {
         return new InstallerLookup();
     }
@@ -104,13 +99,6 @@ public class IsisInjectModule extends AbstractModule {
         return installerLookup;
     }
 
-    /**
-     * Adjustment (as per GOOS book)
-     */
-    public void addViewerNames(final List<String> viewerNames) {
-        this.viewerNames.addAll(viewerNames);
-    }
-
     @Override
     protected void configure() {
         requireBinding(DeploymentType.class);


[06/15] isis git commit: ISIS-1340: removing the HideMixinsForHomePage (as per ISIS-1343, this implementation will end up being invalid, so don't want it in the archetype polluting people's apps); instead use the layout.xml to hide the actions.

Posted by da...@apache.org.
ISIS-1340: removing the HideMixinsForHomePage (as per ISIS-1343, this implementation will end up being invalid, so don't want it in the archetype polluting people's apps); instead use the layout.xml to hide the actions.

Also:
- improve CSS for top-level actions when they are visible
- removing action from SimpleObject.layout.xml (removed in code a while back).


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/d7ed3521
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/d7ed3521
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/d7ed3521

Branch: refs/heads/master
Commit: d7ed3521cae6289a03fba4db28154549a8277cec
Parents: 654bfd5
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Mar 22 23:53:25 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Mar 25 06:35:58 2016 +0000

----------------------------------------------------------------------
 .../wicket/ui/pages/bootstrap-overrides.css     |  5 ++
 .../homepage/HomePageViewModel.layout.xml       |  5 ++
 .../prototyping/HideMixinsForHomePage.java      | 53 --------------------
 .../dom/simple/SimpleObject.layout.xml          |  4 +-
 4 files changed, 11 insertions(+), 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/d7ed3521/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
index e46598d..e6cfa3e 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
@@ -821,4 +821,9 @@ tr.headers th form input {
     width: 100%;
     margin: 5px;
     padding: 5px;
+}
+
+.entityHeaderPanel .entityActions ul.additionalLinkList li.additionalLinkItem {
+    padding-top: 3px;
+    padding-bottom: 7px;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/d7ed3521/example/application/simpleapp/app/src/main/java/domainapp/app/services/homepage/HomePageViewModel.layout.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/app/src/main/java/domainapp/app/services/homepage/HomePageViewModel.layout.xml b/example/application/simpleapp/app/src/main/java/domainapp/app/services/homepage/HomePageViewModel.layout.xml
index e2a907d..f743828 100644
--- a/example/application/simpleapp/app/src/main/java/domainapp/app/services/homepage/HomePageViewModel.layout.xml
+++ b/example/application/simpleapp/app/src/main/java/domainapp/app/services/homepage/HomePageViewModel.layout.xml
@@ -25,6 +25,8 @@
                 <bs3:col span="12" unreferencedActions="true">
                     <domainObject/>
                     <action id="clearHints" hidden="EVERYWHERE"/>
+                    <action id="downloadLayoutXml" hidden="EVERYWHERE"/>
+                    <action id="rebuildMetamodel" hidden="EVERYWHERE"/>
                 </bs3:col>
             </bs3:row>
         </bs3:col>
@@ -37,6 +39,9 @@
         </bs3:col>
     </bs3:row>
     <bs3:row>
+
+    </bs3:row>
+    <bs3:row>
         <bs3:col span="0">
             <fieldSet name="General" id="general" unreferencedProperties="true"/>
         </bs3:col>

http://git-wip-us.apache.org/repos/asf/isis/blob/d7ed3521/example/application/simpleapp/app/src/main/java/domainapp/app/services/prototyping/HideMixinsForHomePage.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/app/src/main/java/domainapp/app/services/prototyping/HideMixinsForHomePage.java b/example/application/simpleapp/app/src/main/java/domainapp/app/services/prototyping/HideMixinsForHomePage.java
deleted file mode 100644
index 6e4acc1..0000000
--- a/example/application/simpleapp/app/src/main/java/domainapp/app/services/prototyping/HideMixinsForHomePage.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *  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 domainapp.app.services.prototyping;
-
-import java.util.List;
-
-import com.google.common.eventbus.Subscribe;
-
-import org.apache.isis.applib.AbstractSubscriber;
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.NatureOfService;
-import org.apache.isis.applib.services.layout.Object_downloadLayoutXml;
-import org.apache.isis.applib.services.layout.Object_rebuildMetamodel;
-
-import domainapp.app.services.homepage.HomePageViewModel;
-
-@DomainService(
-        nature = NatureOfService.DOMAIN
-)
-public class HideMixinsForHomePage extends AbstractSubscriber{
-
-    @Subscribe
-    public void on(Object_rebuildMetamodel.ActionDomainEvent ev) {
-        final List<Object> arguments = ev.getArguments();
-        if(arguments.get(0) instanceof HomePageViewModel) {
-            ev.hide();
-        }
-    }
-
-    @Subscribe
-    public void on(Object_downloadLayoutXml.ActionDomainEvent ev) {
-        final List<Object> arguments = ev.getArguments();
-        if(arguments.get(0) instanceof HomePageViewModel) {
-            ev.hide();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/d7ed3521/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
index 49fe8af..c0c6d14 100644
--- a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
+++ b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
@@ -32,9 +32,7 @@
                         <bs3:col span="12">
                             <c:fieldSet name="Name">
                                 <c:action id="delete"/>
-                                <c:property id="name" namedEscaped="true">
-                                    <c:action id="updateName" position="BELOW"/>
-                                </c:property>
+                                <c:property id="name" namedEscaped="true"/>
                             </c:fieldSet>
                         </bs3:col>
                     </bs3:row>


[03/15] isis git commit: ISIS-1287: removing further unused field in ObjectReflectorDefault

Posted by da...@apache.org.
ISIS-1287: removing further unused field in ObjectReflectorDefault


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/74259aa2
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/74259aa2
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/74259aa2

Branch: refs/heads/master
Commit: 74259aa26abf28e7efb11aba714cc9f1beba4bda
Parents: 3914e57
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Mar 24 16:28:33 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Mar 25 06:35:58 2016 +0000

----------------------------------------------------------------------
 .../isis/core/metamodel/specloader/ObjectReflectorDefault.java    | 3 ---
 1 file changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/74259aa2/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
index 1b68930..4c4eda4 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
@@ -72,7 +72,6 @@ import org.apache.isis.core.metamodel.specloader.specimpl.ObjectSpecificationAbs
 import org.apache.isis.core.metamodel.specloader.specimpl.ObjectSpecificationAbstract.IntrospectionState;
 import org.apache.isis.core.metamodel.specloader.specimpl.dflt.ObjectSpecificationDefault;
 import org.apache.isis.core.metamodel.specloader.specimpl.standalonelist.ObjectSpecificationOnStandaloneList;
-import org.apache.isis.core.metamodel.specloader.traverser.SpecificationTraverser;
 import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidator;
 import org.apache.isis.core.metamodel.specloader.validator.ValidationFailures;
 import org.apache.isis.progmodels.dflt.ProgrammingModelFacetsJava5;
@@ -120,7 +119,6 @@ public final class ObjectReflectorDefault
     private final ClassSubstitutor classSubstitutor = new ClassSubstitutor();
 
     private final DeploymentCategory deploymentCategory;
-    private final IsisConfiguration configuration;
     private final ProgrammingModel programmingModel;
     private final FacetProcessor facetProcessor;
 
@@ -173,7 +171,6 @@ public final class ObjectReflectorDefault
         ensureThatArg(layoutMetadataReaders, is(not(emptyCollectionOf(LayoutMetadataReader.class))));
 
         this.deploymentCategory = deploymentCategory;
-        this.configuration = configuration;
         this.servicesInjector = servicesInjector;
 
         this.programmingModel = programmingModel;


[12/15] isis git commit: ISIS-1287: removing unused field in ObjectReflectorDefault

Posted by da...@apache.org.
ISIS-1287: removing unused field in ObjectReflectorDefault


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/3914e575
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/3914e575
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/3914e575

Branch: refs/heads/master
Commit: 3914e57504b0032d34cc61324e5e6fcb29b2040a
Parents: 22bd7e1
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Mar 24 16:28:18 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Mar 25 06:35:58 2016 +0000

----------------------------------------------------------------------
 .../isis/core/metamodel/specloader/ObjectReflectorDefault.java     | 2 --
 1 file changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/3914e575/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
index c8ccdb1..1b68930 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
@@ -133,8 +133,6 @@ public final class ObjectReflectorDefault
 
     private final ServicesInjectorSpi servicesInjector;
 
-    private final SpecificationTraverser specificationTraverser = new SpecificationTraverser();
-
     private final MetaModelValidator metaModelValidator;
     private final SpecificationCacheDefault cache = new SpecificationCacheDefault();
     private final List<LayoutMetadataReader> layoutMetadataReaders;


[08/15] isis git commit: ISIS-1341: flush transaction prior to delegating off to the RepresentationService to generate the repr.

Posted by da...@apache.org.
ISIS-1341: flush transaction prior to delegating off to the RepresentationService to generate the repr.


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/7f068eff
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/7f068eff
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/7f068eff

Branch: refs/heads/master
Commit: 7f068eff9e3c79b854fb1491af1ed334d8a9d634
Parents: 2257d02
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Mar 23 05:33:27 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Mar 25 06:35:58 2016 +0000

----------------------------------------------------------------------
 .../server/resources/DomainResourceHelper.java              | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/7f068eff/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/resources/DomainResourceHelper.java
----------------------------------------------------------------------
diff --git a/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/resources/DomainResourceHelper.java b/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/resources/DomainResourceHelper.java
index 9e72771..69ee367 100644
--- a/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/resources/DomainResourceHelper.java
+++ b/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/resources/DomainResourceHelper.java
@@ -24,6 +24,7 @@ import javax.ws.rs.core.Response;
 import org.apache.isis.applib.annotation.ActionSemantics;
 import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.profiles.Localization;
+import org.apache.isis.applib.services.xactn.TransactionService;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -190,6 +191,7 @@ public class DomainResourceHelper {
 
     private final RepresentationServiceContextAdapter representationServiceContext;
     private final RepresentationService representationService;
+    private final TransactionService transactionService;
 
     public DomainResourceHelper(final ResourceContext resourceContext, final ObjectAdapter objectAdapter) {
         this(resourceContext, objectAdapter, new DomainObjectLinkTo());
@@ -209,6 +211,7 @@ public class DomainResourceHelper {
                      .with(this.objectAdapter);
 
         representationService = lookupService(RepresentationService.class);
+        transactionService = lookupService(TransactionService.class);
     }
 
     private final ResourceContext resourceContext;
@@ -224,6 +227,7 @@ public class DomainResourceHelper {
      * render a representation of the object.
      */
     public Response objectRepresentation() {
+        transactionService.flushTransaction();
         return representationService
                 .objectRepresentation(representationServiceContext, objectAdapter);
     }
@@ -236,6 +240,7 @@ public class DomainResourceHelper {
      */
     @Deprecated
     public Response objectRepresentation(final RepresentationService.Intent intent) {
+        transactionService.flushTransaction();
         return representationService
                 .objectRepresentation(representationServiceContext, objectAdapter, intent);
     }
@@ -253,6 +258,7 @@ public class DomainResourceHelper {
 
         final OneToOneAssociation property = accessHelper.getPropertyThatIsVisibleForIntent(propertyId, ObjectAdapterAccessHelper.Intent.ACCESS);
 
+        transactionService.flushTransaction();
         return representationService.propertyDetails(representationServiceContext, new ObjectAndProperty2(objectAdapter, property, memberMode), memberMode);
     }
 
@@ -270,6 +276,7 @@ public class DomainResourceHelper {
 
         final OneToManyAssociation collection = accessHelper.getCollectionThatIsVisibleForIntent(collectionId, ObjectAdapterAccessHelper.Intent.ACCESS);
 
+        transactionService.flushTransaction();
         return representationService.collectionDetails(representationServiceContext, new ObjectAndCollection2(objectAdapter, collection, memberMode), memberMode);
     }
 
@@ -285,6 +292,7 @@ public class DomainResourceHelper {
 
         final ObjectAction action = accessHelper.getObjectActionThatIsVisibleForIntent(actionId, ObjectAdapterAccessHelper.Intent.ACCESS);
 
+        transactionService.flushTransaction();
         return representationService.actionPrompt(representationServiceContext, new ObjectAndAction(objectAdapter, action));
     }
 
@@ -370,6 +378,7 @@ public class DomainResourceHelper {
                 new ObjectAndActionInvocation(objectAdapter, action, arguments, returnedAdapter, selfLink);
 
         // response
+        transactionService.flushTransaction();
         return representationService.actionResult(representationServiceContext, objectAndActionInvocation, selfLink);
     }
 


[10/15] isis git commit: ISIS-1287: removing invalidateCacheFor from reflector.

Posted by da...@apache.org.
ISIS-1287: removing invalidateCacheFor from reflector.


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/22bd7e1a
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/22bd7e1a
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/22bd7e1a

Branch: refs/heads/master
Commit: 22bd7e1a54271fe48984482873b5d0af882c5a8a
Parents: 8bf7fd7
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Mar 24 16:22:12 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Mar 25 06:35:58 2016 +0000

----------------------------------------------------------------------
 .../apache/isis/core/metamodel/spec/SpecificationLoaderSpi.java | 2 --
 .../isis/core/metamodel/specloader/ObjectReflectorDefault.java  | 5 -----
 .../isis/core/metamodel/facets/ProgrammableReflector.java       | 3 ---
 3 files changed, 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/22bd7e1a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationLoaderSpi.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationLoaderSpi.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationLoaderSpi.java
index 4f06391..524bfa9 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationLoaderSpi.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationLoaderSpi.java
@@ -30,8 +30,6 @@ public interface SpecificationLoaderSpi extends ApplicationScopedComponent, Debu
     void init(final RuntimeContext runtimeContext);
     void shutdown();
 
-    void invalidateCacheFor(Object domainObject);
-    
     void invalidateCache(Class<?> domainClass);
     
     boolean isInitialized();

http://git-wip-us.apache.org/repos/asf/isis/blob/22bd7e1a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
index 2957dd7..c8ccdb1 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
@@ -310,11 +310,6 @@ public final class ObjectReflectorDefault
 
 
     @Override
-    public void invalidateCacheFor(Object domainObject) {
-        invalidateCache(domainObject.getClass());
-    }
-
-    @Override
     public void invalidateCache(final Class<?> cls) {
         
         if(!getCache().isInitialized()) {

http://git-wip-us.apache.org/repos/asf/isis/blob/22bd7e1a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/ProgrammableReflector.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/ProgrammableReflector.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/ProgrammableReflector.java
index 90dcdd7..3e433e6 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/ProgrammableReflector.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/ProgrammableReflector.java
@@ -116,9 +116,6 @@ public class ProgrammableReflector extends SpecificationLoaderAbstract implement
     }
 
     @Override
-    public void invalidateCacheFor(Object domainObject) {
-    }
-    @Override
     public void invalidateCache(Class<?> domainClass) {
     }
 


[04/15] isis git commit: ISIS-1347: adding missing annotation for SimpleObject.

Posted by da...@apache.org.
ISIS-1347: adding missing annotation for SimpleObject.


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/654bfd53
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/654bfd53
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/654bfd53

Branch: refs/heads/master
Commit: 654bfd53e2f6e718f9aa66c88ea617c3baf1d2a3
Parents: b26317a
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Mar 22 23:18:09 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Mar 25 06:35:58 2016 +0000

----------------------------------------------------------------------
 .../dom/src/main/java/domainapp/dom/simple/SimpleObject.java     | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/654bfd53/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
index 6cf90cb..4c303d4 100644
--- a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
+++ b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
@@ -23,6 +23,7 @@ import javax.jdo.annotations.VersionStrategy;
 
 import org.apache.isis.applib.annotation.Action;
 import org.apache.isis.applib.annotation.DomainObject;
+import org.apache.isis.applib.annotation.Property;
 import org.apache.isis.applib.annotation.SemanticsOf;
 import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
 import org.apache.isis.applib.services.eventbus.PropertyDomainEvent;
@@ -70,6 +71,9 @@ public class SimpleObject implements Comparable<SimpleObject> {
             allowsNull="false",
             length = NAME_LENGTH
     )
+    @Property(
+        domainEvent = NameDomainEvent.class
+    )
     private String name;
     public String getName() {
         return name;


[05/15] isis git commit: ISIS-1287: recreating simpleapp archetype (keeping at 1.12.0-SNAPSHOT).

Posted by da...@apache.org.
ISIS-1287: recreating simpleapp archetype (keeping at 1.12.0-SNAPSHOT).


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/b26317a0
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/b26317a0
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/b26317a0

Branch: refs/heads/master
Commit: b26317a00a3d95f4892ebf5002ffa149ff12c323
Parents: d02852a
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Mar 22 23:16:40 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Mar 25 06:35:58 2016 +0000

----------------------------------------------------------------------
 .../homepage/HomePageViewModel.layout.xml       |  19 ++
 .../dom/simple/SimpleObject.layout.xml          |  18 ++
 .../main/resources/archetype-resources/pom.xml  |  13 -
 .../archetype-resources/webapp/pom.xml          | 312 +++++++++----------
 4 files changed, 181 insertions(+), 181 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/b26317a0/example/archetype/simpleapp/src/main/resources/archetype-resources/app/src/main/java/domainapp/app/services/homepage/HomePageViewModel.layout.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/app/src/main/java/domainapp/app/services/homepage/HomePageViewModel.layout.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/app/src/main/java/domainapp/app/services/homepage/HomePageViewModel.layout.xml
index f351d5e..f9c33fc 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/app/src/main/java/domainapp/app/services/homepage/HomePageViewModel.layout.xml
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/app/src/main/java/domainapp/app/services/homepage/HomePageViewModel.layout.xml
@@ -2,6 +2,24 @@
 #set( $symbol_dollar = '$' )
 #set( $symbol_escape = '\' )
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+  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.
+-->
 <bs3:grid xsi:schemaLocation="http://isis.apache.org/applib/layout/component http://isis.apache.org/applib/layout/component/component.xsd http://isis.apache.org/applib/layout/grid/bootstrap3 http://isis.apache.org/applib/layout/grid/bootstrap3/bootstrap3.xsd" xmlns="http://isis.apache.org/applib/layout/component" xmlns:bs3="http://isis.apache.org/applib/layout/grid/bootstrap3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <bs3:row>
         <bs3:col span="2">
@@ -9,6 +27,7 @@
             <bs3:row>
                 <bs3:col span="12" unreferencedActions="true">
                     <domainObject/>
+                    <action id="clearHints" hidden="EVERYWHERE"/>
                 </bs3:col>
             </bs3:row>
         </bs3:col>

http://git-wip-us.apache.org/repos/asf/isis/blob/b26317a0/example/archetype/simpleapp/src/main/resources/archetype-resources/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
index f274ccb..4cbc4f7 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
@@ -2,6 +2,24 @@
 #set( $symbol_dollar = '$' )
 #set( $symbol_escape = '\' )
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+  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.
+-->
 <bs3:grid xsi:schemaLocation="http://isis.apache.org/applib/layout/component http://isis.apache.org/applib/layout/component/component.xsd http://isis.apache.org/applib/layout/grid/bootstrap3 http://isis.apache.org/applib/layout/grid/bootstrap3/bootstrap3.xsd" xmlns:c="http://isis.apache.org/applib/layout/component" xmlns:bs3="http://isis.apache.org/applib/layout/grid/bootstrap3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 
     <bs3:row>

http://git-wip-us.apache.org/repos/asf/isis/blob/b26317a0/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml
index 69fba1b..7194010 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml
@@ -193,19 +193,6 @@
                     <version>2.2</version>
                 </plugin>
 
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-antrun-plugin</artifactId>
-                    <version>1.7</version>
-                    <executions>
-                        <execution>
-                            <goals>
-                                <goal>run</goal>
-                            </goals>
-                        </execution>
-                    </executions>
-                </plugin>
-
                 <!-- Apache Release Audit Tool -->
                 <plugin>
                     <groupId>org.apache.rat</groupId>

http://git-wip-us.apache.org/repos/asf/isis/blob/b26317a0/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/pom.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/pom.xml
index 5b8c52f..707bf4d 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/pom.xml
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/pom.xml
@@ -53,71 +53,14 @@
                   </executions>
             </plugin>
 
-            <plugin>
-                <artifactId>maven-war-plugin</artifactId>
-                <configuration>
-                    <warName>simpleapp</warName>
-                    <archive>
-                        <manifest>
-                            <addClasspath>false</addClasspath>
-                        </manifest>
-                        <manifestEntries>
-                            <Build-Time>${maven.build.timestamp}</Build-Time>
-                            <Build-Host>${agent.name}</Build-Host>
-                            <Build-User>${user.name}</Build-User>
-                            <Build-Maven>Maven ${maven.version}</Build-Maven>
-                            <Build-Java>${java.version}</Build-Java>
-                            <Build-OS>${os.name}</Build-OS>
-                            <Build-Label>${project.version}</Build-Label>
-                        </manifestEntries>
-                    </archive>
-                    <packagingExcludes>WEB-INF/lib/isis-core-webserver*.jar,
-                        WEB-INF/lib/javax.servlet-api-*.jar,
-                        WEB-INF/lib/javax.websocket-api-*.jar,
-                        WEB-INF/lib/jetty-all-*.jar</packagingExcludes>
-                </configuration>
-            </plugin>
-
         </plugins>
-        <pluginManagement>
-            <plugins>
-                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
-                <plugin>
-                    <groupId>org.eclipse.m2e</groupId>
-                    <artifactId>lifecycle-mapping</artifactId>
-                    <version>1.0.0</version>
-                    <configuration>
-                        <lifecycleMappingMetadata>
-                            <pluginExecutions>
-                                <pluginExecution>
-                                    <pluginExecutionFilter>
-                                        <groupId>org.codehaus.mojo</groupId>
-                                        <artifactId>build-helper-maven-plugin</artifactId>
-                                        <versionRange>[1.5,)</versionRange>
-                                        <goals>
-                                            <goal>maven-version</goal>
-                                        </goals>
-                                    </pluginExecutionFilter>
-                                    <action>
-                                        <ignore></ignore>
-                                    </action>
-                                </pluginExecution>
-                            </pluginExecutions>
-                        </lifecycleMappingMetadata>
-                    </configuration>
-                </plugin>
-            </plugins>
-        </pluginManagement>
     </build>
 
     <dependencies>
-    
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>${rootArtifactId}-app</artifactId>
         </dependency>
-        
-        <!-- other isis components -->
         <dependency>
             <groupId>org.apache.isis.viewer</groupId>
             <artifactId>isis-viewer-wicket-impl</artifactId>
@@ -130,72 +73,128 @@
             <groupId>org.apache.isis.core</groupId>
             <artifactId>isis-core-security-shiro</artifactId>
         </dependency>
-
-        <!-- isis core -->
         <dependency>
             <groupId>org.apache.isis.core</groupId>
             <artifactId>isis-core-security</artifactId>
         </dependency>
 
-        <!-- to run using WebServer (optional) -->
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-webserver</artifactId>
-            <scope>runtime</scope>
-            <optional>true</optional>
-        </dependency>
-
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-servlet_3.0_spec</artifactId>
         </dependency>
 
-        <!-- 
-          JDBC drivers 
-          (for jdo objectstore)
-          -->
-        <dependency>
-            <groupId>org.hsqldb</groupId>
-            <artifactId>hsqldb</artifactId>
-        </dependency>
+    </dependencies>
 
-        <!-- 
-        <dependency>
-            <groupId>postgresql</groupId>
-            <artifactId>postgresql</artifactId>
-            <version>9.1-901.jdbc4</version>
-        </dependency>
-         -->
+    <profiles>
+        <profile>
+            <id>package-war</id>
+            <activation>
+                <property>
+                    <name>!skip.package-war</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-war-plugin</artifactId>
+                        <configuration>
+                            <warName>simpleapp</warName>
+                            <archive>
+                                <manifest>
+                                    <addClasspath>false</addClasspath>
+                                </manifest>
+                                <manifestEntries>
+                                    <Build-Time>${maven.build.timestamp}</Build-Time>
+                                    <Build-Host>${agent.name}</Build-Host>
+                                    <Build-User>${user.name}</Build-User>
+                                    <Build-Maven>Maven ${maven.version}</Build-Maven>
+                                    <Build-Java>${java.version}</Build-Java>
+                                    <Build-OS>${os.name}</Build-OS>
+                                    <Build-Label>${project.version}</Build-Label>
+                                </manifestEntries>
+                            </archive>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
 
-        <!-- 
-        mvn install:install-file -Dfile=sqljdbc4.jar \
-                                 -DgroupId=com.microsoft.sqlserver \
-                                 -DartifactId=jdbc \
-                                 -Dversion=4.0 \
-                                 -Dpackaging=jar
-         -->
-         <!-- 
-        <dependency>
-            <groupId>com.microsoft.sqlserver</groupId>
-            <artifactId>sqljdbc4</artifactId>
-            <version>4.0</version>
-        </dependency>
-          -->
+        <profile>
+            <id>jdbc-hsqldb</id>
+            <activation>
+                <property>
+                    <name>!skip.jdbc-hsqldb</name>
+                </property>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>org.hsqldb</groupId>
+                    <artifactId>hsqldb</artifactId>
+                </dependency>
+            </dependencies>
+        </profile>
+        <profile>
+            <id>jdbc-logging</id>
+            <activation>
+                <property>
+                    <name>!skip.jdbc-logging</name>
+                </property>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>org.lazyluke</groupId>
+                    <artifactId>log4jdbc-remix</artifactId>
+                    <exclusions>
+                        <exclusion>
+                            <groupId>org.slf4j</groupId>
+                            <artifactId>slf4j-api</artifactId>
+                        </exclusion>
+                    </exclusions>
+                </dependency>
+            </dependencies>
+        </profile>
+        <!--
+        <profile>
+            <id>jdbc-postgres</id>
+            <activation>
+                <property>
+                    <name>!skip.jdbc-postgres</name>
+                </property>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>postgresql</groupId>
+                    <artifactId>postgresql</artifactId>
+                    <version>9.1-901.jdbc4</version>
+                </dependency>
+            </dependencies>
+        </profile>
+        -->
+        <!--
+        <profile>
+            <id>jdbc-mssql</id>
+            <activation>
+                <property>
+                    <name>!skip.jdbc-mssql</name>
+                </property>
+            </activation>
 
-        <dependency>
-          <groupId>org.lazyluke</groupId>
-          <artifactId>log4jdbc-remix</artifactId>
-          <exclusions>
-            <exclusion>
-              <groupId>org.slf4j</groupId>
-              <artifactId>slf4j-api</artifactId>
-            </exclusion>
-          </exclusions>
-        </dependency>
+            mvn install:install-file -Dfile=sqljdbc4.jar \
+                                     -DgroupId=com.microsoft.sqlserver \
+                                     -DartifactId=jdbc \
+                                     -Dversion=4.0 \
+                                     -Dpackaging=jar
 
-    </dependencies>
+            <dependencies>
+               <dependency>
+                   <groupId>com.microsoft.sqlserver</groupId>
+                   <artifactId>sqljdbc4</artifactId>
+                   <version>4.0</version>
+               </dependency>
+            </dependencies>
+        </profile>
+        -->
 
-    <profiles>
         <profile>
             <id>intellij</id>
             <activation>
@@ -205,71 +204,48 @@
             </activation>
             <dependencies>
                 <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-servlet_3.0_spec</artifactId>
-                    <!--
-                    Use 'compile' so can run o.a.i.WebServer from within IntelliJ;
-                    can rely on servlet container to ignore this in war file
-                    -->
-                    <scope>compile</scope>
+                    <groupId>org.apache.isis.core</groupId>
+                    <artifactId>isis-core-webserver</artifactId>
                 </dependency>
             </dependencies>
         </profile>
         <profile>
-            <id>jrebel</id>
-            <properties>
-                <!-- as used in the rebel.xml in the dom project -->
-                <target.dir>target</target.dir>
-                <isis-jrebel-plugin.packagePrefix>dom.simple,org.apache.isis.objectstore.jdo.applib</isis-jrebel-plugin.packagePrefix>
-                <isis-jrebel-plugin.loggingLevel>warn</isis-jrebel-plugin.loggingLevel>
-            </properties>
+            <id>eclipse-m2e</id>
+            <activation>
+                <property>
+                    <name>m2e.version</name>
+                </property>
+            </activation>
             <build>
-                <plugins>
-                    <!--
-                    mvn -P jrebel antrun:run \
-                        -Djrebel.jar="C:/Users/Dan/.IdeaIC13/config/plugins/jr-ide-idea/lib/jrebel/jrebel.jar" \
-                        -Disis_jrebel_plugin.jar="C:/github/danhaywood/isis-jrebel-plugin/target/danhaywood-isis-jrebel-plugin-1.0.0-SNAPSHOT.jar"
-                    -->
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-antrun-plugin</artifactId>
-                        <configuration>
-                            <target>
-                                <property name="compile_classpath" refid="maven.compile.classpath" />
-                                <property name="runtime_classpath" refid="maven.runtime.classpath" />
-                                <property name="test_classpath" refid="maven.test.classpath" />
-                                <property name="plugin_classpath" refid="maven.plugin.classpath" />
-
-                                <echo message="" />
-                                <echo message="" />
-                                <echo message="jrebel.jar             = ${jrebel.jar}" />
-                                <echo message="isis_jrebel_plugin.jar = ${isis_jrebel_plugin.jar}" />
-                                <echo message="target.dir             = ${target.dir}" />
-                                <echo message="" />
-                                <echo message="" />
-
-                                <exec executable="java" failonerror="true">
-                                    <arg value="-javaagent:${jrebel.jar}" />
-                                    <arg value="-Drebel.log=false" />
-                                    <arg value="-Drebel.check_class_hash=true" />
-                                    <arg value="-Drebel.packages_exclude=org.apache.isis" />
-
-                                    <!-- as used in the rebel.xml in the dom project -->
-                                    <arg value="-Dproject.root=${project.basedir}/.." />
-                                    <arg value="-Dtarget.dir=${target.dir}" />
-
-                                    <arg value="-Drebel.plugins=${isis_jrebel_plugin.jar}" />
-                                    <arg value="-Disis-jrebel-plugin.packagePrefix=${isis-jrebel-plugin.packagePrefix}" />
-                                    <arg value="-Disis-jrebel-plugin.loggingLevel=${isis-jrebel-plugin.loggingLevel}" />
-                                    <arg value="-XX:MaxPermSize=128m" />
-                                    <arg value="-classpath" />
-                                    <arg value="${runtime_classpath}" />
-                                    <arg value="org.apache.isis.WebServer" />
-                                </exec>
-                            </target>
-                        </configuration>
-                    </plugin>
-                </plugins>
+                <pluginManagement>
+                    <plugins>
+                        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+                        <plugin>
+                            <groupId>org.eclipse.m2e</groupId>
+                            <artifactId>lifecycle-mapping</artifactId>
+                            <version>1.0.0</version>
+                            <configuration>
+                                <lifecycleMappingMetadata>
+                                    <pluginExecutions>
+                                        <pluginExecution>
+                                            <pluginExecutionFilter>
+                                                <groupId>org.codehaus.mojo</groupId>
+                                                <artifactId>build-helper-maven-plugin</artifactId>
+                                                <versionRange>[1.5,)</versionRange>
+                                                <goals>
+                                                    <goal>maven-version</goal>
+                                                </goals>
+                                            </pluginExecutionFilter>
+                                            <action>
+                                                <ignore></ignore>
+                                            </action>
+                                        </pluginExecution>
+                                    </pluginExecutions>
+                                </lifecycleMappingMetadata>
+                            </configuration>
+                        </plugin>
+                    </plugins>
+                </pluginManagement>
             </build>
         </profile>
     </profiles>


[13/15] isis git commit: ISIS-1287: whitespace formatting only.

Posted by da...@apache.org.
ISIS-1287: whitespace formatting only.


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/ec410bf1
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/ec410bf1
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/ec410bf1

Branch: refs/heads/master
Commit: ec410bf15a8a3b879c24702ed4fa7660f837a4a9
Parents: 190284f
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Mar 24 16:31:51 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Mar 25 06:35:58 2016 +0000

----------------------------------------------------------------------
 .../org/apache/isis/core/runtime/system/IsisSystemFactory.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/ec410bf1/core/runtime/src/main/java/org/apache/isis/core/runtime/system/IsisSystemFactory.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/IsisSystemFactory.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/IsisSystemFactory.java
index 47d2c93..862cf81 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/IsisSystemFactory.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/IsisSystemFactory.java
@@ -29,6 +29,8 @@ import org.apache.isis.core.commons.components.ApplicationScopedComponent;
  */
 public interface IsisSystemFactory extends ApplicationScopedComponent {
 
-    IsisSystem createSystem(final DeploymentType deploymentType, @Nullable final AppManifest appManifestIfAny);
+    IsisSystem createSystem(
+            final DeploymentType deploymentType,
+            @Nullable final AppManifest appManifestIfAny);
 
 }


[02/15] isis git commit: ISIS-1287: whitespace reformatting and trivial refactor in IsisWebAppBootstrapper.

Posted by da...@apache.org.
ISIS-1287: whitespace reformatting and trivial refactor in IsisWebAppBootstrapper.


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/0892c17c
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/0892c17c
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/0892c17c

Branch: refs/heads/master
Commit: 0892c17c4aa660111bf5580321d0dd8f31bc73ce
Parents: 2efa413
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Mar 24 16:33:00 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Mar 25 06:35:58 2016 +0000

----------------------------------------------------------------------
 .../core/webapp/IsisWebAppBootstrapper.java     | 25 ++++++++++----------
 1 file changed, 13 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/0892c17c/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisWebAppBootstrapper.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisWebAppBootstrapper.java b/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisWebAppBootstrapper.java
index 5886a3f..e989fb4 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisWebAppBootstrapper.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisWebAppBootstrapper.java
@@ -130,7 +130,10 @@ public class IsisWebAppBootstrapper implements ServletContextListener {
         LOG.info("server started");
     }
 
-    private Injector createGuiceInjector(final IsisConfigurationBuilder isisConfigurationBuilder, final DeploymentType deploymentType, final InstallerLookup installerLookup) {
+    private Injector createGuiceInjector(
+            final IsisConfigurationBuilder isisConfigurationBuilder,
+            final DeploymentType deploymentType,
+            final InstallerLookup installerLookup) {
         final IsisInjectModule isisModule = new IsisInjectModule(deploymentType, isisConfigurationBuilder, installerLookup);
         return Guice.createInjector(isisModule);
     }
@@ -161,8 +164,7 @@ public class IsisWebAppBootstrapper implements ServletContextListener {
      * If no setting is found, defaults to {@link WebAppConstants#DEPLOYMENT_TYPE_DEFAULT}.
      */
     private DeploymentType determineDeploymentType(final IsisConfigurationBuilder isisConfigurationBuilder, final ServletContext servletContext) {
-        String deploymentTypeStr = null;
-        deploymentTypeStr = servletContext.getInitParameter(WebAppConstants.DEPLOYMENT_TYPE_KEY);
+        String deploymentTypeStr = servletContext.getInitParameter(WebAppConstants.DEPLOYMENT_TYPE_KEY);
         if (deploymentTypeStr == null) {
             deploymentTypeStr = servletContext.getInitParameter(SystemConstants.DEPLOYMENT_TYPE_KEY);
         }
@@ -175,17 +177,16 @@ public class IsisWebAppBootstrapper implements ServletContextListener {
         return DeploymentType.lookup(deploymentTypeStr);
     }
 
-    private void addConfigurationResourcesForDeploymentType(final IsisConfigurationBuilder configurationLoader, final DeploymentType deploymentType) {
-        final String type = deploymentType.name().toLowerCase();
-        configurationLoader.addConfigurationResource(type + ".properties", NotFoundPolicy.CONTINUE);
+    private static void addConfigurationResourcesForDeploymentType(
+            final IsisConfigurationBuilder configurationLoader,
+            final DeploymentType deploymentType) {
+        final String resourceName = deploymentType.name().toLowerCase() + ".properties";
+        configurationLoader.addConfigurationResource(resourceName, NotFoundPolicy.CONTINUE);
     }
 
-    private void addConfigurationResourcesForWebApps(final IsisConfigurationBuilder configurationLoader) {
-        for (final String config : (new String[] { "web.properties", "war.properties" })) {
-            if (config != null) {
-                configurationLoader.addConfigurationResource(config, NotFoundPolicy.CONTINUE);
-            }
-        }
+    private static void addConfigurationResourcesForWebApps(final IsisConfigurationBuilder configurationLoader) {
+        configurationLoader.addConfigurationResource("web.properties", NotFoundPolicy.CONTINUE);
+        configurationLoader.addConfigurationResource("war.properties", NotFoundPolicy.CONTINUE);
     }
 
     // /////////////////////////////////////////////////////


[14/15] isis git commit: ISIS-1287: change parent pom.xml for Isis to use profiles so can more easily specify whether to compile core, app, arch and/or docs. Removing the sonar profile.

Posted by da...@apache.org.
ISIS-1287: change parent pom.xml for Isis to use profiles so can more easily specify whether to compile core, app, arch and/or docs.  Removing the sonar profile.


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/4143bc9f
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/4143bc9f
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/4143bc9f

Branch: refs/heads/master
Commit: 4143bc9f14e71730f18661ec129b926bb192dd39
Parents: 0892c17
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Mar 24 16:33:52 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Mar 25 06:35:58 2016 +0000

----------------------------------------------------------------------
 pom.xml | 41 ++++++++++++++++++++++++-----------------
 1 file changed, 24 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/4143bc9f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 5dde9f3..f36482c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -45,45 +45,52 @@
     
     <profiles>
         <profile>
-            <id>default</id>
+            <id>core</id>
             <activation>
-                <activeByDefault>true</activeByDefault>
+	        <property>
+		    <name>!skip.core</name>
+		</property>
             </activation>
             <modules>
                 <module>core</module>
-
-                <module>example/application/simpleapp</module>
-                <module>example/archetype/simpleapp</module>
             </modules>
         </profile>
-        
+
         <profile>
-            <id>sonar</id>
+            <id>app</id>
+            <activation>
+	        <property>
+		    <name>!skip.app</name>
+		</property>
+            </activation>
             <modules>
-                <module>core</module>
+                <module>example/application/simpleapp</module>
             </modules>
         </profile>
 
         <profile>
-            <id>core</id>
+            <id>arch</id>
+            <activation>
+	        <property>
+		    <name>!skip.arch</name>
+		</property>
+            </activation>
             <modules>
-                <module>core</module>
+                <module>example/archetype/simpleapp</module>
             </modules>
         </profile>
 
         <profile>
             <id>docs</id>
+            <activation>
+	        <property>
+		    <name>docs</name>
+		</property>
+            </activation>
             <modules>
                 <module>adocs/documentation</module>
             </modules>
         </profile>
-
-        <profile>
-            <id>examples</id>
-            <modules>
-                <module>example/application/simpleapp</module>
-            </modules>
-        </profile>
     </profiles>
 
 </project>


[07/15] isis git commit: ISIS-1346: fixing copy-n-paste error. Thanks, IntelliJ !

Posted by da...@apache.org.
ISIS-1346: fixing copy-n-paste error.  Thanks, IntelliJ !


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/2257d025
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/2257d025
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/2257d025

Branch: refs/heads/master
Commit: 2257d02596b0a4296aefaa84cca70257b7f97c23
Parents: d7ed352
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Mar 22 23:54:46 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Mar 25 06:35:58 2016 +0000

----------------------------------------------------------------------
 .../metamodel/specloader/specimpl/ObjectActionContributee.java  | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/2257d025/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionContributee.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionContributee.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionContributee.java
index 070a88d..4d9d782 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionContributee.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionContributee.java
@@ -22,9 +22,6 @@ import java.util.List;
 
 import com.google.common.collect.Lists;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.annotation.Bulk;
 import org.apache.isis.applib.annotation.InvokedOn;
@@ -221,7 +218,7 @@ public class ObjectActionContributee extends ObjectActionDefault implements Cont
                     bulkInteractionContext.getInvokedAs() == null) {
 
                 bulkInteractionContext.setInvokedAs(Bulk.InteractionContext.InvokedAs.REGULAR);
-                actionInvocationContext.setDomainObjects(Collections.singletonList(contributee.getObject()));
+                bulkInteractionContext.setDomainObjects(Collections.singletonList(contributee.getObject()));
             }