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 2014/09/11 15:58:19 UTC
[2/4] git commit: ISIS-887: Removing references to isis modules from
simpleapp and todoapp.
ISIS-887: Removing references to isis modules from simpleapp and todoapp.
In addition:
- removed auth*_file config files
* removed ToDoItem's schedule* actions
* removed Quartz scheduler config from todoapp
also:
* removed empty ComponentFactoryRegistrarForToDoApp
* removed empty PageClassListForToDoApp
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/0949eb1f
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/0949eb1f
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/0949eb1f
Branch: refs/heads/master
Commit: 0949eb1fbb05a6d0f585390821c8d3075cb371a0
Parents: 750bf20
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Sep 11 06:41:59 2014 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Sep 11 06:41:59 2014 +0100
----------------------------------------------------------------------
example/application/simpleapp/dom/pom.xml | 124 ++++++-------
example/application/simpleapp/fixture/pom.xml | 23 +--
.../application/simpleapp/integtests/pom.xml | 33 ++--
example/application/simpleapp/pom.xml | 60 +------
example/application/simpleapp/webapp/pom.xml | 56 ------
.../src/main/java/webapp/SimpleApplication.java | 19 +-
.../webapp/prototyping/DeveloperUtilities.java | 50 ------
.../WEB-INF/authentication_file.passwords | 28 ---
.../WEB-INF/authentication_file.properties | 25 ---
.../webapp/WEB-INF/authorization_file.allow | 28 ---
.../WEB-INF/authorization_file.properties | 47 -----
.../src/main/webapp/WEB-INF/isis.properties | 34 +---
.../webapp/src/main/webapp/WEB-INF/web.xml | 2 +-
example/application/todoapp/dom/pom.xml | 119 ++++++-------
.../dom/src/main/java/dom/todo/ToDoItem.java | 44 +----
example/application/todoapp/fixture/pom.xml | 23 +--
example/application/todoapp/integtests/pom.xml | 33 ++--
example/application/todoapp/pom.xml | 89 +---------
example/application/todoapp/webapp/pom.xml | 38 ----
.../ComponentFactoryRegistrarForToDoApp.java | 33 ----
.../java/webapp/PageClassListForToDoApp.java | 61 -------
.../src/main/java/webapp/ToDoApplication.java | 22 +--
.../src/main/java/webapp/admin/Admin.java | 173 -------------------
.../java/webapp/admin/AdminContributions.java | 107 ------------
.../webapp/prototyping/DeveloperUtilities.java | 50 ------
.../webapp/scheduler/AbstractIsisQuartzJob.java | 93 ----------
.../BackgroundCommandExecutionQuartzJob.java | 28 ---
.../webapp/scheduler/SchedulerConstants.java | 27 ---
.../webapp/scheduler/quartz-config.xml | 62 -------
.../webapp/scheduler/quartz.properties | 25 ---
.../WEB-INF/authentication_file.passwords | 28 ---
.../WEB-INF/authentication_file.properties | 25 ---
.../webapp/WEB-INF/authorization_file.allow | 28 ---
.../WEB-INF/authorization_file.properties | 47 -----
.../src/main/webapp/WEB-INF/isis.properties | 34 +---
.../webapp/src/main/webapp/WEB-INF/web.xml | 21 +--
36 files changed, 202 insertions(+), 1537 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/simpleapp/dom/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/dom/pom.xml b/example/application/simpleapp/dom/pom.xml
index ee0b9f7..86cd659 100644
--- a/example/application/simpleapp/dom/pom.xml
+++ b/example/application/simpleapp/dom/pom.xml
@@ -18,18 +18,18 @@
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/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.isis.example.application</groupId>
- <artifactId>simpleapp</artifactId>
+ <parent>
+ <groupId>org.apache.isis.example.application</groupId>
+ <artifactId>simpleapp</artifactId>
<version>1.7.0-SNAPSHOT</version>
- </parent>
+ </parent>
- <artifactId>simpleapp-dom</artifactId>
- <name>Simple App DOM</name>
+ <artifactId>simpleapp-dom</artifactId>
+ <name>Simple App DOM</name>
- <build>
+ <build>
<resources>
<resource>
<filtering>false</filtering>
@@ -46,13 +46,13 @@
</excludes>
</resource>
</resources>
- <plugins>
+ <plugins>
<plugin>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-maven-plugin</artifactId>
<version>${datanucleus-maven-plugin.version}</version>
<configuration>
- <fork>false</fork>
+ <fork>false</fork>
<log4jConfiguration>${basedir}/log4j.properties</log4jConfiguration>
<verbose>true</verbose>
<props>${basedir}/datanucleus.properties</props>
@@ -66,71 +66,55 @@
</execution>
</executions>
</plugin>
- </plugins>
- <pluginManagement>
- <plugins>
- <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>
- org.datanucleus
- </groupId>
- <artifactId>
- datanucleus-maven-plugin
- </artifactId>
- <versionRange>
- [3.2.0-release,)
- </versionRange>
- <goals>
- <goal>enhance</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore></ignore>
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>
+ org.datanucleus
+ </groupId>
+ <artifactId>
+ datanucleus-maven-plugin
+ </artifactId>
+ <versionRange>
+ [3.2.0-release,)
+ </versionRange>
+ <goals>
+ <goal>enhance</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
- <dependencies>
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-applib</artifactId>
- </dependency>
-
- <!--
- uncomment to use the AppSettings or UserSettings services
- (also uncomment corresponding dependency in webapp module)
- -->
- <!--
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-settings-applib</artifactId>
- </dependency>
+ <dependencies>
<dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-devutils-applib</artifactId>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-applib</artifactId>
</dependency>
- -->
-
- <dependency>
+ <dependency>
<groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-unittestsupport</artifactId>
+ <artifactId>isis-core-unittestsupport</artifactId>
<scope>test</scope>
- </dependency>
+ </dependency>
<!-- Bytecode libraries (for mocking) -->
<dependency>
@@ -138,6 +122,6 @@
<artifactId>objenesis</artifactId>
<scope>test</scope>
</dependency>
+ </dependencies>
- </dependencies>
</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/simpleapp/fixture/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/fixture/pom.xml b/example/application/simpleapp/fixture/pom.xml
index 697da6a..3507441 100644
--- a/example/application/simpleapp/fixture/pom.xml
+++ b/example/application/simpleapp/fixture/pom.xml
@@ -17,23 +17,24 @@
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/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.apache.isis.example.application</groupId>
+ <groupId>org.apache.isis.example.application</groupId>
<artifactId>simpleapp</artifactId>
<version>1.7.0-SNAPSHOT</version>
</parent>
- <artifactId>simpleapp-fixture</artifactId>
- <name>Simple App Fixtures</name>
+ <artifactId>simpleapp-fixture</artifactId>
+ <name>Simple App Fixtures</name>
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>simpleapp-dom</artifactId>
- </dependency>
- </dependencies>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>simpleapp-dom</artifactId>
+ </dependency>
+ </dependencies>
</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/simpleapp/integtests/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/integtests/pom.xml b/example/application/simpleapp/integtests/pom.xml
index e8cd887..d457260 100644
--- a/example/application/simpleapp/integtests/pom.xml
+++ b/example/application/simpleapp/integtests/pom.xml
@@ -17,17 +17,18 @@
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/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.apache.isis.example.application</groupId>
+ <groupId>org.apache.isis.example.application</groupId>
<artifactId>simpleapp</artifactId>
<version>1.7.0-SNAPSHOT</version>
</parent>
- <artifactId>simpleapp-integtests</artifactId>
- <name>Simple App Integration Tests</name>
+ <artifactId>simpleapp-integtests</artifactId>
+ <name>Simple App Integration Tests</name>
<build>
<testResources>
@@ -78,15 +79,15 @@
</executions>
</plugin>
-->
- </plugins>
+ </plugins>
</build>
- <dependencies>
-
- <!-- other modules in this project -->
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>simpleapp-fixture</artifactId>
- </dependency>
+ <dependencies>
+
+ <!-- other modules in this project -->
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>simpleapp-fixture</artifactId>
+ </dependency>
<dependency>
<groupId>org.apache.isis.core</groupId>
@@ -101,7 +102,7 @@
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-specsupport</artifactId>
</dependency>
-
+
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
@@ -141,7 +142,7 @@
<version>0.0.4</version>
</dependency>
-->
- </dependencies>
+ </dependencies>
<!--
uncomment for enhanced cucumber-jvm reporting
@@ -153,6 +154,6 @@
</repository>
</repositories>
-->
-
+
</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/simpleapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/pom.xml b/example/application/simpleapp/pom.xml
index 0abfae7..815ef4a 100644
--- a/example/application/simpleapp/pom.xml
+++ b/example/application/simpleapp/pom.xml
@@ -37,13 +37,6 @@
<isis.version>1.7.0-SNAPSHOT</isis.version>
<isis-viewer-wicket.version>1.7.0-SNAPSHOT</isis-viewer-wicket.version>
- <isis-module-audit.version>1.6.0</isis-module-audit.version>
- <isis-module-command.version>1.6.0</isis-module-command.version>
- <isis-module-devutils.version>1.6.0</isis-module-devutils.version>
- <isis-module-publishing.version>1.6.0</isis-module-publishing.version>
- <isis-module-publishingeventserializer.version>1.6.0</isis-module-publishingeventserializer.version>
- <isis-module-settings.version>1.6.0</isis-module-settings.version>
-
<!-- must be consistent with the versions defined by the JDO Objectstore -->
<datanucleus-accessplatform-jdo-rdbms.version>3.3.6</datanucleus-accessplatform-jdo-rdbms.version>
<datanucleus-maven-plugin.version>3.3.2</datanucleus-maven-plugin.version>
@@ -96,6 +89,7 @@
<configuration>
<includes>
<include>**/*Test.java</include>
+ <include>**/*Test$*.java</include>
<include>**/*Test_*.java</include>
<include>**/*Spec*.java</include>
</includes>
@@ -117,6 +111,7 @@
<configuration>
<includes>
<include>**/*Test.java</include>
+ <include>**/*Test$*.java</include>
<include>**/*Test_*.java</include>
<include>**/*Spec*.java</include>
</includes>
@@ -347,57 +342,6 @@
<version>${project.version}</version>
</dependency>
- <!-- modules -->
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-audit-jdo</artifactId>
- <version>${isis-module-audit.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-command-jdo</artifactId>
- <version>${isis-module-command.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-devutils</artifactId>
- <version>${isis-module-devutils.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-devutils-applib</artifactId>
- <version>${isis-module-devutils.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-devutils-impl</artifactId>
- <version>${isis-module-devutils.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-publishing-jdo</artifactId>
- <version>${isis-module-publishing.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-publishingeventserializer-ro</artifactId>
- <version>${isis-module-publishingeventserializer.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-settings</artifactId>
- <version>${isis-module-settings.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-settings-applib</artifactId>
- <version>${isis-module-settings.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-settings-impl-jdo</artifactId>
- <version>${isis-module-settings.version}</version>
- </dependency>
</dependencies>
</dependencyManagement>
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/simpleapp/webapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/pom.xml b/example/application/simpleapp/webapp/pom.xml
index bb9e7e0..f5cbbd3 100644
--- a/example/application/simpleapp/webapp/pom.xml
+++ b/example/application/simpleapp/webapp/pom.xml
@@ -198,62 +198,6 @@
</dependency>
- <!-- isis modules -->
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-devutils-impl</artifactId>
- </dependency>
-
- <!--
- uncomment to enable auditing (@Audited),
- persisted to database
- -->
- <!--
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-audit-jdo</artifactId>
- </dependency>
- -->
-
- <!--
- uncomment to enable commands (@Command annotation)
- persisted to database, also enabling the ability to run commands in the background
- (eg using the Quartz scheduler)
- -->
- <!--
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-command-jdo</artifactId>
- </dependency>
- -->
-
- <!--
- uncomment to enable publishing (@PublishedObject, @PublishedAction annotations)
- persisted to database, and using the Restful Objects (JSON) serialization of the event.
- -->
- <!--
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-publishing-jdo</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-publishingeventserializer-ro</artifactId>
- </dependency>
- -->
-
- <!--
- uncomment to use the AppSettings or UserSettings services
- (see also declaration of its applib in dom module)
- -->
- <!--
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-settings-impl-jdo</artifactId>
- </dependency>
- -->
-
-
<!-- to run using WebServer (optional) -->
<dependency>
<groupId>org.apache.isis.core</groupId>
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/simpleapp/webapp/src/main/java/webapp/SimpleApplication.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/java/webapp/SimpleApplication.java b/example/application/simpleapp/webapp/src/main/java/webapp/SimpleApplication.java
index 231e263..8bf985d 100644
--- a/example/application/simpleapp/webapp/src/main/java/webapp/SimpleApplication.java
+++ b/example/application/simpleapp/webapp/src/main/java/webapp/SimpleApplication.java
@@ -22,9 +22,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.util.List;
-
import javax.servlet.http.HttpServletRequest;
-
import com.google.common.base.Joiner;
import com.google.common.io.Resources;
import com.google.inject.AbstractModule;
@@ -32,17 +30,12 @@ import com.google.inject.Module;
import com.google.inject.name.Names;
import com.google.inject.util.Modules;
import com.google.inject.util.Providers;
-
import org.apache.wicket.Session;
import org.apache.wicket.request.Request;
import org.apache.wicket.request.Response;
import org.apache.wicket.request.http.WebRequest;
-
-import org.apache.isis.viewer.wicket.ui.app.registry.ComponentFactoryRegistrar;
-import org.apache.isis.viewer.wicket.ui.pages.PageClassList;
import org.apache.isis.viewer.wicket.viewer.IsisWicketApplication;
import org.apache.isis.viewer.wicket.viewer.integration.wicket.AuthenticatedWebSessionForIsis;
-import org.apache.isis.viewer.wicket.viewer.registries.pages.PageClassListDefault;
/**
@@ -112,28 +105,28 @@ public class SimpleApplication extends IsisWicketApplication {
protected Module newIsisWicketModule() {
final Module isisDefaults = super.newIsisWicketModule();
- final Module simpleOverrides = new AbstractModule() {
+ final Module overrides = new AbstractModule() {
@Override
protected void configure() {
bind(String.class).annotatedWith(Names.named("applicationName")).toInstance("Simple App");
bind(String.class).annotatedWith(Names.named("applicationCss")).toInstance("css/application.css");
bind(String.class).annotatedWith(Names.named("applicationJs")).toInstance("scripts/application.js");
- bind(String.class).annotatedWith(Names.named("welcomeMessage")).toInstance(readLines("welcome.html"));
+ bind(String.class).annotatedWith(Names.named("welcomeMessage")).toInstance(readLines(getClass(), "welcome.html"));
bind(String.class).annotatedWith(Names.named("aboutMessage")).toInstance("Simple App");
bind(InputStream.class).annotatedWith(Names.named("metaInfManifest")).toProvider(Providers.of(getServletContext().getResourceAsStream("/META-INF/MANIFEST.MF")));
}
};
- return Modules.override(isisDefaults).with(simpleOverrides);
+ return Modules.override(isisDefaults).with(overrides);
}
- private static String readLines(final String resourceName) {
+ private static String readLines(final Class<?> contextClass, final String resourceName) {
try {
- List<String> readLines = Resources.readLines(Resources.getResource(SimpleApplication.class, resourceName), Charset.defaultCharset());
+ List<String> readLines = Resources.readLines(Resources.getResource(contextClass, resourceName), Charset.defaultCharset());
final String aboutText = Joiner.on("\n").join(readLines);
return aboutText;
} catch (IOException e) {
- return "This is Quick Start";
+ return "This is a simple app";
}
}
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/simpleapp/webapp/src/main/java/webapp/prototyping/DeveloperUtilities.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/java/webapp/prototyping/DeveloperUtilities.java b/example/application/simpleapp/webapp/src/main/java/webapp/prototyping/DeveloperUtilities.java
deleted file mode 100644
index 91fe342..0000000
--- a/example/application/simpleapp/webapp/src/main/java/webapp/prototyping/DeveloperUtilities.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package webapp.prototyping;
-
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.value.Blob;
-import org.apache.isis.applib.value.Clob;
-import org.apache.isis.core.metamodel.services.devutils.DeveloperUtilitiesServiceDefault;
-
-/**
- * These overrides are simply to 'move' the action underneath the
- * {@link fixture.simple.SimpleObjectsFixturesService prototyping} menu.
- */
-@DomainService(menuOrder = "20")
-public class DeveloperUtilities extends DeveloperUtilitiesServiceDefault {
-
- @MemberOrder(name="Prototyping", sequence="90")
- @Override
- public Clob downloadMetaModel() {
- return super.downloadMetaModel();
- }
-
- @MemberOrder(name="Prototyping", sequence="92")
- @Override
- public Blob downloadLayouts() {
- return super.downloadLayouts();
- }
-
- @MemberOrder(name="Prototyping", sequence="94")
- @Override
- public void refreshServices() {
- super.refreshServices();
- }
-}
-
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/authentication_file.passwords
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/authentication_file.passwords b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/authentication_file.passwords
deleted file mode 100644
index 9a568b0..0000000
--- a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/authentication_file.passwords
+++ /dev/null
@@ -1,28 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-
-#
-# configuration file for the file-based authentication
-# not used by the onlinedemo
-#
-
-# list of users, and their password, and optionally roles
-sven:pass:org.apache.isis.viewer.wicket.roles.USER
-dick:pass:org.apache.isis.viewer.wicket.roles.USER
-bob:pass:org.apache.isis.viewer.wicket.roles.USER
-joe:pass:org.apache.isis.viewer.wicket.roles.USER
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/authentication_file.properties
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/authentication_file.properties b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/authentication_file.properties
deleted file mode 100644
index 62b9dae..0000000
--- a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/authentication_file.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-#
-# configuration file for the File-based authentication mechanism
-#
-
-
-#
-# (intentionally empty)
-#
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/authorization_file.allow
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/authorization_file.allow b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/authorization_file.allow
deleted file mode 100644
index 4407ec2..0000000
--- a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/authorization_file.allow
+++ /dev/null
@@ -1,28 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-
-#
-# configuration file for the file-based authorization
-#
-
-
-#
-# (intentionally empty)
-#
-
-
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/authorization_file.properties
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/authorization_file.properties b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/authorization_file.properties
deleted file mode 100644
index f44bb6c..0000000
--- a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/authorization_file.properties
+++ /dev/null
@@ -1,47 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-#
-# configuration file for the File-based authorization mechanism
-#
-
-
-#
-# the whitelist file
-# (value shown below is the default)
-#
-
-#isis.authorization.file.whitelist=authorization_file.allow
-
-
-
-#
-# the blacklist file
-# (there is no default value; provide a filename)
-#
-
-#isis.authorization.file.blacklist=
-
-
-
-#
-# switch on "learning mode". In this mode the authorization mechanism
-# will grant all requests, and log those requests into the allow file.
-#
-
-#isis.authorization.learn=true
-
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/isis.properties
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/isis.properties b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/isis.properties
index 2b05518..0cc949f 100644
--- a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/isis.properties
+++ b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/isis.properties
@@ -50,39 +50,25 @@ isis.persistor=datanucleus
-
#
# configure authentication mechanism to use (to logon to the system)
-# note:
-# - authentication is disabled if running in exploration mode
-# - the Scimpi viewer allows access to anonymous users
-#
+#
-# default is file in SERVER mode, none in SERVER_EXPLORATION. Derived from wicket mode
#isis.authentication=bypass
isis.authentication=shiro
+
#
# configure authorization mechanism to use
#
-# The authorization mechanism define each users' permissions to view/edit object properties
-# or collections, and to view/invoke object actions
-#
-# configuring this component automatically refines the metamodel (installing a facet factory
-# which vetoes access as required)
-#
-# default is file in SERVER mode, none in SERVER_EXPLORATION. Derived from wicket mode
-#isis.authorization=file
+#isis.authorization=bypass
isis.authorization=shiro
#
# configure the user profile store to use.
#
-# the user profile store is supported by some viewers (though not the Wicket or
-# Restful viewers) as a way to store user-specific settings (eg colours, themes etc)
-#
isis.user-profile-store=in-memory
@@ -166,20 +152,6 @@ isis.services = \
# customizable exception handling, \
org.apache.isis.objectstore.jdo.applib.service.exceprecog.ExceptionRecognizerCompositeForJdoObjectStore,\
\
- # isis-module-command-jdo services, \
- # org.apache.isis.objectstore.jdo.applib.service.command.CommandServiceJdoContributions,\
- # org.apache.isis.objectstore.jdo.applib.service.background.BackgroundCommandServiceJdoContributions,\
- \
- # isis-module-audit-jdo services, \
- # org.apache.isis.objectstore.jdo.applib.service.audit.AuditingServiceJdoContributions,\
- \
- # isis-module-publishing-jdo services, \
- # org.apache.isis.objectstore.jdo.applib.service.publish.PublishingServiceJdoContributions,\
- \
- # JDO implementation of the two SettingsServices, \
- # org.apache.isis.objectstore.jdo.applib.service.settings.ApplicationSettingsServiceJdo,\
- # org.apache.isis.objectstore.jdo.applib.service.settings.UserSettingsServiceJdo,\
- #
# Specify the (optional) test fixtures
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/web.xml b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/web.xml
index 137728e..b169b00 100644
--- a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/web.xml
+++ b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/web.xml
@@ -21,7 +21,7 @@
xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
- <display-name>Quickstart Wicket/RestfulObjects app</display-name>
+ <display-name>Simple app</display-name>
<welcome-file-list>
<welcome-file>about/index.html</welcome-file>
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/todoapp/dom/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/todoapp/dom/pom.xml b/example/application/todoapp/dom/pom.xml
index 2837f99..8e68ba9 100644
--- a/example/application/todoapp/dom/pom.xml
+++ b/example/application/todoapp/dom/pom.xml
@@ -18,18 +18,18 @@
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/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.isis.example.application</groupId>
- <artifactId>todoapp</artifactId>
+ <parent>
+ <groupId>org.apache.isis.example.application</groupId>
+ <artifactId>todoapp</artifactId>
<version>1.7.0-SNAPSHOT</version>
- </parent>
+ </parent>
- <artifactId>todoapp-dom</artifactId>
- <name>ToDo App DOM</name>
+ <artifactId>todoapp-dom</artifactId>
+ <name>ToDo App DOM</name>
- <build>
+ <build>
<resources>
<resource>
<filtering>false</filtering>
@@ -46,13 +46,13 @@
</excludes>
</resource>
</resources>
- <plugins>
+ <plugins>
<plugin>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-maven-plugin</artifactId>
<version>${datanucleus-maven-plugin.version}</version>
<configuration>
- <fork>false</fork>
+ <fork>false</fork>
<log4jConfiguration>${basedir}/log4j.properties</log4jConfiguration>
<verbose>true</verbose>
<props>${basedir}/datanucleus.properties</props>
@@ -66,64 +66,55 @@
</execution>
</executions>
</plugin>
- </plugins>
- <pluginManagement>
- <plugins>
- <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>
- org.datanucleus
- </groupId>
- <artifactId>
- datanucleus-maven-plugin
- </artifactId>
- <versionRange>
- [3.2.0-release,)
- </versionRange>
- <goals>
- <goal>enhance</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore></ignore>
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>
+ org.datanucleus
+ </groupId>
+ <artifactId>
+ datanucleus-maven-plugin
+ </artifactId>
+ <versionRange>
+ [3.2.0-release,)
+ </versionRange>
+ <goals>
+ <goal>enhance</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
- <dependencies>
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-applib</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-settings-applib</artifactId>
- </dependency>
+ <dependencies>
<dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-devutils-applib</artifactId>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-applib</artifactId>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-unittestsupport</artifactId>
+ <artifactId>isis-core-unittestsupport</artifactId>
<scope>test</scope>
- </dependency>
+ </dependency>
<!-- Bytecode libraries (for mocking) -->
<dependency>
@@ -131,6 +122,6 @@
<artifactId>objenesis</artifactId>
<scope>test</scope>
</dependency>
- </dependencies>
-
+ </dependencies>
+
</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/todoapp/dom/src/main/java/dom/todo/ToDoItem.java
----------------------------------------------------------------------
diff --git a/example/application/todoapp/dom/src/main/java/dom/todo/ToDoItem.java b/example/application/todoapp/dom/src/main/java/dom/todo/ToDoItem.java
index 6c67da3..dd8f19c 100644
--- a/example/application/todoapp/dom/src/main/java/dom/todo/ToDoItem.java
+++ b/example/application/todoapp/dom/src/main/java/dom/todo/ToDoItem.java
@@ -37,11 +37,6 @@ import org.apache.isis.applib.annotation.*;
import org.apache.isis.applib.annotation.ActionSemantics.Of;
import org.apache.isis.applib.annotation.Bulk.AppliesTo;
import org.apache.isis.applib.annotation.Bulk.InteractionContext.InvokedAs;
-import org.apache.isis.applib.annotation.Command.ExecuteIn;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.services.background.BackgroundService;
-import org.apache.isis.applib.services.clock.ClockService;
-import org.apache.isis.applib.services.command.CommandContext;
import org.apache.isis.applib.services.eventbus.ActionInteractionEvent;
import org.apache.isis.applib.services.eventbus.EventBusService;
import org.apache.isis.applib.services.scratchpad.Scratchpad;
@@ -614,24 +609,6 @@ public class ToDoItem implements Categorized, Comparable<ToDoItem> {
}
//endregion
- //region > scheduleExplicitly (action), scheduleImplicitly (background action)
- @ActionSemantics(Of.IDEMPOTENT)
- @Prototype
- public ToDoItem scheduleExplicitly() {
- backgroundService.execute(this).completeSlowly(2000);
- container.informUser("Task '" + getDescription() + "' scheduled for completion");
- return this;
- }
-
- @ActionSemantics(Of.IDEMPOTENT)
- @Command(executeIn=ExecuteIn.BACKGROUND)
- @Prototype
- public ToDoItem scheduleImplicitly() {
- completeSlowly(3000);
- return this;
- }
- //endregion
-
//region > openSourceCodeOnGithub (action)
@Prototype
@ActionSemantics(Of.SAFE)
@@ -792,15 +769,15 @@ public class ToDoItem implements Categorized, Comparable<ToDoItem> {
};
}
- public static Predicate<ToDoItem> thoseCompleted(
- final boolean completed) {
+ public static Predicate<ToDoItem> thoseCompleted(
+ final boolean completed) {
return new Predicate<ToDoItem>() {
@Override
public boolean apply(final ToDoItem t) {
return Objects.equal(t.isComplete(), completed);
}
};
- }
+ }
public static Predicate<ToDoItem> thoseWithSimilarDescription(final String description) {
return new Predicate<ToDoItem>() {
@@ -859,7 +836,6 @@ public class ToDoItem implements Categorized, Comparable<ToDoItem> {
//endregion
//region > toString, compareTo
- // ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@Override
public String toString() {
return ObjectContracts.toString(this, "description,complete,dueBy,ownedBy");
@@ -872,33 +848,20 @@ public class ToDoItem implements Categorized, Comparable<ToDoItem> {
public int compareTo(final ToDoItem other) {
return ObjectContracts.compare(this, other, "complete,dueBy,description");
}
- // ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//endregion
//region > injected services
- // ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@javax.inject.Inject
private DomainObjectContainer container;
@javax.inject.Inject
private ToDoItems toDoItems;
- @javax.inject.Inject
- @SuppressWarnings("unused")
- private ClockService clockService;
-
Bulk.InteractionContext bulkInteractionContext;
public void injectBulkInteractionContext(Bulk.InteractionContext bulkInteractionContext) {
this.bulkInteractionContext = bulkInteractionContext;
}
- @SuppressWarnings("unused")
- @javax.inject.Inject
- private CommandContext commandContext;
-
- @javax.inject.Inject
- private BackgroundService backgroundService;
-
@javax.inject.Inject
private Scratchpad scratchpad;
@@ -910,7 +873,6 @@ public class ToDoItem implements Categorized, Comparable<ToDoItem> {
@javax.inject.Inject
private WrapperFactory wrapperFactory;
- // ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//endregion
}
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/todoapp/fixture/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/todoapp/fixture/pom.xml b/example/application/todoapp/fixture/pom.xml
index 96fe6dc..b33e5ef 100644
--- a/example/application/todoapp/fixture/pom.xml
+++ b/example/application/todoapp/fixture/pom.xml
@@ -17,23 +17,24 @@
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/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.apache.isis.example.application</groupId>
+ <groupId>org.apache.isis.example.application</groupId>
<artifactId>todoapp</artifactId>
<version>1.7.0-SNAPSHOT</version>
</parent>
- <artifactId>todoapp-fixture</artifactId>
- <name>ToDo App Fixtures</name>
+ <artifactId>todoapp-fixture</artifactId>
+ <name>ToDo App Fixtures</name>
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>todoapp-dom</artifactId>
- </dependency>
- </dependencies>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>todoapp-dom</artifactId>
+ </dependency>
+ </dependencies>
</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/todoapp/integtests/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/todoapp/integtests/pom.xml b/example/application/todoapp/integtests/pom.xml
index 1b6ff93..05021fb 100644
--- a/example/application/todoapp/integtests/pom.xml
+++ b/example/application/todoapp/integtests/pom.xml
@@ -17,17 +17,18 @@
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/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.apache.isis.example.application</groupId>
+ <groupId>org.apache.isis.example.application</groupId>
<artifactId>todoapp</artifactId>
<version>1.7.0-SNAPSHOT</version>
</parent>
- <artifactId>todoapp-integtests</artifactId>
- <name>ToDo App Integration Tests</name>
+ <artifactId>todoapp-integtests</artifactId>
+ <name>ToDo App Integration Tests</name>
<build>
<testResources>
@@ -78,15 +79,15 @@
</executions>
</plugin>
-->
- </plugins>
+ </plugins>
</build>
- <dependencies>
-
- <!-- other modules in this project -->
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>todoapp-fixture</artifactId>
- </dependency>
+ <dependencies>
+
+ <!-- other modules in this project -->
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>todoapp-fixture</artifactId>
+ </dependency>
<dependency>
<groupId>org.apache.isis.core</groupId>
@@ -101,7 +102,7 @@
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-specsupport</artifactId>
</dependency>
-
+
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
@@ -141,7 +142,7 @@
<version>0.0.4</version>
</dependency>
-->
- </dependencies>
+ </dependencies>
<!--
uncomment for enhanced cucumber-jvm reporting
@@ -153,6 +154,6 @@
</repository>
</repositories>
-->
-
+
</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/todoapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/todoapp/pom.xml b/example/application/todoapp/pom.xml
index 484bc89..9aff1f8 100644
--- a/example/application/todoapp/pom.xml
+++ b/example/application/todoapp/pom.xml
@@ -35,21 +35,12 @@
<properties>
<isis.version>1.7.0-SNAPSHOT</isis.version>
- <isis-viewer-wicket.version>1.7.0-SNAPSHOT</isis-viewer-wicket.version>
-
- <isis-module-audit.version>1.6.0</isis-module-audit.version>
- <isis-module-command.version>1.6.0</isis-module-command.version>
- <isis-module-devutils.version>1.6.0</isis-module-devutils.version>
- <isis-module-publishing.version>1.6.0</isis-module-publishing.version>
- <isis-module-publishingeventserializer.version>1.6.0</isis-module-publishingeventserializer.version>
- <isis-module-settings.version>1.6.0</isis-module-settings.version>
+ <isis-viewer-wicket.version>1.7.0-SNAPSHOT</isis-viewer-wicket.version>
<!-- must be consistent with the versions defined by the JDO Objectstore -->
<datanucleus-accessplatform-jdo-rdbms.version>3.3.6</datanucleus-accessplatform-jdo-rdbms.version>
<datanucleus-maven-plugin.version>3.3.2</datanucleus-maven-plugin.version>
-
- <quartz-scheduler.version>2.2.1</quartz-scheduler.version>
-
+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
@@ -97,9 +88,14 @@
<version>2.16</version>
<configuration>
<includes>
- <include>**/*.java</include>
+ <include>**/*Test.java</include>
+ <include>**/*Test$*.java</include>
+ <include>**/*Test_*.java</include>
+ <include>**/*Spec*.java</include>
</includes>
<excludes>
+ <exclude>**/Test*.java</exclude>
+ <exclude>**/*ForTesting.java</exclude>
<exclude>**/*Abstract*.java</exclude>
</excludes>
<useFile>true</useFile>
@@ -115,6 +111,7 @@
<configuration>
<includes>
<include>**/*Test.java</include>
+ <include>**/*Test$*.java</include>
<include>**/*Test_*.java</include>
<include>**/*Spec*.java</include>
</includes>
@@ -346,74 +343,6 @@
</dependency>
- <!-- modules -->
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-audit-jdo</artifactId>
- <version>${isis-module-audit.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-command-jdo</artifactId>
- <version>${isis-module-command.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-devutils</artifactId>
- <version>${isis-module-devutils.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-devutils-applib</artifactId>
- <version>${isis-module-devutils.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-devutils-impl</artifactId>
- <version>${isis-module-devutils.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-publishing-jdo</artifactId>
- <version>${isis-module-publishing.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-publishingeventserializer-ro</artifactId>
- <version>${isis-module-publishingeventserializer.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-settings</artifactId>
- <version>${isis-module-settings.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-settings-applib</artifactId>
- <version>${isis-module-settings.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-settings-impl-jdo</artifactId>
- <version>${isis-module-settings.version}</version>
- </dependency>
-
-
-
-
- <!-- quartz scheduler integration -->
-
- <dependency>
- <groupId>org.quartz-scheduler</groupId>
- <artifactId>quartz</artifactId>
- <version>${quartz-scheduler.version}</version>
- </dependency>
- <dependency>
- <groupId>org.quartz-scheduler</groupId>
- <artifactId>quartz-jobs</artifactId>
- <version>${quartz-scheduler.version}</version>
- </dependency>
-
</dependencies>
</dependencyManagement>
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/todoapp/webapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/todoapp/webapp/pom.xml b/example/application/todoapp/webapp/pom.xml
index 58146ca..dba37d0 100644
--- a/example/application/todoapp/webapp/pom.xml
+++ b/example/application/todoapp/webapp/pom.xml
@@ -198,33 +198,6 @@
</dependency>
- <!-- isis modules -->
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-devutils-impl</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-audit-jdo</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-command-jdo</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-publishing-jdo</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-publishingeventserializer-ro</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.module</groupId>
- <artifactId>isis-module-settings-impl-jdo</artifactId>
- </dependency>
-
-
<!-- to run using WebServer (optional) -->
<dependency>
<groupId>org.apache.isis.core</groupId>
@@ -287,17 +260,6 @@
</exclusions>
</dependency>
-
- <!-- quartz scheduler integration -->
- <dependency>
- <groupId>org.quartz-scheduler</groupId>
- <artifactId>quartz</artifactId>
- </dependency>
- <dependency>
- <groupId>org.quartz-scheduler</groupId>
- <artifactId>quartz-jobs</artifactId>
- </dependency>
-
</dependencies>
<profiles>
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/todoapp/webapp/src/main/java/webapp/ComponentFactoryRegistrarForToDoApp.java
----------------------------------------------------------------------
diff --git a/example/application/todoapp/webapp/src/main/java/webapp/ComponentFactoryRegistrarForToDoApp.java b/example/application/todoapp/webapp/src/main/java/webapp/ComponentFactoryRegistrarForToDoApp.java
deleted file mode 100644
index 7da8aee..0000000
--- a/example/application/todoapp/webapp/src/main/java/webapp/ComponentFactoryRegistrarForToDoApp.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package webapp;
-
-import com.google.inject.Singleton;
-
-import org.apache.isis.viewer.wicket.viewer.registries.components.ComponentFactoryRegistrarDefault;
-
-@Singleton
-public class ComponentFactoryRegistrarForToDoApp extends ComponentFactoryRegistrarDefault {
-
- @Override
- public void addComponentFactories(ComponentFactoryList componentFactories) {
- super.addComponentFactories(componentFactories);
- // currently no replacements
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/todoapp/webapp/src/main/java/webapp/PageClassListForToDoApp.java
----------------------------------------------------------------------
diff --git a/example/application/todoapp/webapp/src/main/java/webapp/PageClassListForToDoApp.java b/example/application/todoapp/webapp/src/main/java/webapp/PageClassListForToDoApp.java
deleted file mode 100644
index 3290878..0000000
--- a/example/application/todoapp/webapp/src/main/java/webapp/PageClassListForToDoApp.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package webapp;
-
-import org.apache.wicket.Page;
-
-import org.apache.isis.viewer.wicket.ui.ComponentFactory;
-import org.apache.isis.viewer.wicket.viewer.registries.pages.PageClassListDefault;
-
-public class PageClassListForToDoApp extends PageClassListDefault {
-
- @Override
- protected Class<? extends Page> getSignInPageClass() {
- // no override
- return super.getSignInPageClass();
- }
-
- @Override
- protected Class<? extends Page> getHomePageClass() {
- // no override
- return super.getHomePageClass();
- }
-
- @Override
- protected Class<? extends Page> getAboutPageClass() {
- // no override
- return super.getAboutPageClass();
- }
-
- /**
- * More typically, override using custom {@link ComponentFactory}s.
- */
- @Override
- protected Class<? extends Page> getEntityPageClass() {
- // no override
- return super.getEntityPageClass();
- }
-
- /**
- * More typically, override using custom {@link ComponentFactory}s.
- */
- @Override
- protected Class<? extends Page> getActionPromptPageClass() {
- // no override
- return super.getActionPromptPageClass();
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/todoapp/webapp/src/main/java/webapp/ToDoApplication.java
----------------------------------------------------------------------
diff --git a/example/application/todoapp/webapp/src/main/java/webapp/ToDoApplication.java b/example/application/todoapp/webapp/src/main/java/webapp/ToDoApplication.java
index 01bbbb7..12c17f8 100644
--- a/example/application/todoapp/webapp/src/main/java/webapp/ToDoApplication.java
+++ b/example/application/todoapp/webapp/src/main/java/webapp/ToDoApplication.java
@@ -22,9 +22,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.util.List;
-
import javax.servlet.http.HttpServletRequest;
-
import com.google.common.base.Joiner;
import com.google.common.io.Resources;
import com.google.inject.AbstractModule;
@@ -32,14 +30,10 @@ import com.google.inject.Module;
import com.google.inject.name.Names;
import com.google.inject.util.Modules;
import com.google.inject.util.Providers;
-
import org.apache.wicket.Session;
import org.apache.wicket.request.Request;
import org.apache.wicket.request.Response;
import org.apache.wicket.request.http.WebRequest;
-
-import org.apache.isis.viewer.wicket.ui.app.registry.ComponentFactoryRegistrar;
-import org.apache.isis.viewer.wicket.ui.pages.PageClassList;
import org.apache.isis.viewer.wicket.viewer.IsisWicketApplication;
import org.apache.isis.viewer.wicket.viewer.integration.wicket.AuthenticatedWebSessionForIsis;
@@ -111,31 +105,29 @@ public class ToDoApplication extends IsisWicketApplication {
protected Module newIsisWicketModule() {
final Module isisDefaults = super.newIsisWicketModule();
- final Module quickstartOverrides = new AbstractModule() {
+ final Module overrides = new AbstractModule() {
@Override
protected void configure() {
- bind(ComponentFactoryRegistrar.class).to(ComponentFactoryRegistrarForToDoApp.class);
- bind(PageClassList.class).to(PageClassListForToDoApp.class);
-
+
bind(String.class).annotatedWith(Names.named("applicationName")).toInstance("ToDo App");
bind(String.class).annotatedWith(Names.named("applicationCss")).toInstance("css/application.css");
bind(String.class).annotatedWith(Names.named("applicationJs")).toInstance("scripts/application.js");
- bind(String.class).annotatedWith(Names.named("welcomeMessage")).toInstance(readLines("welcome.html"));
+ bind(String.class).annotatedWith(Names.named("welcomeMessage")).toInstance(readLines(getClass(), "welcome.html"));
bind(String.class).annotatedWith(Names.named("aboutMessage")).toInstance("ToDo App");
bind(InputStream.class).annotatedWith(Names.named("metaInfManifest")).toProvider(Providers.of(getServletContext().getResourceAsStream("/META-INF/MANIFEST.MF")));
}
};
- return Modules.override(isisDefaults).with(quickstartOverrides);
+ return Modules.override(isisDefaults).with(overrides);
}
- private static String readLines(final String resourceName) {
+ private static String readLines(final Class<?> contextClass, final String resourceName) {
try {
- List<String> readLines = Resources.readLines(Resources.getResource(ToDoApplication.class, resourceName), Charset.defaultCharset());
+ List<String> readLines = Resources.readLines(Resources.getResource(contextClass, resourceName), Charset.defaultCharset());
final String aboutText = Joiner.on("\n").join(readLines);
return aboutText;
} catch (IOException e) {
- return "This is Quick Start";
+ return "This is a Todo app";
}
}
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/todoapp/webapp/src/main/java/webapp/admin/Admin.java
----------------------------------------------------------------------
diff --git a/example/application/todoapp/webapp/src/main/java/webapp/admin/Admin.java b/example/application/todoapp/webapp/src/main/java/webapp/admin/Admin.java
deleted file mode 100644
index f188b7b..0000000
--- a/example/application/todoapp/webapp/src/main/java/webapp/admin/Admin.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package webapp.admin;
-
-import java.util.List;
-import java.util.UUID;
-import org.joda.time.LocalDate;
-import org.apache.isis.applib.AbstractService;
-import org.apache.isis.applib.annotation.*;
-import org.apache.isis.applib.annotation.ActionSemantics.Of;
-import org.apache.isis.applib.services.clock.ClockService;
-import org.apache.isis.objectstore.jdo.applib.service.audit.AuditEntryJdo;
-import org.apache.isis.objectstore.jdo.applib.service.audit.AuditingServiceJdoRepository;
-import org.apache.isis.objectstore.jdo.applib.service.command.CommandJdo;
-import org.apache.isis.objectstore.jdo.applib.service.command.CommandServiceJdoRepository;
-import org.apache.isis.objectstore.jdo.applib.service.publish.PublishedEventJdo;
-import org.apache.isis.objectstore.jdo.applib.service.publish.PublishingServiceJdoRepository;
-
-@DomainService(menuOrder = "35")
-public class Admin extends AbstractService {
-
-
- @ActionSemantics(Of.SAFE)
- @Bookmarkable
- @MemberOrder(sequence="10.1")
- public List<CommandJdo> commandsCurrentlyRunning() {
- return commandServiceRepository.findCurrent();
- }
- public boolean hideCommandsCurrentlyRunning() {
- return commandServiceRepository == null;
- }
-
- // //////////////////////////////////////
-
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence="10.2")
- public List<CommandJdo> commandsPreviouslyRan() {
- return commandServiceRepository.findCompleted();
- }
- public boolean hideCommandsPreviouslyRan() {
- return commandServiceRepository == null;
- }
-
- // //////////////////////////////////////
-
- @MemberOrder(sequence="10.3")
- @ActionSemantics(Of.SAFE)
- public CommandJdo lookupCommand(
- final @Named("Transaction Id") UUID transactionId) {
- return commandServiceRepository.findByTransactionId(transactionId);
- }
- public boolean hideLookupCommand() {
- return commandServiceRepository == null;
- }
-
- // //////////////////////////////////////
-
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence="10.4")
- public List<CommandJdo> findCommands(
- final @Optional @Named("From") LocalDate from,
- final @Optional @Named("To") LocalDate to) {
- return commandServiceRepository.findByFromAndTo(from, to);
- }
- public boolean hideFindCommands() {
- return commandServiceRepository == null;
- }
- public LocalDate default0FindCommands() {
- return clockService.now().minusDays(7);
- }
- public LocalDate default1FindCommands() {
- return clockService.now();
- }
-
-
- // //////////////////////////////////////
-
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence="20.1")
- public List<AuditEntryJdo> findAuditEntries(
- final @Optional @Named("From") LocalDate from,
- final @Optional @Named("To") LocalDate to) {
- return auditingServiceRepository.findByFromAndTo(from, to);
- }
- public boolean hideFindAuditEntries() {
- return auditingServiceRepository == null;
- }
- public LocalDate default0FindAuditEntries() {
- return clockService.now().minusDays(7);
- }
- public LocalDate default1FindAuditEntries() {
- return clockService.now();
- }
-
- // //////////////////////////////////////
-
-
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence="30.1")
- public List<PublishedEventJdo> allQueuedEvents() {
- return publishingServiceRepository.findQueued();
- }
- public boolean hideAllQueuedEvents() {
- return publishingServiceRepository == null;
- }
-
- @ActionSemantics(Of.SAFE)
- @Prototype
- @MemberOrder(sequence="30.2")
- public List<PublishedEventJdo> allProcessedEvents() {
- return publishingServiceRepository.findProcessed();
- }
- public boolean hideAllProcessedEvents() {
- return publishingServiceRepository == null;
- }
-
- @ActionSemantics(Of.IDEMPOTENT)
- @MemberOrder(sequence="30.3")
- public void purgeProcessedEvents() {
- publishingServiceRepository.purgeProcessed();
- }
- public boolean hidePurgeProcessedEvents() {
- return publishingServiceRepository == null;
- }
-
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence="30.4")
- public List<PublishedEventJdo> findPublishedEvents(
- final @Optional @Named("From") LocalDate from,
- final @Optional @Named("To") LocalDate to) {
- return publishingServiceRepository.findByFromAndTo(from, to);
- }
- public boolean hideFindPublishedEvents() {
- return publishingServiceRepository == null;
- }
- public LocalDate default0FindPublishedEvents() {
- return clockService.now().minusDays(7);
- }
- public LocalDate default1FindPublishedEvents() {
- return clockService.now();
- }
-
-
- // //////////////////////////////////////
-
- @javax.inject.Inject
- private CommandServiceJdoRepository commandServiceRepository;
-
- @javax.inject.Inject
- private AuditingServiceJdoRepository auditingServiceRepository;
-
- @javax.inject.Inject
- private PublishingServiceJdoRepository publishingServiceRepository;
-
- @javax.inject.Inject
- private ClockService clockService;
-
-}
-
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/todoapp/webapp/src/main/java/webapp/admin/AdminContributions.java
----------------------------------------------------------------------
diff --git a/example/application/todoapp/webapp/src/main/java/webapp/admin/AdminContributions.java b/example/application/todoapp/webapp/src/main/java/webapp/admin/AdminContributions.java
deleted file mode 100644
index 6ab30f1..0000000
--- a/example/application/todoapp/webapp/src/main/java/webapp/admin/AdminContributions.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package webapp.admin;
-
-import java.util.Collections;
-import java.util.List;
-
-import com.google.common.collect.Lists;
-
-import org.joda.time.LocalDate;
-
-import org.apache.isis.applib.AbstractService;
-import org.apache.isis.applib.ViewModel;
-import org.apache.isis.applib.annotation.*;
-import org.apache.isis.applib.annotation.ActionSemantics.Of;
-import org.apache.isis.applib.services.HasTransactionId;
-import org.apache.isis.applib.services.bookmark.Bookmark;
-import org.apache.isis.applib.services.bookmark.BookmarkService;
-import org.apache.isis.applib.services.clock.ClockService;
-import org.apache.isis.objectstore.jdo.applib.service.DomainChangeJdoAbstract;
-import org.apache.isis.objectstore.jdo.applib.service.audit.AuditEntryJdo;
-import org.apache.isis.objectstore.jdo.applib.service.audit.AuditingServiceJdoRepository;
-import org.apache.isis.objectstore.jdo.applib.service.command.CommandJdo;
-import org.apache.isis.objectstore.jdo.applib.service.command.CommandServiceJdoRepository;
-import org.apache.isis.objectstore.jdo.applib.service.publish.PublishedEventJdo;
-import org.apache.isis.objectstore.jdo.applib.service.publish.PublishingServiceJdoRepository;
-
-@DomainService
-public class AdminContributions extends AbstractService {
-
- /**
- * Depending on which services are available, returns either a list of {@link CommandJdo command}s that have
- * caused a change in the domain object or a list of {@link AuditEntryJdo audit entries} capturing the 'effect'
- * of that change.
- *
- * <p>
- * If {@link CommandJdo command}s are returned, then the corresponding {@link AuditEntryJdo audit entries} are
- * available from each command.
- */
- @NotInServiceMenu
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence="30")
- public List<? extends DomainChangeJdoAbstract> recentChanges (
- final Object targetDomainObject,
- final @Optional @Named("From") LocalDate from,
- final @Optional @Named("To") LocalDate to) {
- final Bookmark targetBookmark = bookmarkService.bookmarkFor(targetDomainObject);
- final List<DomainChangeJdoAbstract> changes = Lists.newArrayList();
- if(commandServiceRepository != null) {
- changes.addAll(commandServiceRepository.findByTargetAndFromAndTo(targetBookmark, from, to));
- }
- if(publishingServiceRepository != null) {
- changes.addAll(publishingServiceRepository.findByTargetAndFromAndTo(targetBookmark, from, to));
- }
- changes.addAll(auditingServiceRepository.findByTargetAndFromAndTo(targetBookmark, from, to));
- Collections.sort(changes, DomainChangeJdoAbstract.compareByTimestampDescThenType());
- return changes;
- }
- /**
- * Hide for implementations of {@link HasTransactionId} (in other words for {@link CommandJdo command}s, {@link AuditEntryJdo audit entries}
- * and {@link PublishedEventJdo published event}s) and for {@link ViewModel}s.
- */
- public boolean hideRecentChanges(final Object targetDomainObject, final LocalDate from, final LocalDate to) {
- return targetDomainObject instanceof HasTransactionId || targetDomainObject instanceof ViewModel || auditingServiceRepository == null || bookmarkService == null;
- }
- public LocalDate default1RecentChanges() {
- return clockService.now().minusDays(7);
- }
- public LocalDate default2RecentChanges() {
- return clockService.now();
- }
-
-
- // //////////////////////////////////////
-
-
- @javax.inject.Inject
- private CommandServiceJdoRepository commandServiceRepository;
-
- @javax.inject.Inject
- private AuditingServiceJdoRepository auditingServiceRepository;
-
- @javax.inject.Inject
- private PublishingServiceJdoRepository publishingServiceRepository;
-
- @javax.inject.Inject
- private BookmarkService bookmarkService;
-
- @javax.inject.Inject
- private ClockService clockService;
-
-}
-
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/todoapp/webapp/src/main/java/webapp/prototyping/DeveloperUtilities.java
----------------------------------------------------------------------
diff --git a/example/application/todoapp/webapp/src/main/java/webapp/prototyping/DeveloperUtilities.java b/example/application/todoapp/webapp/src/main/java/webapp/prototyping/DeveloperUtilities.java
deleted file mode 100644
index faa81e2..0000000
--- a/example/application/todoapp/webapp/src/main/java/webapp/prototyping/DeveloperUtilities.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package webapp.prototyping;
-
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.value.Blob;
-import org.apache.isis.applib.value.Clob;
-import org.apache.isis.core.metamodel.services.devutils.DeveloperUtilitiesServiceDefault;
-
-/**
- * These overrides are simply to 'move' the action underneath the
- * 'Prototyping' menu.
- */
-@DomainService(menuOrder = "40.2")
-public class DeveloperUtilities extends DeveloperUtilitiesServiceDefault {
-
- @MemberOrder(name="Prototyping", sequence="90.1")
- @Override
- public Clob downloadMetaModel() {
- return super.downloadMetaModel();
- }
-
- @MemberOrder(name="Prototyping", sequence="90.2")
- @Override
- public Blob downloadLayouts() {
- return super.downloadLayouts();
- }
-
- @MemberOrder(name="Prototyping", sequence="90.3")
- @Override
- public void refreshServices() {
- super.refreshServices();
- }
-}
-
http://git-wip-us.apache.org/repos/asf/isis/blob/0949eb1f/example/application/todoapp/webapp/src/main/java/webapp/scheduler/AbstractIsisQuartzJob.java
----------------------------------------------------------------------
diff --git a/example/application/todoapp/webapp/src/main/java/webapp/scheduler/AbstractIsisQuartzJob.java b/example/application/todoapp/webapp/src/main/java/webapp/scheduler/AbstractIsisQuartzJob.java
deleted file mode 100644
index f1161ba..0000000
--- a/example/application/todoapp/webapp/src/main/java/webapp/scheduler/AbstractIsisQuartzJob.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package webapp.scheduler;
-
-import com.google.common.base.Splitter;
-import com.google.common.collect.Iterables;
-
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-
-import org.apache.isis.core.commons.authentication.AuthenticationSession;
-import org.apache.isis.core.runtime.authentication.standard.SimpleSession;
-import org.apache.isis.core.runtime.sessiontemplate.AbstractIsisSessionTemplate;
-import org.apache.isis.core.runtime.system.session.IsisSession;
-
-public class AbstractIsisQuartzJob implements Job {
-
- public static enum ConcurrentInstancesPolicy {
- /**
- * Only a single instance of this job is allowed to run.
- *
- * <p>
- * That is, if the job is invoked again before a previous instance has completed, then silently skips.
- */
- SINGLE_INSTANCE_ONLY,
- /**
- * Multiple instances of this job are allowed to run concurrently.
- *
- * <p>
- * That is, it is not required for the previous instance of this job to have completed before this one starts.
- */
- MULTIPLE_INSTANCES
- }
-
- private final AbstractIsisSessionTemplate isisRunnable;
-
- private final ConcurrentInstancesPolicy concurrentInstancesPolicy;
- private boolean executing;
-
- public AbstractIsisQuartzJob(AbstractIsisSessionTemplate isisRunnable) {
- this(isisRunnable, ConcurrentInstancesPolicy.SINGLE_INSTANCE_ONLY);
- }
- public AbstractIsisQuartzJob(AbstractIsisSessionTemplate isisRunnable, ConcurrentInstancesPolicy concurrentInstancesPolicy) {
- this.isisRunnable = isisRunnable;
- this.concurrentInstancesPolicy = concurrentInstancesPolicy;
- }
-
- // //////////////////////////////////////
-
- /**
- * Sets up an {@link IsisSession} then delegates to the {@link #doExecute(JobExecutionContext) hook}.
- */
- public void execute(final JobExecutionContext context) throws JobExecutionException {
- final AuthenticationSession authSession = newAuthSession(context);
- try {
- if(concurrentInstancesPolicy == ConcurrentInstancesPolicy.SINGLE_INSTANCE_ONLY && executing) {
- return;
- }
- executing = true;
-
- isisRunnable.execute(authSession, context);
- } finally {
- executing = false;
- }
- }
-
- AuthenticationSession newAuthSession(JobExecutionContext context) {
- String user = getKey(context, SchedulerConstants.USER_KEY);
- String rolesStr = getKey(context, SchedulerConstants.ROLES_KEY);
- String[] roles = Iterables.toArray(
- Splitter.on(",").split(rolesStr), String.class);
- return new SimpleSession(user, roles);
- }
-
- String getKey(JobExecutionContext context, String key) {
- return context.getMergedJobDataMap().getString(key);
- }
-}