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 2018/01/04 19:23:42 UTC
[isis] 04/10: ISIS-1465: recreating simpleapp archetype
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch release-1.16.0-RC1
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 63c3152e1f77a72f6d2c28e6674a1ad2ecf4c81a
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Jan 4 18:50:14 2018 +0000
ISIS-1465: recreating simpleapp archetype
---
example/archetype/simpleapp/pom.xml | 7 +-
.../META-INF/maven/archetype-metadata.xml | 7 +-
.../archetype-resources/application/.gitignore | 1 +
.../archetype-resources/application/lib/.gitignore | 5 -
...arDown.java => DomainAppApplicationModule.java} | 17 ++--
...DomainAppApplicationModuleFixtureSubmodule.java | 26 -----
...mainAppFixtureScriptsSpecificationProvider.java | 1 -
.../fixture/scenarios/DomainAppDemo.java | 25 ++---
.../application/manifest/DomainAppAppManifest.java | 21 ++--
.../manifest/DomainAppAppManifestWithFixtures.java | 9 +-
.../application/manifest/menubars.layout.xml | 112 +++++++++++++++++++++
...omainAppApplicationModuleServicesSubmodule.java | 26 -----
.../services/homepage/HomePageViewModel.java | 6 +-
.../services/homepage/HomePageViewModel.layout.xml | 1 +
...sis.properties => isis-non-changing.properties} | 16 +--
.../manifest/persistor_datanucleus.properties | 10 +-
.../bdd/specglue/BootstrappingGlue.java | 20 +---
.../bdd/specglue/CatalogOfFixturesGlue.java | 12 +--
.../{RunIntegBddSpecs.java => RunBddSpecs.java} | 5 +-
.../SimpleObjectSpec_listAllAndCreate.feature | 5 +-
.../integtests/DomainAppIntegTestAbstract.java | 13 +--
.../application/integtests/Smoke_IntegTest.java | 21 +---
.../src/test/resources/cucumber.properties | 4 +
.../archetype-resources/module-simple/.gitignore | 3 +-
...leModuleDomSubmodule.java => SimpleModule.java} | 21 +++-
.../modules/simple/SimpleModuleManifest.java | 15 ++-
.../modules/simple/dom/impl/SimpleObject.java | 51 ++++------
.../simple/dom/impl/SimpleObjectRepository.java | 58 -----------
.../{SimpleObjectMenu.java => SimpleObjects.java} | 37 +++++--
.../fixture/SimpleModuleFixtureSubmodule.java | 26 -----
...pleObjectData.java => SimpleObjectBuilder.java} | 51 +++++-----
...leObjectData.java => SimpleObject_persona.java} | 30 ++++--
.../fixture/scenario/CreateSimpleObjects.java | 80 ---------------
.../fixture/teardown/SimpleModuleTearDown.java | 39 -------
.../modules/simple/dom/impl/SimpleObject_Test.java | 2 +-
...epository_Test.java => SimpleObjects_Test.java} | 28 ++----
.../integtests/SimpleModuleIntegTestAbstract.java | 14 ++-
.../tests/SimpleObjectMenu_IntegTest.java | 56 +++--------
.../integtests/tests/SimpleObject_IntegTest.java | 40 ++------
.../simple/specglue/SimpleObjectMenuGlue.java | 24 ++---
.../src/main/resources/archetype-resources/pom.xml | 27 +++--
.../resources/archetype-resources/webapp/pom.xml | 5 -
.../webapp/src/main/webapp/WEB-INF/isis.properties | 25 ++---
.../src/main/webapp/WEB-INF/logging.properties | 28 ++++--
.../webapp/src/main/webapp/about/index.html | 2 +-
.../webapp/src/main/webapp/swagger-ui/index.html | 6 +-
.../resources/projects/basic/archetype.properties | 2 +-
47 files changed, 432 insertions(+), 608 deletions(-)
diff --git a/example/archetype/simpleapp/pom.xml b/example/archetype/simpleapp/pom.xml
index 652b50a..dea43af 100644
--- a/example/archetype/simpleapp/pom.xml
+++ b/example/archetype/simpleapp/pom.xml
@@ -17,7 +17,7 @@
specific language governing permissions and limitations
under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.isis.archetype</groupId>
<artifactId>simpleapp-archetype</artifactId>
@@ -65,12 +65,11 @@
<connection>scm:git:git@github.com:incodehq/incode-build.git/simpleapp</connection>
<developerConnection>scm:git:git@github.com:incodehq/incode-build.git/simpleapp</developerConnection>
<url>git@github.com:incodehq/incode-build.git/simpleapp</url>
- <tag>HEAD</tag>
- </scm>
+ </scm>
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>1.15.1</version>
+ <version>1.16.0</version>
<relativePath>../../../core/pom.xml</relativePath>
</parent>
<properties>
diff --git a/example/archetype/simpleapp/src/main/resources/META-INF/maven/archetype-metadata.xml b/example/archetype/simpleapp/src/main/resources/META-INF/maven/archetype-metadata.xml
index 4092c71..1aabf29 100644
--- a/example/archetype/simpleapp/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/example/archetype/simpleapp/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -130,10 +130,10 @@
<include>**/*.feature</include>
</includes>
</fileSet>
- <fileSet encoding="UTF-8">
- <directory>lib</directory>
+ <fileSet filtered="true" encoding="UTF-8">
+ <directory>src/test/resources</directory>
<includes>
- <include>**/*.gitignore</include>
+ <include>**/*.properties</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
@@ -145,6 +145,7 @@
<fileSet encoding="UTF-8">
<directory/>
<includes>
+ <include>.gitignore</include>
<include>translations.pot</include>
</includes>
</fileSet>
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/.gitignore b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/.gitignore
new file mode 100644
index 0000000..c71ea97
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/.gitignore
@@ -0,0 +1 @@
+/.apt_generated/
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/lib/.gitignore b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/lib/.gitignore
deleted file mode 100644
index 70eee7e..0000000
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/lib/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# explicitly ignoring Microsoft JDBC4 jar
-# (cannot redistribute, licensing)
-#
-sqljdbc4.jar
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/teardown/DomainAppTearDown.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/DomainAppApplicationModule.java
similarity index 70%
rename from example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/teardown/DomainAppTearDown.java
rename to example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/DomainAppApplicationModule.java
index 4f9e450..5b9afab 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/teardown/DomainAppTearDown.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/DomainAppApplicationModule.java
@@ -19,17 +19,22 @@
* specific language governing permissions and limitations
* under the License.
*/
-package domainapp.application.fixture.teardown;
+package domainapp.application;
-import org.apache.isis.applib.fixturescripts.FixtureScript;
+import java.util.Set;
-import domainapp.modules.simple.fixture.teardown.SimpleModuleTearDown;
+import com.google.common.collect.Sets;
-public class DomainAppTearDown extends FixtureScript {
+import org.apache.isis.applib.Module;
+import org.apache.isis.applib.ModuleAbstract;
+
+import domainapp.modules.simple.SimpleModule;
+
+public class DomainAppApplicationModule extends ModuleAbstract {
@Override
- protected void execute(ExecutionContext executionContext) {
- executionContext.executeChild(this, new SimpleModuleTearDown());
+ public Set<Module> getDependencies() {
+ return Sets.<Module>newHashSet(new SimpleModule());
}
}
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/DomainAppApplicationModuleFixtureSubmodule.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/DomainAppApplicationModuleFixtureSubmodule.java
deleted file mode 100644
index 10a5446..0000000
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/DomainAppApplicationModuleFixtureSubmodule.java
+++ /dev/null
@@ -1,26 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * 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.application.fixture;
-
-public final class DomainAppApplicationModuleFixtureSubmodule {
- private DomainAppApplicationModuleFixtureSubmodule(){}
-}
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/DomainAppFixtureScriptsSpecificationProvider.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/DomainAppFixtureScriptsSpecificationProvider.java
index 68db9e9..82d1751 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/DomainAppFixtureScriptsSpecificationProvider.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/DomainAppFixtureScriptsSpecificationProvider.java
@@ -36,7 +36,6 @@ import domainapp.application.fixture.scenarios.DomainAppDemo;
nature = NatureOfService.DOMAIN
)
public class DomainAppFixtureScriptsSpecificationProvider implements FixtureScriptsSpecificationProvider {
- @Override
public FixtureScriptsSpecification getSpecification() {
return FixtureScriptsSpecification
.builder(DomainAppFixtureScriptsSpecificationProvider.class)
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/scenarios/DomainAppDemo.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/scenarios/DomainAppDemo.java
index ecf258d..0229979 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/scenarios/DomainAppDemo.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/scenarios/DomainAppDemo.java
@@ -21,14 +21,13 @@
*/
package domainapp.application.fixture.scenarios;
-import javax.annotation.Nullable;
+import javax.inject.Inject;
+import org.apache.isis.applib.AppManifest2;
import org.apache.isis.applib.fixturescripts.FixtureScript;
+import org.apache.isis.applib.services.metamodel.MetaModelService4;
-import domainapp.application.fixture.teardown.DomainAppTearDown;
-import domainapp.modules.simple.fixture.scenario.CreateSimpleObjects;
-import lombok.Getter;
-import lombok.Setter;
+import domainapp.modules.simple.fixture.SimpleObject_persona;
public class DomainAppDemo extends FixtureScript {
@@ -36,16 +35,14 @@ public class DomainAppDemo extends FixtureScript {
withDiscoverability(Discoverability.DISCOVERABLE);
}
- @Nullable
- @Getter @Setter
- private Integer number;
-
@Override
protected void execute(final ExecutionContext ec) {
-
- // execute
- ec.executeChild(this, new DomainAppTearDown());
- ec.executeChild(this, new CreateSimpleObjects().setNumber(number));
-
+ AppManifest2 appManifest2 = metaModelService4.getAppManifest2();
+ ec.executeChild(this, appManifest2.getTeardownFixture());
+ ec.executeChild(this, appManifest2.getRefDataSetupFixture());
+ ec.executeChild(this, new SimpleObject_persona.PersistAll());
}
+
+ @Inject
+ MetaModelService4 metaModelService4;
}
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifest.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifest.java
index 29945a6..82e3590 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifest.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifest.java
@@ -21,29 +21,24 @@
*/
package domainapp.application.manifest;
-import org.apache.isis.applib.AppManifestAbstract;
+import org.apache.isis.applib.AppManifestAbstract2;
-import domainapp.application.fixture.DomainAppApplicationModuleFixtureSubmodule;
-import domainapp.application.services.DomainAppApplicationModuleServicesSubmodule;
-import domainapp.modules.simple.dom.SimpleModuleDomSubmodule;
+import domainapp.application.DomainAppApplicationModule;
/**
* Bootstrap the application.
*/
-public class DomainAppAppManifest extends AppManifestAbstract {
+public class DomainAppAppManifest extends AppManifestAbstract2 {
- public static final Builder BUILDER = Builder.forModules(
- SimpleModuleDomSubmodule.class,
- DomainAppApplicationModuleFixtureSubmodule.class,
- DomainAppApplicationModuleServicesSubmodule.class
- )
+ public static final Builder BUILDER = Builder
+ .forModule(new DomainAppApplicationModule())
.withConfigurationPropertiesFile(DomainAppAppManifest.class,
- "isis.properties",
+ "isis-non-changing.properties",
"authentication_shiro.properties",
"persistor_datanucleus.properties",
"viewer_restfulobjects.properties",
- "viewer_wicket.properties"
- ).withAuthMechanism("shiro");
+ "viewer_wicket.properties")
+ .withAuthMechanism("shiro");
public DomainAppAppManifest() {
super(BUILDER);
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestWithFixtures.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestWithFixtures.java
index d91b478..1dc6853 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestWithFixtures.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestWithFixtures.java
@@ -25,15 +25,16 @@ import java.util.List;
import org.apache.isis.applib.fixturescripts.FixtureScript;
-import domainapp.modules.simple.fixture.scenario.CreateSimpleObjects;
+import domainapp.modules.simple.fixture.SimpleObject_persona;
/**
- * Run the app but without setting up any fixtures.
+ * Run the app but setting up any fixtures.
*/
public class DomainAppAppManifestWithFixtures extends DomainAppAppManifest {
- @Override protected void overrideFixtures(final List<Class<? extends FixtureScript>> fixtureScripts) {
- fixtureScripts.add(CreateSimpleObjects.class);
+ @Override
+ protected void overrideFixtures(final List<Class<? extends FixtureScript>> fixtureScripts) {
+ fixtureScripts.add(SimpleObject_persona.PersistAll.class);
}
}
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/menubars.layout.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/menubars.layout.xml
new file mode 100644
index 0000000..4035c1d
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/menubars.layout.xml
@@ -0,0 +1,112 @@
+#set( $symbol_pound = '#' )
+#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.
+-->
+<mb3:menuBars xsi:schemaLocation="http://isis.apache.org/applib/layout/menubars/bootstrap3 http://isis.apache.org/applib/layout/menubars/bootstrap3/menubars.xsd http://isis.apache.org/applib/layout/component http://isis.apache.org/applib/layout/component/component.xsd http://isis.apache.org/applib/layout/links http://isis.apache.org/applib/layout/links/links.xsd" xmlns:cpt="http://isis.apache.org/applib/layout/component" xmlns:lnk="http://isis.apache.org/applib/layout/links" xmlns:mb3="h [...]
+ <mb3:primary>
+ <mb3:menu>
+ <mb3:named>Simple Objects</mb3:named>
+ <mb3:section>
+ <mb3:serviceAction objectType="simple.SimpleObjectMenu" id="create">
+ <cpt:named>Create</cpt:named>
+ </mb3:serviceAction>
+ <mb3:serviceAction objectType="simple.SimpleObjectMenu" id="findByName">
+ <cpt:named>Find By Name</cpt:named>
+ </mb3:serviceAction>
+ <mb3:serviceAction objectType="simple.SimpleObjectMenu" id="listAll">
+ <cpt:named>List All</cpt:named>
+ </mb3:serviceAction>
+ </mb3:section>
+ </mb3:menu>
+ <mb3:menu unreferencedActions="true">
+ <mb3:named>Other</mb3:named>
+ </mb3:menu>
+ </mb3:primary>
+ <mb3:secondary>
+ <mb3:menu>
+ <mb3:named>Prototyping</mb3:named>
+ <mb3:section>
+ <mb3:serviceAction objectType="isisApplib.FixtureScriptsDefault" id="runFixtureScript">
+ <cpt:named>Run Fixture Script</cpt:named>
+ </mb3:serviceAction>
+ <mb3:serviceAction objectType="isisApplib.FixtureScriptsDefault" id="runFixtureScriptWithAutoComplete">
+ <cpt:named>Run Fixture Script</cpt:named>
+ </mb3:serviceAction>
+ <mb3:serviceAction objectType="isisApplib.FixtureScriptsDefault" id="recreateObjectsAndReturnFirst">
+ <cpt:named>Recreate Objects And Return First</cpt:named>
+ </mb3:serviceAction>
+ </mb3:section>
+ <mb3:section>
+ <mb3:serviceAction objectType="isisApplib.LayoutServiceMenu" id="downloadLayouts">
+ <cpt:named>Download Object Layouts (ZIP)</cpt:named>
+ </mb3:serviceAction>
+ <mb3:serviceAction objectType="isisApplib.LayoutServiceMenu" id="downloadMenuBarsLayout">
+ <cpt:named>Download Menu Bars Layout (XML)</cpt:named>
+ </mb3:serviceAction>
+ </mb3:section>
+ <mb3:section>
+ <mb3:serviceAction objectType="isisApplib.MetaModelServicesMenu" id="downloadMetaModel">
+ <cpt:named>Download Meta Model (CSV)</cpt:named>
+ </mb3:serviceAction>
+ </mb3:section>
+ <mb3:section>
+ <mb3:serviceAction objectType="isisApplib.SwaggerServiceMenu" id="openSwaggerUi">
+ <cpt:named>Open Swagger Ui</cpt:named>
+ </mb3:serviceAction>
+ <mb3:serviceAction objectType="isisApplib.SwaggerServiceMenu" id="openRestApi">
+ <cpt:named>Open Rest Api</cpt:named>
+ </mb3:serviceAction>
+ <mb3:serviceAction objectType="isisApplib.SwaggerServiceMenu" id="downloadSwaggerSchemaDefinition">
+ <cpt:named>Download Swagger Schema Definition</cpt:named>
+ </mb3:serviceAction>
+ </mb3:section>
+ <mb3:section>
+ <mb3:serviceAction objectType="isisApplib.TranslationServicePoMenu" id="downloadTranslations">
+ <cpt:named>Download Translations</cpt:named>
+ </mb3:serviceAction>
+ <mb3:serviceAction objectType="isisApplib.TranslationServicePoMenu" id="resetTranslationCache">
+ <cpt:named>Clear translation cache</cpt:named>
+ </mb3:serviceAction>
+ <mb3:serviceAction objectType="isisApplib.TranslationServicePoMenu" id="switchToReadingTranslations">
+ <cpt:named>Switch To Reading Translations</cpt:named>
+ </mb3:serviceAction>
+ <mb3:serviceAction objectType="isisApplib.TranslationServicePoMenu" id="switchToWritingTranslations">
+ <cpt:named>Switch To Writing Translations</cpt:named>
+ </mb3:serviceAction>
+ </mb3:section>
+ <mb3:section>
+ <mb3:serviceAction objectType="isisApplib.HsqlDbManagerMenu" id="hsqlDbManager">
+ <cpt:named>HSQL DB Manager</cpt:named>
+ </mb3:serviceAction>
+ </mb3:section>
+ </mb3:menu>
+ </mb3:secondary>
+ <mb3:tertiary>
+ <mb3:menu>
+ <mb3:named>Configuration Service Menu</mb3:named>
+ <mb3:section>
+ <mb3:serviceAction objectType="isisApplib.ConfigurationServiceMenu" id="configuration">
+ <cpt:named>Configuration</cpt:named>
+ </mb3:serviceAction>
+ </mb3:section>
+ </mb3:menu>
+ </mb3:tertiary>
+</mb3:menuBars>
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/DomainAppApplicationModuleServicesSubmodule.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/DomainAppApplicationModuleServicesSubmodule.java
deleted file mode 100644
index 61feb63..0000000
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/DomainAppApplicationModuleServicesSubmodule.java
+++ /dev/null
@@ -1,26 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * 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.application.services;
-
-public final class DomainAppApplicationModuleServicesSubmodule {
- private DomainAppApplicationModuleServicesSubmodule(){}
-}
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/homepage/HomePageViewModel.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/homepage/HomePageViewModel.java
index dfae89f..def1650 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/homepage/HomePageViewModel.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/homepage/HomePageViewModel.java
@@ -28,7 +28,7 @@ import org.apache.isis.applib.annotation.Nature;
import org.apache.isis.applib.services.i18n.TranslatableString;
import domainapp.modules.simple.dom.impl.SimpleObject;
-import domainapp.modules.simple.dom.impl.SimpleObjectRepository;
+import domainapp.modules.simple.dom.impl.SimpleObjects;
@DomainObject(
nature = Nature.VIEW_MODEL,
@@ -41,9 +41,9 @@ public class HomePageViewModel {
}
public List<SimpleObject> getObjects() {
- return simpleObjectRepository.listAll();
+ return simpleObjects.listAll();
}
@javax.inject.Inject
- SimpleObjectRepository simpleObjectRepository;
+ SimpleObjects simpleObjects;
}
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/homepage/HomePageViewModel.layout.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/homepage/HomePageViewModel.layout.xml
index 036ca8e..0d90f7a 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/homepage/HomePageViewModel.layout.xml
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/homepage/HomePageViewModel.layout.xml
@@ -30,6 +30,7 @@
<action id="clearHints" hidden="EVERYWHERE"/>
<action id="downloadLayoutXml" hidden="EVERYWHERE"/>
<action id="rebuildMetamodel" hidden="EVERYWHERE"/>
+ <action id="openRestApi" hidden="EVERYWHERE"/>
</bs3:col>
</bs3:row>
</bs3:col>
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/resources/domainapp/application/manifest/isis.properties b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/resources/domainapp/application/manifest/isis-non-changing.properties
similarity index 92%
rename from example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/resources/domainapp/application/manifest/isis.properties
rename to example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/resources/domainapp/application/manifest/isis-non-changing.properties
index 1e73022..22bf94f 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/resources/domainapp/application/manifest/isis.properties
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/resources/domainapp/application/manifest/isis-non-changing.properties
@@ -18,17 +18,6 @@ ${symbol_pound} KIND, either express or implied. See the License for the
${symbol_pound} specific language governing permissions and limitations
${symbol_pound} under the License.
-${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pou [...]
-${symbol_pound}
-${symbol_pound} use AppManifest to specify modules, system components and fixtures
-${symbol_pound}
-${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pou [...]
-
-${symbol_pound}
-${symbol_pound} Specify the modules (= entities + services) and other components that make up
-${symbol_pound} this application.
-${symbol_pound}
-isis.appManifest=domainapp.application.manifest.DomainAppAppManifest
@@ -206,6 +195,11 @@ isis.reflector.facet.cssClass.patterns=${symbol_escape}
${symbol_pound}
+${symbol_pound} Whether actions require @Action annotation to be recognised
+${symbol_pound}
+isis.reflector.explicitAnnotations.action=true
+
+${symbol_pound}
${symbol_pound} whether to suppress posting of events if not specified (left as Xxx.Default); defaults to true
${symbol_pound}
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/resources/domainapp/application/manifest/persistor_datanucleus.properties b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/resources/domainapp/application/manifest/persistor_datanucleus.properties
index 420c337..77d720d 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/resources/domainapp/application/manifest/persistor_datanucleus.properties
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/resources/domainapp/application/manifest/persistor_datanucleus.properties
@@ -36,6 +36,14 @@ ${symbol_pound} generally speaking this should not be enabled
isis.persistor.disableConcurrencyChecking=false
+
+${symbol_pound}
+${symbol_pound} If enabled, uses a more efficient implementation to render standalone collections.
+${symbol_pound} default is 'false' (disabled)
+${symbol_pound}
+isis.persistor.datanucleus.standaloneCollection.bulkLoad=true
+
+
${symbol_pound}
${symbol_pound} hook to perform additional initialization when JDO class metadata is loaded
${symbol_pound} default implementation will attempt to run 'create schema' for the specified schema.
@@ -104,6 +112,6 @@ ${symbol_pound}isis.persistor.datanucleus.impl.javax.jdo.option.TransactionType=
${symbol_pound}
${symbol_pound}
${symbol_pound} JDBC connection details
-${symbol_pound} ... are in persistor.properties
+${symbol_pound} ... are in WEB-INF/isis.properties
${symbol_pound}
${symbol_pound}
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specglue/BootstrappingGlue.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specglue/BootstrappingGlue.java
index 30469c6..608334b 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specglue/BootstrappingGlue.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specglue/BootstrappingGlue.java
@@ -19,24 +19,14 @@ O * Licensed to the Apache Software Foundation (ASF) under one or more
*/
package domainapp.application.bdd.specglue;
-import org.apache.isis.core.specsupport.scenarios.ScenarioExecutionScope;
-import org.apache.isis.core.specsupport.specs.CukeGlueAbstract;
+import org.apache.isis.core.specsupport.specs.CukeGlueBootstrappingAbstract;
-import cucumber.api.java.After;
-import cucumber.api.java.Before;
-import domainapp.application.integtests.DomainAppIntegTestAbstract;
+import domainapp.application.DomainAppApplicationModule;
-public class BootstrappingGlue extends CukeGlueAbstract {
+public class BootstrappingGlue extends CukeGlueBootstrappingAbstract {
- @Before(value={"@integration"}, order=100)
- public void beforeScenarioIntegrationScope() {
- DomainAppIntegTestAbstract.initSystem();
- before(ScenarioExecutionScope.INTEGRATION);
+ public BootstrappingGlue() {
+ super(new DomainAppApplicationModule());
}
- @After
- public void afterScenario(cucumber.api.Scenario sc) {
- assertMocksSatisfied();
- after(sc);
- }
}
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specglue/CatalogOfFixturesGlue.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specglue/CatalogOfFixturesGlue.java
index 9c75d6d..4ce0fcc 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specglue/CatalogOfFixturesGlue.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specglue/CatalogOfFixturesGlue.java
@@ -19,16 +19,14 @@
*/
package domainapp.application.bdd.specglue;
-import org.apache.isis.core.specsupport.specs.CukeGlueAbstract;
+import org.apache.isis.core.specsupport.specs.CukeGlueAbstract2;
import cucumber.api.java.Before;
import domainapp.application.fixture.scenarios.DomainAppDemo;
-public class CatalogOfFixturesGlue extends CukeGlueAbstract {
-
- @Before(value={"@integration", "@DomainAppDemo"}, order=20000)
- public void integrationFixtures() throws Throwable {
- scenarioExecution().install(new DomainAppDemo());
+public class CatalogOfFixturesGlue extends CukeGlueAbstract2 {
+ @Before(value={"@DomainAppDemo"}, order=20000)
+ public void runDomainAppDemo() {
+ fixtureScripts.runFixtureScript(new DomainAppDemo(), null);
}
-
}
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/RunIntegBddSpecs.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/RunBddSpecs.java
similarity index 95%
rename from example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/RunIntegBddSpecs.java
rename to example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/RunBddSpecs.java
index 8cc8871..bfa9c24 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/RunIntegBddSpecs.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/RunBddSpecs.java
@@ -39,7 +39,8 @@ import cucumber.api.junit.Cucumber;
"classpath:domainapp.modules.simple.specglue"
},
strict = true,
- tags = { "~@backlog", "~@ignore" })
-public class RunIntegBddSpecs {
+ tags = { "~@backlog", "~@ignore" }
+)
+public class RunBddSpecs {
// intentionally empty
}
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/SimpleObjectSpec_listAllAndCreate.feature b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/SimpleObjectSpec_listAllAndCreate.feature
index 083e2cb..f164d92 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/SimpleObjectSpec_listAllAndCreate.feature
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/SimpleObjectSpec_listAllAndCreate.feature
@@ -17,10 +17,9 @@
@DomainAppDemo
Feature: List and Create New Simple Objects
- @integration
Scenario: Existing simple objects can be listed and new ones created
- Given there are initially 3 simple objects
+ Given there are initially 10 simple objects
When I create a new simple object
- Then there are 4 simple objects
+ Then there are 11 simple objects
\ No newline at end of file
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/integtests/DomainAppIntegTestAbstract.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/integtests/DomainAppIntegTestAbstract.java
index f50b127..01506f1 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/integtests/DomainAppIntegTestAbstract.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/integtests/DomainAppIntegTestAbstract.java
@@ -21,17 +21,14 @@
*/
package domainapp.application.integtests;
-import org.junit.BeforeClass;
+import org.apache.isis.core.integtestsupport.IntegrationTestAbstract3;
-import org.apache.isis.core.integtestsupport.IntegrationTestAbstract2;
+import domainapp.application.DomainAppApplicationModule;
-import domainapp.application.manifest.DomainAppAppManifest;
+public abstract class DomainAppIntegTestAbstract extends IntegrationTestAbstract3 {
-public abstract class DomainAppIntegTestAbstract extends IntegrationTestAbstract2 {
-
- @BeforeClass
- public static void initSystem() {
- bootstrapUsing(new DomainAppAppManifest());
+ public DomainAppIntegTestAbstract() {
+ super(new DomainAppApplicationModule());
}
}
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/integtests/Smoke_IntegTest.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/integtests/Smoke_IntegTest.java
index aa6a745..83639a1 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/integtests/Smoke_IntegTest.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/integtests/Smoke_IntegTest.java
@@ -27,31 +27,17 @@ import javax.inject.Inject;
import org.junit.Test;
-import org.apache.isis.applib.fixturescripts.FixtureScripts;
-import org.apache.isis.applib.services.xactn.TransactionService;
-
-import domainapp.application.fixture.teardown.DomainAppTearDown;
import domainapp.modules.simple.dom.impl.SimpleObject;
-import domainapp.modules.simple.dom.impl.SimpleObjectMenu;
+import domainapp.modules.simple.dom.impl.SimpleObjects;
import static org.assertj.core.api.Assertions.assertThat;
public class Smoke_IntegTest extends DomainAppIntegTestAbstract {
@Inject
- FixtureScripts fixtureScripts;
- @Inject
- TransactionService transactionService;
- @Inject
- SimpleObjectMenu menu;
+ SimpleObjects menu;
@Test
- public void create() throws Exception {
-
- // given
- DomainAppTearDown fs = new DomainAppTearDown();
- fixtureScripts.runFixtureScript(fs, null);
- transactionService.nextTransaction();
-
+ public void create() {
// when
List<SimpleObject> all = wrap(menu).listAll();
@@ -91,7 +77,6 @@ public class Smoke_IntegTest extends DomainAppIntegTestAbstract {
assertThat(wrap(fred).getName()).isEqualTo("Freddy");
-
// when
wrap(fred).setNotes("These are some notes");
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/resources/cucumber.properties b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/resources/cucumber.properties
new file mode 100644
index 0000000..6aa2d27
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/resources/cucumber.properties
@@ -0,0 +1,4 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+cucumber.api.java.ObjectFactory=org.apache.isis.core.integtestsupport.scenarios.ObjectFactoryForIntegration
\ No newline at end of file
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/.gitignore b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/.gitignore
index 7371415..72b06ac 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/.gitignore
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/.gitignore
@@ -2,4 +2,5 @@
translations.pot
*.jar
gradle/wrapper
-!gradle-wrapper.jar
\ No newline at end of file
+!gradle-wrapper.jar
+/.apt_generated/
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/SimpleModuleDomSubmodule.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/SimpleModule.java
similarity index 68%
rename from example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/SimpleModuleDomSubmodule.java
rename to example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/SimpleModule.java
index 9d82337..01fe400 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/SimpleModuleDomSubmodule.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/SimpleModule.java
@@ -19,10 +19,25 @@
* specific language governing permissions and limitations
* under the License.
*/
-package domainapp.modules.simple.dom;
+package domainapp.modules.simple;
-public final class SimpleModuleDomSubmodule {
- private SimpleModuleDomSubmodule(){}
+import org.apache.isis.applib.fixturescripts.FixtureScript;
+import org.apache.isis.applib.fixturescripts.teardown.TeardownFixtureAbstract2;
+import org.apache.isis.applib.ModuleAbstract;
+
+import domainapp.modules.simple.dom.impl.SimpleObject;
+
+public class SimpleModule extends ModuleAbstract {
+
+ @Override
+ public FixtureScript getTeardownFixture() {
+ return new TeardownFixtureAbstract2() {
+ @Override
+ protected void execute(ExecutionContext executionContext) {
+ deleteFrom(SimpleObject.class);
+ }
+ };
+ }
public static class PropertyDomainEvent<S,T>
extends org.apache.isis.applib.services.eventbus.PropertyDomainEvent<S,T> {}
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/SimpleModuleManifest.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/SimpleModuleManifest.java
index a2fddd0..49294a8 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/SimpleModuleManifest.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/SimpleModuleManifest.java
@@ -21,20 +21,17 @@
*/
package domainapp.modules.simple;
-import org.apache.isis.applib.AppManifestAbstract;
-
-import domainapp.modules.simple.dom.SimpleModuleDomSubmodule;
-import domainapp.modules.simple.fixture.SimpleModuleFixtureSubmodule;
+import org.apache.isis.applib.AppManifestAbstract2;
/**
* Used by <code>isis-maven-plugin</code> (build-time validation of the module) and also by module-level integration tests.
*/
-public class SimpleModuleManifest extends AppManifestAbstract {
+public class SimpleModuleManifest extends AppManifestAbstract2 {
- public static final Builder BUILDER = Builder.forModules(
- SimpleModuleDomSubmodule.class,
- SimpleModuleFixtureSubmodule.class
- );
+ public static final Builder BUILDER = Builder.forModule(new SimpleModule())
+ .withConfigurationProperty("isis.persistor.datanucleus.impl.datanucleus.schema.autoCreateAll","true")
+ .withConfigurationProperty("isis.persistor.datanucleus.impl.datanucleus.identifier.case","MixedCase")
+ ;
public SimpleModuleManifest() {
super(BUILDER);
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.java
index 05757bb..3a7322b 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.java
@@ -24,45 +24,35 @@ package domainapp.modules.simple.dom.impl;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.VersionStrategy;
+import com.google.common.collect.ComparisonChain;
+
import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.Auditing;
+import org.apache.isis.applib.annotation.CommandReification;
import org.apache.isis.applib.annotation.DomainObject;
import org.apache.isis.applib.annotation.DomainObjectLayout;
import org.apache.isis.applib.annotation.Editing;
import org.apache.isis.applib.annotation.Parameter;
import org.apache.isis.applib.annotation.ParameterLayout;
import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.Publishing;
import org.apache.isis.applib.annotation.SemanticsOf;
import org.apache.isis.applib.annotation.Title;
import org.apache.isis.applib.services.i18n.TranslatableString;
import org.apache.isis.applib.services.message.MessageService;
import org.apache.isis.applib.services.repository.RepositoryService;
import org.apache.isis.applib.services.title.TitleService;
-import org.apache.isis.applib.util.ObjectContracts;
import lombok.AccessLevel;
-@javax.jdo.annotations.PersistenceCapable(
- identityType=IdentityType.DATASTORE,
- schema = "simple"
-)
-@javax.jdo.annotations.DatastoreIdentity(
- strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY,
- column="id")
-@javax.jdo.annotations.Version(
- strategy= VersionStrategy.DATE_TIME,
- column="version")
-@javax.jdo.annotations.Queries({
- @javax.jdo.annotations.Query(
- name = "findByName",
- value = "SELECT "
- + "FROM domainapp.modules.simple.dom.impl.SimpleObject "
- + "WHERE name.indexOf(:name) >= 0 ")
-})
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE, schema = "simple")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY, column="id")
+@javax.jdo.annotations.Version(strategy= VersionStrategy.DATE_TIME, column="version")
@javax.jdo.annotations.Unique(name="SimpleObject_name_UNQ", members = {"name"})
-@DomainObject() // objectType inferred from @PersistenceCapable${symbol_pound}schema
-@DomainObjectLayout() // trigger events etc.
+@DomainObject(auditing = Auditing.ENABLED)
+@DomainObjectLayout() // causes UI events to be triggered
@lombok.Getter @lombok.Setter
-@lombok.RequiredArgsConstructor(staticName = "create")
+@lombok.RequiredArgsConstructor
public class SimpleObject implements Comparable<SimpleObject> {
@javax.jdo.annotations.Column(allowsNull = "false", length = 40)
@@ -76,8 +66,7 @@ public class SimpleObject implements Comparable<SimpleObject> {
private String notes;
- //region > updateName (action)
- @Action(semantics = SemanticsOf.IDEMPOTENT)
+ @Action(semantics = SemanticsOf.IDEMPOTENT, command = CommandReification.ENABLED, publishing = Publishing.ENABLED)
public SimpleObject updateName(
@Parameter(maxLength = 40)
@ParameterLayout(named = "Name")
@@ -93,40 +82,44 @@ public class SimpleObject implements Comparable<SimpleObject> {
public TranslatableString validate0UpdateName(final String name) {
return name != null && name.contains("!") ? TranslatableString.tr("Exclamation mark is not allowed") : null;
}
- //endregion
- //region > delete (action)
+
@Action(semantics = SemanticsOf.NON_IDEMPOTENT_ARE_YOU_SURE)
public void delete() {
final String title = titleService.titleOf(this);
messageService.informUser(String.format("'%s' deleted", title));
repositoryService.remove(this);
}
- //endregion
+
//region > toString, compareTo
@Override
public String toString() {
- return ObjectContracts.toString(this, "name");
+ return getName();
}
- @Override
public int compareTo(final SimpleObject other) {
- return ObjectContracts.compare(this, other, "name");
+ return ComparisonChain.start()
+ .compare(this.getName(), other.getName())
+ .result();
}
//endregion
+
//region > injected services
@javax.inject.Inject
+ @javax.jdo.annotations.NotPersistent
@lombok.Getter(AccessLevel.NONE) @lombok.Setter(AccessLevel.NONE)
RepositoryService repositoryService;
@javax.inject.Inject
+ @javax.jdo.annotations.NotPersistent
@lombok.Getter(AccessLevel.NONE) @lombok.Setter(AccessLevel.NONE)
TitleService titleService;
@javax.inject.Inject
+ @javax.jdo.annotations.NotPersistent
@lombok.Getter(AccessLevel.NONE) @lombok.Setter(AccessLevel.NONE)
MessageService messageService;
//endregion
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObjectRepository.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObjectRepository.java
deleted file mode 100644
index a0bbaf9..0000000
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObjectRepository.java
+++ /dev/null
@@ -1,58 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * 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.modules.simple.dom.impl;
-
-import java.util.List;
-
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.NatureOfService;
-import org.apache.isis.applib.query.QueryDefault;
-import org.apache.isis.applib.services.registry.ServiceRegistry2;
-import org.apache.isis.applib.services.repository.RepositoryService;
-
-@DomainService(
- nature = NatureOfService.DOMAIN,
- repositoryFor = SimpleObject.class
-)
-public class SimpleObjectRepository {
-
- public List<SimpleObject> listAll() {
- return repositoryService.allInstances(SimpleObject.class);
- }
-
- public List<SimpleObject> findByName(final String name) {
- return repositoryService.allMatches(
- new QueryDefault<>(
- SimpleObject.class,
- "findByName",
- "name", name));
- }
-
- public SimpleObject create(final String name) {
- return repositoryService.persist(SimpleObject.create(name));
- }
-
- @javax.inject.Inject
- RepositoryService repositoryService;
- @javax.inject.Inject
- ServiceRegistry2 serviceRegistry;
-}
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObjectMenu.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObjects.java
similarity index 65%
rename from example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObjectMenu.java
rename to example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObjects.java
index 9114be5..0bb252d 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObjectMenu.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObjects.java
@@ -23,6 +23,8 @@ package domainapp.modules.simple.dom.impl;
import java.util.List;
+import org.datanucleus.query.typesafe.TypesafeQuery;
+
import org.apache.isis.applib.annotation.Action;
import org.apache.isis.applib.annotation.ActionLayout;
import org.apache.isis.applib.annotation.BookmarkPolicy;
@@ -31,8 +33,12 @@ import org.apache.isis.applib.annotation.DomainServiceLayout;
import org.apache.isis.applib.annotation.MemberOrder;
import org.apache.isis.applib.annotation.NatureOfService;
import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.Programmatic;
import org.apache.isis.applib.annotation.SemanticsOf;
import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
+import org.apache.isis.applib.services.jdosupport.IsisJdoSupport;
+import org.apache.isis.applib.services.repository.RepositoryService;
+import org.apache.isis.applib.services.xactn.TransactionService;
@DomainService(
nature = NatureOfService.VIEW_MENU_ONLY,
@@ -43,13 +49,13 @@ import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
named = "Simple Objects",
menuOrder = "10"
)
-public class SimpleObjectMenu {
+public class SimpleObjects {
@Action(semantics = SemanticsOf.SAFE)
@ActionLayout(bookmarking = BookmarkPolicy.AS_ROOT)
@MemberOrder(sequence = "1")
public List<SimpleObject> listAll() {
- return simpleObjectRepository.listAll();
+ return repositoryService.allInstances(SimpleObject.class);
}
@@ -60,21 +66,40 @@ public class SimpleObjectMenu {
@ParameterLayout(named="Name")
final String name
) {
- return simpleObjectRepository.findByName(name);
+ TypesafeQuery<SimpleObject> q = isisJdoSupport.newTypesafeQuery(SimpleObject.class);
+ final QSimpleObject cand = QSimpleObject.candidate();
+ q = q.filter(
+ cand.name.indexOf(q.stringParameter("name")).ne(-1)
+ );
+ return q.setParameter("name", name)
+ .executeList();
+ }
+
+ @Programmatic
+ public SimpleObject findByNameExact(final String name) {
+ TypesafeQuery<SimpleObject> q = isisJdoSupport.newTypesafeQuery(SimpleObject.class);
+ final QSimpleObject cand = QSimpleObject.candidate();
+ q = q.filter(
+ cand.name.eq(q.stringParameter("name"))
+ );
+ return q.setParameter("name", name)
+ .executeUnique();
}
- public static class CreateDomainEvent extends ActionDomainEvent<SimpleObjectMenu> {}
+ public static class CreateDomainEvent extends ActionDomainEvent<SimpleObjects> {}
@Action(domainEvent = CreateDomainEvent.class)
@MemberOrder(sequence = "3")
public SimpleObject create(
@ParameterLayout(named="Name")
final String name) {
- return simpleObjectRepository.create(name);
+ return repositoryService.persist(new SimpleObject(name));
}
+ @javax.inject.Inject
+ RepositoryService repositoryService;
@javax.inject.Inject
- SimpleObjectRepository simpleObjectRepository;
+ IsisJdoSupport isisJdoSupport;
}
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/SimpleModuleFixtureSubmodule.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/SimpleModuleFixtureSubmodule.java
deleted file mode 100644
index 3e70432..0000000
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/SimpleModuleFixtureSubmodule.java
+++ /dev/null
@@ -1,26 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * 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.modules.simple.fixture;
-
-public final class SimpleModuleFixtureSubmodule {
- private SimpleModuleFixtureSubmodule(){}
-}
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/SimpleObjectData.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/SimpleObjectBuilder.java
similarity index 58%
copy from example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/SimpleObjectData.java
copy to example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/SimpleObjectBuilder.java
index 9aa8017..39bbfa6 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/SimpleObjectData.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/SimpleObjectBuilder.java
@@ -20,33 +20,34 @@
* under the License.
*/
-package domainapp.modules.simple.fixture.scenario;
+package domainapp.modules.simple.fixture;
+
+import org.apache.isis.applib.fixturescripts.BuilderScriptAbstract;
import domainapp.modules.simple.dom.impl.SimpleObject;
-import domainapp.modules.simple.dom.impl.SimpleObjectMenu;
-import lombok.AllArgsConstructor;
-
-@AllArgsConstructor
-public enum SimpleObjectData {
-
- FOO("Foo"),
- BAR("Bar"),
- BAZ("Baz"),
- FRODO("Frodo"),
- FROYO("Froyo"),
- FIZZ("Fizz"),
- BIP("Bip"),
- BOP("Bop"),
- BANG("Bang"),
- BOO("Boo");
-
- private final String name;
-
- public SimpleObject createWith(final SimpleObjectMenu menu) {
- return menu.create(name);
- }
+import domainapp.modules.simple.dom.impl.SimpleObjects;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.experimental.Accessors;
+
+@Accessors(chain = true)
+public class SimpleObjectBuilder extends BuilderScriptAbstract<SimpleObject, SimpleObjectBuilder> {
+
+ @Getter @Setter
+ private String name;
+
+ @Getter
+ private SimpleObject object;
- public SimpleObject findWith(final SimpleObjectMenu menu) {
- return menu.findByName(name).get(0);
+ @Override
+ protected void execute(final ExecutionContext ec) {
+
+ checkParam("name", ec, String.class);
+
+ object = wrap(simpleObjects).create(name);
}
+
+ @javax.inject.Inject
+ SimpleObjects simpleObjects;
+
}
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/SimpleObjectData.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/SimpleObject_persona.java
similarity index 53%
rename from example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/SimpleObjectData.java
rename to example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/SimpleObject_persona.java
index 9aa8017..5fd5865 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/SimpleObjectData.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/SimpleObject_persona.java
@@ -20,14 +20,20 @@
* under the License.
*/
-package domainapp.modules.simple.fixture.scenario;
+package domainapp.modules.simple.fixture;
+
+import org.apache.isis.applib.fixturescripts.PersonaWithBuilderScript;
+import org.apache.isis.applib.fixturescripts.PersonaWithFinder;
+import org.apache.isis.applib.fixturescripts.setup.PersonaEnumPersistAll;
+import org.apache.isis.applib.services.registry.ServiceRegistry2;
import domainapp.modules.simple.dom.impl.SimpleObject;
-import domainapp.modules.simple.dom.impl.SimpleObjectMenu;
+import domainapp.modules.simple.dom.impl.SimpleObjects;
import lombok.AllArgsConstructor;
@AllArgsConstructor
-public enum SimpleObjectData {
+public enum SimpleObject_persona implements PersonaWithBuilderScript<SimpleObject, SimpleObjectBuilder>,
+ PersonaWithFinder<SimpleObject> {
FOO("Foo"),
BAR("Bar"),
@@ -42,11 +48,21 @@ public enum SimpleObjectData {
private final String name;
- public SimpleObject createWith(final SimpleObjectMenu menu) {
- return menu.create(name);
+// @Override
+ public SimpleObjectBuilder builder() {
+ return new SimpleObjectBuilder().setName(name);
+ }
+
+ //@Override
+ public SimpleObject findUsing(final ServiceRegistry2 serviceRegistry) {
+ SimpleObjects simpleObjects = serviceRegistry.lookupService(SimpleObjects.class);
+ return simpleObjects.findByNameExact(name);
}
- public SimpleObject findWith(final SimpleObjectMenu menu) {
- return menu.findByName(name).get(0);
+ public static class PersistAll
+ extends PersonaEnumPersistAll<SimpleObject_persona, SimpleObject, SimpleObjectBuilder> {
+ public PersistAll() {
+ super(SimpleObject_persona.class);
+ }
}
}
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/CreateSimpleObjects.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/CreateSimpleObjects.java
deleted file mode 100644
index e6ce665..0000000
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/CreateSimpleObjects.java
+++ /dev/null
@@ -1,80 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * 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.modules.simple.fixture.scenario;
-
-import java.util.List;
-
-import javax.annotation.Nullable;
-
-import com.google.common.collect.Lists;
-
-import org.apache.isis.applib.fixturescripts.FixtureScript;
-
-import domainapp.modules.simple.dom.impl.SimpleObject;
-import domainapp.modules.simple.dom.impl.SimpleObjectMenu;
-import lombok.Getter;
-import lombok.Setter;
-import lombok.experimental.Accessors;
-
-@Accessors(chain = true)
-public class CreateSimpleObjects extends FixtureScript {
-
- /**
- * The number of objects to create, up to 10; optional, defaults to 3.
- */
- @Nullable
- @Getter @Setter
- private Integer number;
-
- /**
- * The objects created by this fixture (output).
- */
- @Getter
- private final List<SimpleObject> simpleObjects = Lists.newArrayList();
-
- @Override
- protected void execute(final ExecutionContext ec) {
-
- int max = SimpleObjectData.values().length;
-
- // defaults
- final int number = defaultParam("number", ec, 3);
-
- // validate
- if(number < 0 || number > max) {
- throw new IllegalArgumentException(String.format("number must be in range [0,%d)", max));
- }
-
- // execute
- for (int i = 0; i < number; i++) {
- final SimpleObjectData data = SimpleObjectData.values()[i];
- final SimpleObject simpleObject = data.createWith(wrap(simpleObjectMenu));
- ec.addResult(this, simpleObject);
- simpleObjects.add(simpleObject);
- }
- }
-
- @javax.inject.Inject
- SimpleObjectMenu simpleObjectMenu;
-
-}
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/teardown/SimpleModuleTearDown.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/teardown/SimpleModuleTearDown.java
deleted file mode 100644
index a5033a1..0000000
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/teardown/SimpleModuleTearDown.java
+++ /dev/null
@@ -1,39 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * 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.modules.simple.fixture.teardown;
-
-import org.apache.isis.applib.fixturescripts.FixtureScript;
-import org.apache.isis.applib.services.jdosupport.IsisJdoSupport;
-
-public class SimpleModuleTearDown extends FixtureScript {
-
- @Override
- protected void execute(ExecutionContext executionContext) {
- isisJdoSupport.executeUpdate("delete from ${symbol_escape}"simple${symbol_escape}".${symbol_escape}"SimpleObject${symbol_escape}"");
- }
-
-
- @javax.inject.Inject
- private IsisJdoSupport isisJdoSupport;
-
-}
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/dom/impl/SimpleObject_Test.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/dom/impl/SimpleObject_Test.java
index 4d90f0d..43180a2 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/dom/impl/SimpleObject_Test.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/dom/impl/SimpleObject_Test.java
@@ -30,7 +30,7 @@ public class SimpleObject_Test {
@Before
public void setUp() throws Exception {
- simpleObject = SimpleObject.create("Foobar");
+ simpleObject = new SimpleObject("Foobar");
}
public static class Name extends SimpleObject_Test {
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/dom/impl/SimpleObjectRepository_Test.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/dom/impl/SimpleObjects_Test.java
similarity index 78%
rename from example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/dom/impl/SimpleObjectRepository_Test.java
rename to example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/dom/impl/SimpleObjects_Test.java
index ed90361..530165c 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/dom/impl/SimpleObjectRepository_Test.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/dom/impl/SimpleObjects_Test.java
@@ -32,7 +32,6 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
-import org.apache.isis.applib.services.registry.ServiceRegistry2;
import org.apache.isis.applib.services.repository.RepositoryService;
import org.apache.isis.core.unittestsupport.jmocking.JMockActions;
import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
@@ -40,30 +39,26 @@ import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
import static org.assertj.core.api.Assertions.assertThat;
-public class SimpleObjectRepository_Test {
+public class SimpleObjects_Test {
@Rule
public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
@Mock
- ServiceRegistry2 mockServiceRegistry;
-
- @Mock
RepositoryService mockRepositoryService;
- SimpleObjectRepository simpleObjectRepository;
+ SimpleObjects simpleObjects;
@Before
- public void setUp() throws Exception {
- simpleObjectRepository = new SimpleObjectRepository();
- simpleObjectRepository.repositoryService = mockRepositoryService;
- simpleObjectRepository.serviceRegistry = mockServiceRegistry;
+ public void setUp() {
+ simpleObjects = new SimpleObjects();
+ simpleObjects.repositoryService = mockRepositoryService;
}
- public static class Create extends SimpleObjectRepository_Test {
+ public static class Create extends SimpleObjects_Test {
@Test
- public void happyCase() throws Exception {
+ public void happyCase() {
final String someName = "Foobar";
@@ -77,7 +72,7 @@ public class SimpleObjectRepository_Test {
});
// when
- final SimpleObject obj = simpleObjectRepository.create(someName);
+ final SimpleObject obj = simpleObjects.create(someName);
// then
assertThat(obj).isNotNull();
@@ -91,7 +86,6 @@ public class SimpleObjectRepository_Test {
return name.equals(item.getName());
}
- @Override
public void describeTo(final Description description) {
description.appendText("has name of '" + name + "'");
}
@@ -99,10 +93,10 @@ public class SimpleObjectRepository_Test {
}
}
- public static class ListAll extends SimpleObjectRepository_Test {
+ public static class ListAll extends SimpleObjects_Test {
@Test
- public void happyCase() throws Exception {
+ public void happyCase() {
// given
final List<SimpleObject> all = Lists.newArrayList();
@@ -115,7 +109,7 @@ public class SimpleObjectRepository_Test {
});
// when
- final List<SimpleObject> list = simpleObjectRepository.listAll();
+ final List<SimpleObject> list = simpleObjects.listAll();
// then
assertThat(list).isEqualTo(all);
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/integtests/SimpleModuleIntegTestAbstract.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/integtests/SimpleModuleIntegTestAbstract.java
index 6bcd5e6..c76df94 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/integtests/SimpleModuleIntegTestAbstract.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/integtests/SimpleModuleIntegTestAbstract.java
@@ -21,17 +21,15 @@
*/
package domainapp.modules.simple.integtests;
-import org.junit.BeforeClass;
+import org.apache.isis.core.integtestsupport.IntegrationTestAbstract3;
-import org.apache.isis.core.integtestsupport.IntegrationTestAbstract2;
+import domainapp.modules.simple.SimpleModule;
-import domainapp.modules.simple.SimpleModuleManifest;
+public abstract class SimpleModuleIntegTestAbstract extends IntegrationTestAbstract3 {
-public abstract class SimpleModuleIntegTestAbstract extends IntegrationTestAbstract2 {
-
- @BeforeClass
- public static void initSystem() {
- bootstrapUsing(SimpleModuleManifest.BUILDER.withConfigurationProperty("isis.objects.editing","false"));
+ public SimpleModuleIntegTestAbstract() {
+ super(new SimpleModule().withConfigurationProperty("isis.objects.editing","false"));
}
+
}
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObjectMenu_IntegTest.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObjectMenu_IntegTest.java
index 635edfe..3cca49d 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObjectMenu_IntegTest.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObjectMenu_IntegTest.java
@@ -33,54 +33,32 @@ import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
import org.junit.Test;
-import org.apache.isis.applib.fixturescripts.FixtureScript;
-import org.apache.isis.applib.fixturescripts.FixtureScripts;
-import org.apache.isis.applib.services.xactn.TransactionService;
-
import domainapp.modules.simple.dom.impl.SimpleObject;
-import domainapp.modules.simple.dom.impl.SimpleObjectMenu;
-import domainapp.modules.simple.fixture.scenario.CreateSimpleObjects;
-import domainapp.modules.simple.fixture.teardown.SimpleModuleTearDown;
+import domainapp.modules.simple.dom.impl.SimpleObjects;
+import domainapp.modules.simple.fixture.SimpleObject_persona;
import domainapp.modules.simple.integtests.SimpleModuleIntegTestAbstract;
import static org.assertj.core.api.Assertions.assertThat;
public class SimpleObjectMenu_IntegTest extends SimpleModuleIntegTestAbstract {
- @Inject
- FixtureScripts fixtureScripts;
- @Inject
- TransactionService transactionService;
- @Inject
- SimpleObjectMenu menu;
-
public static class ListAll extends SimpleObjectMenu_IntegTest {
@Test
- public void happyCase() throws Exception {
+ public void happyCase() {
// given
- fixtureScripts.runFixtureScript(new SimpleModuleTearDown(), null);
- CreateSimpleObjects fs = new CreateSimpleObjects();
- fixtureScripts.runFixtureScript(fs, null);
+ fixtureScripts.runFixtureScript(new SimpleObject_persona.PersistAll());
transactionService.nextTransaction();
// when
final List<SimpleObject> all = wrap(menu).listAll();
// then
- assertThat(all).hasSize(fs.getSimpleObjects().size());
-
- SimpleObject simpleObject = wrap(all.get(0));
- assertThat(simpleObject.getName()).isEqualTo(fs.getSimpleObjects().get(0).getName());
+ assertThat(all).hasSize(SimpleObject_persona.values().length);
}
@Test
- public void whenNone() throws Exception {
-
- // given
- FixtureScript fs = new SimpleModuleTearDown();
- fixtureScripts.runFixtureScript(fs, null);
- transactionService.nextTransaction();
+ public void whenNone() {
// when
final List<SimpleObject> all = wrap(menu).listAll();
@@ -93,14 +71,8 @@ public class SimpleObjectMenu_IntegTest extends SimpleModuleIntegTestAbstract {
public static class Create extends SimpleObjectMenu_IntegTest {
@Test
- public void happyCase() throws Exception {
+ public void happyCase() {
- // given
- FixtureScript fs = new SimpleModuleTearDown();
- fixtureScripts.runFixtureScript(fs, null);
- transactionService.nextTransaction();
-
- // when
wrap(menu).create("Faz");
// then
@@ -109,20 +81,17 @@ public class SimpleObjectMenu_IntegTest extends SimpleModuleIntegTestAbstract {
}
@Test
- public void whenAlreadyExists() throws Exception {
+ public void whenAlreadyExists() {
// given
- FixtureScript fs = new SimpleModuleTearDown();
- fixtureScripts.runFixtureScript(fs, null);
- transactionService.nextTransaction();
- wrap(menu).create("Faz");
+ fixtureScripts.runBuilderScript(SimpleObject_persona.FIZZ.builder());
transactionService.nextTransaction();
// then
expectedExceptions.expectCause(causalChainContains(SQLIntegrityConstraintViolationException.class));
// when
- wrap(menu).create("Faz");
+ wrap(menu).create("Fizz");
transactionService.nextTransaction();
}
@@ -139,7 +108,7 @@ public class SimpleObjectMenu_IntegTest extends SimpleModuleIntegTestAbstract {
return false;
}
- @Override
+ //@Override
public void describeTo(Description description) {
description.appendText("exception with causal chain containing " + cls.getSimpleName());
}
@@ -147,4 +116,7 @@ public class SimpleObjectMenu_IntegTest extends SimpleModuleIntegTestAbstract {
}
}
+ @Inject
+ SimpleObjects menu;
+
}
\ No newline at end of file
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObject_IntegTest.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObject_IntegTest.java
index 13f9f81..1ede0b1 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObject_IntegTest.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObject_IntegTest.java
@@ -28,50 +28,31 @@ import javax.inject.Inject;
import org.junit.Before;
import org.junit.Test;
-import org.apache.isis.applib.fixturescripts.FixtureScripts;
import org.apache.isis.applib.services.title.TitleService;
import org.apache.isis.applib.services.wrapper.DisabledException;
import org.apache.isis.applib.services.wrapper.InvalidException;
-import org.apache.isis.applib.services.xactn.TransactionService;
import org.apache.isis.core.metamodel.services.jdosupport.Persistable_datanucleusIdLong;
import org.apache.isis.core.metamodel.services.jdosupport.Persistable_datanucleusVersionTimestamp;
import domainapp.modules.simple.dom.impl.SimpleObject;
-import domainapp.modules.simple.dom.impl.SimpleObjectMenu;
-import domainapp.modules.simple.fixture.scenario.CreateSimpleObjects;
-import domainapp.modules.simple.fixture.scenario.SimpleObjectData;
-import domainapp.modules.simple.fixture.teardown.SimpleModuleTearDown;
+import domainapp.modules.simple.fixture.SimpleObject_persona;
import domainapp.modules.simple.integtests.SimpleModuleIntegTestAbstract;
import static org.assertj.core.api.Assertions.assertThat;
public class SimpleObject_IntegTest extends SimpleModuleIntegTestAbstract {
- @Inject
- FixtureScripts fixtureScripts;
- @Inject
- SimpleObjectMenu simpleObjectMenu;
- @Inject
- TransactionService transactionService;
-
SimpleObject simpleObject;
@Before
- public void setUp() throws Exception {
+ public void setUp() {
// given
- fixtureScripts.runFixtureScript(new SimpleModuleTearDown(), null);
- CreateSimpleObjects fs = new CreateSimpleObjects().setNumber(1);
- fixtureScripts.runFixtureScript(fs, null);
- transactionService.nextTransaction();
-
- simpleObject = SimpleObjectData.FOO.findWith(wrap(simpleObjectMenu));
-
- assertThat(simpleObject).isNotNull();
+ simpleObject = fixtureScripts.runBuilderScript(SimpleObject_persona.FOO.builder());
}
public static class Name extends SimpleObject_IntegTest {
@Test
- public void accessible() throws Exception {
+ public void accessible() {
// when
final String name = wrap(simpleObject).getName();
@@ -80,7 +61,7 @@ public class SimpleObject_IntegTest extends SimpleModuleIntegTestAbstract {
}
@Test
- public void not_editable() throws Exception {
+ public void not_editable() {
// expect
expectedExceptions.expect(DisabledException.class);
@@ -93,7 +74,7 @@ public class SimpleObject_IntegTest extends SimpleModuleIntegTestAbstract {
public static class UpdateName extends SimpleObject_IntegTest {
@Test
- public void can_be_updated_directly() throws Exception {
+ public void can_be_updated_directly() {
// when
wrap(simpleObject).updateName("new name");
@@ -104,7 +85,7 @@ public class SimpleObject_IntegTest extends SimpleModuleIntegTestAbstract {
}
@Test
- public void failsValidation() throws Exception {
+ public void failsValidation() {
// expect
expectedExceptions.expect(InvalidException.class);
@@ -122,7 +103,7 @@ public class SimpleObject_IntegTest extends SimpleModuleIntegTestAbstract {
TitleService titleService;
@Test
- public void interpolatesName() throws Exception {
+ public void interpolatesName() {
// given
final String name = wrap(simpleObject).getName();
@@ -138,7 +119,7 @@ public class SimpleObject_IntegTest extends SimpleModuleIntegTestAbstract {
public static class DataNucleusId extends SimpleObject_IntegTest {
@Test
- public void should_be_populated() throws Exception {
+ public void should_be_populated() {
// when
final Long id = mixin(Persistable_datanucleusIdLong.class, simpleObject).prop();
@@ -150,7 +131,7 @@ public class SimpleObject_IntegTest extends SimpleModuleIntegTestAbstract {
public static class DataNucleusVersionTimestamp extends SimpleObject_IntegTest {
@Test
- public void should_be_populated() throws Exception {
+ public void should_be_populated() {
// when
final Timestamp timestamp = mixin(Persistable_datanucleusVersionTimestamp.class, simpleObject).prop();
// then
@@ -158,5 +139,4 @@ public class SimpleObject_IntegTest extends SimpleModuleIntegTestAbstract {
}
}
-
}
\ No newline at end of file
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/specglue/SimpleObjectMenuGlue.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/specglue/SimpleObjectMenuGlue.java
index e5fd971..b217059 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/specglue/SimpleObjectMenuGlue.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/specglue/SimpleObjectMenuGlue.java
@@ -22,35 +22,31 @@ package domainapp.modules.simple.specglue;
import java.util.List;
import java.util.UUID;
-import org.apache.isis.core.specsupport.specs.CukeGlueAbstract;
+import javax.inject.Inject;
+
+import org.apache.isis.core.specsupport.specs.CukeGlueAbstract2;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.When;
import domainapp.modules.simple.dom.impl.SimpleObject;
-import domainapp.modules.simple.dom.impl.SimpleObjectMenu;
+import domainapp.modules.simple.dom.impl.SimpleObjects;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
-public class SimpleObjectMenuGlue extends CukeGlueAbstract {
+public class SimpleObjectMenuGlue extends CukeGlueAbstract2 {
@Given("^there are.* (${symbol_escape}${symbol_escape}d+) simple objects${symbol_dollar}")
public void there_are_N_simple_objects(int n) throws Throwable {
- try {
- final List<SimpleObject> list = simpleObjectMenu().listAll();
- assertThat(list.size(), is(n));
- putVar("java.util.List", "simpleObjects", list);
- } finally {
- assertMocksSatisfied();
- }
+ final List<SimpleObject> list = wrap(simpleObjects).listAll();
+ assertThat(list.size(), is(n));
}
@When("^.*create a .*simple object${symbol_dollar}")
public void create_a_simple_object() throws Throwable {
- simpleObjectMenu().create(UUID.randomUUID().toString());
+ wrap(simpleObjects).create(UUID.randomUUID().toString());
}
- private SimpleObjectMenu simpleObjectMenu() {
- return service(SimpleObjectMenu.class);
- }
+ @Inject
+ SimpleObjects simpleObjects;
}
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 afde2fc..2e0b0d2 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml
@@ -33,17 +33,13 @@
<packaging>pom</packaging>
- <prerequisites>
- <maven>3.0.4</maven>
- </prerequisites>
-
<properties>
- <isis.version>1.15.1</isis.version>
+ <isis.version>1.16.0</isis.version>
<lombok.version>1.16.18</lombok.version>
- <compiler-plugin.source>1.7</compiler-plugin.source>
- <compiler-plugin.target>1.7</compiler-plugin.target>
+ <compiler-plugin.source>1.8</compiler-plugin.source>
+ <compiler-plugin.target>1.8</compiler-plugin.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
@@ -80,7 +76,7 @@
</snapshots>
</repository>
<repository>
- <id>Cloudbees snapshots</id>
+ <id>cloudbees.estatio.snapshots</id>
<url>http://repository-estatio.forge.cloudbees.com/snapshot/</url>
<name>CloudBees Snapshots (and Interim Releases)</name>
<releases>
@@ -103,7 +99,7 @@
<pluginRepositories>
<pluginRepository>
- <id>estatio.snapshots</id>
+ <id>cloudbees.estatio.snapshots</id>
<name>CloudBees Snapshots (and Interim Releases)</name>
<releases>
<updatePolicy>never</updatePolicy>
@@ -177,7 +173,18 @@
</activation>
<build>
<directory>target-ide</directory>
- </build>
+ <plugins>
+ <!-- eclipse doesn't seem to support maven mixins config, so repeat here -->
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>${compiler-plugin.source}</source>
+ <target>${compiler-plugin.target}</target>
+ <compilerArgument />
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</profile>
</profiles>
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 344502a..220fd1e 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
@@ -148,11 +148,6 @@
<artifactId>isis-mavendeps-webapp</artifactId>
<type>pom</type>
</dependency>
- <dependency>
- <groupId>org.apache.isis.mavendeps</groupId>
- <artifactId>isis-mavendeps-intellij</artifactId>
- <type>pom</type>
- </dependency>
</dependencies>
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/isis.properties b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/isis.properties
index 2836922..2d1f756 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/isis.properties
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/isis.properties
@@ -20,33 +20,32 @@ ${symbol_pound} under the License.
-isis.appManifest=domainapp.application.manifest.DomainAppAppManifest
-
-
+${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pou [...]
${symbol_pound}
-${symbol_pound} All other properties are loaded programmatically by the AppManifest
-${symbol_pound} (they are unlikely to vary between dev/test/prod so can be "baked in")
+${symbol_pound} AppManifest specifies the modules, system components and fixtures of the app
${symbol_pound}
+${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pou [...]
+isis.appManifest=domainapp.application.manifest.DomainAppAppManifest
-${symbol_pound} the baseUrl for hrefs in the events generated by the RO EventSerializer
-isis.viewer.restfulobjects.RestfulObjectsSpecEventSerializer.baseUrl=http://localhost:8080/restful/
+${symbol_pound}
+${symbol_pound} The properties listed in this file vary between dev/test/prod.
+${symbol_pound} All remaining properties (which are static and don't vary between dev/test/prod)
+${symbol_pound} are loaded in programmatically by the AppManifest, see isis-non-changing.properties
+${symbol_pound}
${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pou [...]
${symbol_pound}
-${symbol_pound} JDBC configuration
+${symbol_pound} JDBC connection details
+${symbol_pound} (also update the pom.xml to reference the appropriate JDBC driver)
${symbol_pound}
${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pou [...]
-${symbol_pound}
-${symbol_pound} JDBC connection details
-${symbol_pound} (also update the pom.xml to reference the appropriate JDBC driver)
-${symbol_pound}
${symbol_pound}
${symbol_pound} HSQLDB in-memory
@@ -127,3 +126,5 @@ ${symbol_pound} (experimental; run with -P neo4j profile in webapp project)
${symbol_pound}
${symbol_pound}isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=neo4j:neo4j_DB
+
+
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/logging.properties b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/logging.properties
index ae3070e..c2ca289 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/logging.properties
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/logging.properties
@@ -47,11 +47,17 @@ log4j.appender.File.append=false
log4j.appender.File.layout=org.apache.log4j.PatternLayout
log4j.appender.File.layout.ConversionPattern=%d [%-20c{1} %-10t %-5p] %m%n
-log4j.appender.sql=org.apache.log4j.RollingFileAppender
-log4j.appender.sql.File=./logs/sql.log
-log4j.appender.sql.Append=false
-log4j.appender.sql.layout=org.apache.log4j.PatternLayout
-log4j.appender.sql.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} %m%n
+log4j.appender.sql-dml=org.apache.log4j.RollingFileAppender
+log4j.appender.sql-dml.File=./logs/sql-dml.log
+log4j.appender.sql-dml.Append=false
+log4j.appender.sql-dml.layout=org.apache.log4j.PatternLayout
+log4j.appender.sql-dml.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} %m%n
+
+log4j.appender.sql-ddl=org.apache.log4j.RollingFileAppender
+log4j.appender.sql-ddl.File=./logs/sql-ddl.log
+log4j.appender.sql-ddl.Append=false
+log4j.appender.sql-ddl.layout=org.apache.log4j.PatternLayout
+log4j.appender.sql-ddl.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} %m%n
log4j.appender.sqltiming=org.apache.log4j.RollingFileAppender
log4j.appender.sqltiming.File=./logs/sqltiming.log
@@ -108,10 +114,10 @@ ${symbol_pound}log4j.debug=true
${symbol_pound} DataNucleus
${symbol_pound} the first two log the DML and DDL (if set to DEBUG)
-log4j.logger.DataNucleus.Datastore.Native=DEBUG, Console, sql
-log4j.logger.DataNucleus.Datastore.Schema=DEBUG, Console, sql
-${symbol_pound}log4j.logger.DataNucleus.Datastore.Native=WARN, Console
-${symbol_pound}log4j.logger.DataNucleus.Datastore.Schema=WARN, Console
+log4j.logger.DataNucleus.Datastore.Native=DEBUG, Console, sql-dml
+log4j.logger.DataNucleus.Datastore.Schema=DEBUG, Console, sql-ddl
+${symbol_pound}log4j.logger.DataNucleus.Datastore.Native=WARN, Console, sql-dml
+${symbol_pound}log4j.logger.DataNucleus.Datastore.Schema=WARN, Console, sql-ddl
${symbol_pound} the remainder can probably be left to WARN
log4j.logger.DataNucleus.Persistence=WARN, Console
log4j.logger.DataNucleus.Transaction=WARN, Console
@@ -155,7 +161,7 @@ log4j.additivity.DataNucleus.Datastore.IDE=false
${symbol_pound} if using log4jdbc-remix as JDBC driver
-${symbol_pound}log4j.logger.jdbc.sqlonly=DEBUG, sql, Console
+${symbol_pound}log4j.logger.jdbc.sqlonly=DEBUG, sql-dml, Console
${symbol_pound}log4j.additivity.jdbc.sqlonly=false
${symbol_pound}log4j.logger.jdbc.resultsettable=DEBUG, jdbc, Console
${symbol_pound}log4j.additivity.jdbc.resultsettable=false
@@ -228,5 +234,5 @@ log4j.additivity.dom.simple.SimpleObject=false
${symbol_pound} ERROR to suppress the WARNings we get as of 1.15.0
-log4j.logger.org.apache.wicket.page.XmlPartialPageUpdate=ERROR,console
+log4j.logger.org.apache.wicket.page.XmlPartialPageUpdate=ERROR,Console
log4j.additivity.org.apache.wicket.page.XmlPartialPageUpdate=false
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/about/index.html b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/about/index.html
index 76978df..dde1ac0 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/about/index.html
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/about/index.html
@@ -61,7 +61,7 @@ ${symbol_pound}wrapper {
<p>
This app has been generated using Apache Isis'
- <a href="http://isis.apache.org/guides/ugfun.html${symbol_pound}_ugfun_getting-started_simple%61pp-archetype" target="_blank">SimpleApp</a> archetype,
+ <a href="http://isis.apache.org/guides/ugfun/ugfun.html${symbol_pound}_ugfun_getting-started_simple%61pp-archetype" target="_blank">SimpleApp</a> archetype,
to create a purposefully minimal application that nevertheless includes fixture data, integration tests and BDD specs.
<br/>
<br/>
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/swagger-ui/index.html b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/swagger-ui/index.html
index 59f8d6d..a1edaf3 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/swagger-ui/index.html
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/swagger-ui/index.html
@@ -153,9 +153,9 @@
<div class='input'><input placeholder="pass" id="input_pass" name="pass" type="password" size="10"/></div>
<select id="input_baseUrl" name="baseUrl" style="height: 26px;">
- <option id="private" label="private" value="/restful/swagger/private"></option>
- <option id="public" label="public" value="/restful/swagger/public"></option>
- <option id="prototyping" label="prototyping" value="/restful/swagger/prototyping"></option>
+ <option id="private" label="private" value="../../restful/swagger/private"></option>
+ <option id="public" label="public" value="../../restful/swagger/public"></option>
+ <option id="prototyping" label="prototyping" value="../../restful/swagger/prototyping"></option>
</select>
</div>
<div class='input' style="display:none;"><input placeholder="api_key" id="input_apiKey" name="apiKey" type="text"/></div>
diff --git a/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties b/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties
index 3baa628..4965284 100644
--- a/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties
+++ b/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties
@@ -1,4 +1,4 @@
-#Fri Sep 22 00:04:59 BST 2017
+#Thu Jan 04 18:50:01 GMT 2018
package=it.pkg
version=0.1-SNAPSHOT
groupId=archetype.it
--
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.