You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2020/06/23 14:59:15 UTC
[isis] branch master updated: ISIS-2340: adds new JavaFx Viewer
(incubator)
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/master by this push:
new 900831d ISIS-2340: adds new JavaFx Viewer (incubator)
900831d is described below
commit 900831d7b40d4ff8fc2b276616eb43cb7c7fab80
Author: Andi Huber <ah...@apache.org>
AuthorDate: Tue Jun 23 16:58:58 2020 +0200
ISIS-2340: adds new JavaFx Viewer (incubator)
---
.../src/main/java/demoapp/dom/DemoModule.java | 62 +++++++-
.../demoapp/{webapp => dom}/menubars.layout.xml | 0
.../main/java/demoapp/webapp/DemoAppManifest.java | 55 +------
.../demo/domain/src/main/resources/application.yml | 2 +-
examples/demo/javafx/pom.xml | 171 +++++++++++++++++++++
.../main/java/demoapp/javafx/DemoAppJavaFx.java | 53 +++++++
.../javafx/src/main/resources/log4j2-spring.xml | 60 ++++++++
examples/demo/javafx/src/main/resources/ui.fxml | 12 ++
examples/demo/pom.xml | 9 --
incubator/viewers/javafx/model/pom.xml | 83 ++++++++++
.../events/IsisModuleIncViewerJavaFxModel.java | 24 ++-
.../model/events/PrimaryStageReadyEvent.java | 19 ++-
incubator/viewers/javafx/pom.xml | 122 +++++++++++++++
incubator/viewers/javafx/ui/pom.xml | 50 ++++++
.../javafx/ui/IsisModuleIncViewerJavaFxUi.java | 28 ++--
.../javafx/ui/main/PrimaryStageListener.java | 72 +++++++++
incubator/viewers/javafx/viewer/pom.xml | 42 +++++
.../viewer/javafx/viewer/JavafxViewer.java | 16 +-
.../javafx/viewer/JavafxViewerApplication.java | 71 +++++++++
.../security/shiro/IsisModuleSecurityShiro.java | 2 -
20 files changed, 864 insertions(+), 89 deletions(-)
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/DemoModule.java b/examples/demo/domain/src/main/java/demoapp/dom/DemoModule.java
index fc08b75..7283bea 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/DemoModule.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/DemoModule.java
@@ -18,6 +18,64 @@
*/
package demoapp.dom;
-public final class DemoModule {
- private DemoModule(){}
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.context.annotation.PropertySources;
+
+import org.apache.isis.core.config.presets.IsisPresets;
+import org.apache.isis.core.runtimeservices.IsisModuleCoreRuntimeServices;
+import org.apache.isis.extensions.modelannotation.metamodel.IsisModuleExtModelAnnotation;
+import org.apache.isis.extensions.secman.api.SecurityModuleConfig;
+import org.apache.isis.extensions.secman.api.permission.PermissionsEvaluationService;
+import org.apache.isis.extensions.secman.api.permission.PermissionsEvaluationServiceAllowBeatsVeto;
+import org.apache.isis.extensions.secman.encryption.jbcrypt.IsisModuleExtSecmanEncryptionJbcrypt;
+import org.apache.isis.extensions.secman.jdo.IsisModuleExtSecmanPersistenceJdo;
+import org.apache.isis.extensions.secman.model.IsisModuleExtSecmanModel;
+import org.apache.isis.extensions.secman.shiro.IsisModuleExtSecmanRealmShiro;
+import org.apache.isis.persistence.jdo.datanucleus5.IsisModuleJdoDataNucleus5;
+import org.apache.isis.security.shiro.IsisModuleSecurityShiro;
+import org.apache.isis.testing.fixtures.applib.IsisModuleTestingFixturesApplib;
+
+@Configuration
+@Import({
+ IsisModuleCoreRuntimeServices.class,
+ IsisModuleSecurityShiro.class,
+ IsisModuleJdoDataNucleus5.class,
+
+ // Security Manager Extension (secman)
+ IsisModuleExtSecmanModel.class,
+ IsisModuleExtSecmanRealmShiro.class,
+ IsisModuleExtSecmanPersistenceJdo.class,
+ IsisModuleExtSecmanEncryptionJbcrypt.class,
+
+ IsisModuleTestingFixturesApplib.class,
+
+ IsisModuleExtModelAnnotation.class, // @Model support
+
+})
+@PropertySources({
+ @PropertySource(IsisPresets.H2InMemory),
+ @PropertySource(IsisPresets.NoTranslations),
+ @PropertySource(IsisPresets.SilenceWicket),
+ @PropertySource(IsisPresets.DataNucleusAutoCreate),
+})
+public class DemoModule {
+
+ @Bean
+ public SecurityModuleConfig securityModuleConfigBean() {
+ return SecurityModuleConfig.builder()
+ .adminUserName("sven")
+ .adminAdditionalPackagePermission("demoapp.dom")
+ .adminAdditionalPackagePermission("demoapp.utils")
+ .adminAdditionalPackagePermission("org.apache.isis")
+ .build();
+ }
+
+ @Bean
+ public PermissionsEvaluationService permissionsEvaluationService() {
+ return new PermissionsEvaluationServiceAllowBeatsVeto();
+ }
+
}
diff --git a/examples/demo/domain/src/main/java/demoapp/webapp/menubars.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml
similarity index 100%
rename from examples/demo/domain/src/main/java/demoapp/webapp/menubars.layout.xml
rename to examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml
diff --git a/examples/demo/domain/src/main/java/demoapp/webapp/DemoAppManifest.java b/examples/demo/domain/src/main/java/demoapp/webapp/DemoAppManifest.java
index a7396ec..bbc57fc 100644
--- a/examples/demo/domain/src/main/java/demoapp/webapp/DemoAppManifest.java
+++ b/examples/demo/domain/src/main/java/demoapp/webapp/DemoAppManifest.java
@@ -26,23 +26,8 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
-import org.springframework.context.annotation.PropertySource;
-import org.springframework.context.annotation.PropertySources;
-import org.apache.isis.core.config.presets.IsisPresets;
-import org.apache.isis.core.runtimeservices.IsisModuleCoreRuntimeServices;
-import org.apache.isis.extensions.modelannotation.metamodel.IsisModuleExtModelAnnotation;
-import org.apache.isis.extensions.secman.api.SecurityModuleConfig;
-import org.apache.isis.extensions.secman.api.permission.PermissionsEvaluationService;
-import org.apache.isis.extensions.secman.api.permission.PermissionsEvaluationServiceAllowBeatsVeto;
-import org.apache.isis.extensions.secman.encryption.jbcrypt.IsisModuleExtSecmanEncryptionJbcrypt;
-import org.apache.isis.extensions.secman.jdo.IsisModuleExtSecmanPersistenceJdo;
-import org.apache.isis.extensions.secman.model.IsisModuleExtSecmanModel;
-import org.apache.isis.extensions.secman.shiro.IsisModuleExtSecmanRealmShiro;
import org.apache.isis.extensions.viewer.wicket.exceldownload.ui.IsisModuleExtExcelDownloadUi;
-import org.apache.isis.persistence.jdo.datanucleus5.IsisModuleJdoDataNucleus5;
-import org.apache.isis.security.shiro.IsisModuleSecurityShiro;
-import org.apache.isis.testing.fixtures.applib.IsisModuleTestingFixturesApplib;
import org.apache.isis.testing.h2console.ui.IsisModuleTestingH2ConsoleUi;
import org.apache.isis.viewer.restfulobjects.jaxrsresteasy4.IsisModuleViewerRestfulObjectsJaxrsResteasy4;
import org.apache.isis.viewer.restfulobjects.viewer.IsisModuleViewerRestfulObjectsViewer;
@@ -58,34 +43,17 @@ import demoapp.dom._infra.LibraryPreloadingService;
* Makes the integral parts of the 'demo' web application.
*/
@Configuration
-@PropertySources({
- @PropertySource(IsisPresets.H2InMemory),
- @PropertySource(IsisPresets.NoTranslations),
- @PropertySource(IsisPresets.SilenceWicket),
- @PropertySource(IsisPresets.DataNucleusAutoCreate),
-})
@Import({
- IsisModuleCoreRuntimeServices.class,
- IsisModuleSecurityShiro.class,
- IsisModuleJdoDataNucleus5.class,
-
+ DemoModule.class, // shared demo core module
+
// REST
IsisModuleViewerRestfulObjectsViewer.class,
IsisModuleViewerRestfulObjectsJaxrsResteasy4.class,
// CORS
- //IsisModuleExtCorsImpl.class,
-
- // Security Manager Extension (secman)
- IsisModuleExtSecmanModel.class,
- IsisModuleExtSecmanRealmShiro.class,
- IsisModuleExtSecmanPersistenceJdo.class,
- IsisModuleExtSecmanEncryptionJbcrypt.class,
-
- IsisModuleTestingFixturesApplib.class,
+ //IsisModuleExtCorsImpl.class, // currently breaks Wicket
+
IsisModuleTestingH2ConsoleUi.class,
-
- IsisModuleExtModelAnnotation.class, // @Model support
IsisModuleExtExcelDownloadUi.class, // allows for collection download as excel
LibraryPreloadingService.class, // just a performance enhancement
@@ -99,21 +67,6 @@ import demoapp.dom._infra.LibraryPreloadingService;
@Log4j2
public class DemoAppManifest {
- @Bean
- public SecurityModuleConfig securityModuleConfigBean() {
- return SecurityModuleConfig.builder()
- .adminUserName("sven")
- .adminAdditionalPackagePermission("demoapp.dom")
- .adminAdditionalPackagePermission("demoapp.utils")
- .adminAdditionalPackagePermission("org.apache.isis")
- .build();
- }
-
- @Bean
- public PermissionsEvaluationService permissionsEvaluationService() {
- return new PermissionsEvaluationServiceAllowBeatsVeto();
- }
-
/**
* If available from {@code System.getProperty("ContextPath")}
* or {@code System.getenv("ContextPath")},
diff --git a/examples/demo/domain/src/main/resources/application.yml b/examples/demo/domain/src/main/resources/application.yml
index 279a9be..908bfd7 100644
--- a/examples/demo/domain/src/main/resources/application.yml
+++ b/examples/demo/domain/src/main/resources/application.yml
@@ -55,7 +55,7 @@ isis:
viewer:
wicket:
application:
- menubars-layout-xml: demoapp/webapp/menubars.layout.xml
+ menubars-layout-xml: demoapp/dom/menubars.layout.xml
favicon-url: images/favicon.png
brand-logo-header: images/gift_48.png
brand-logo-signin: images/gift_256.png
diff --git a/examples/demo/javafx/pom.xml b/examples/demo/javafx/pom.xml
new file mode 100644
index 0000000..dee4ef0
--- /dev/null
+++ b/examples/demo/javafx/pom.xml
@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
+<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">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.isis.examples.apps</groupId>
+ <artifactId>demo-parent</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>demo-javafx</artifactId>
+
+ <name>Apache Isis App Demo - JavaFX</name>
+
+ <packaging>jar</packaging>
+
+ <properties>
+ <sonar.skip>true</sonar.skip>
+ </properties>
+
+ <build>
+ <resources>
+ <resource>
+ <filtering>false</filtering>
+ <directory>src/main/resources</directory>
+ </resource>
+ <resource>
+ <filtering>false</filtering>
+ <directory>src/main/java</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+
+ <plugins>
+ <!-- Compile -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <showDeprecation>false</showDeprecation>
+ <showWarnings>false</showWarnings>
+ <release>11</release>
+ <compilerArgs>
+ <arg>${maven.compiler.arg}</arg>
+ </compilerArgs>
+ </configuration>
+ <!-- goal:compile binds to phase:compile -->
+ <!-- goal:testCompile binds to phase:test-compile -->
+ </plugin>
+ </plugins>
+
+ </build>
+
+ <dependencies>
+
+ <!-- DEMO DOMAIN -->
+
+ <dependency>
+ <groupId>org.apache.isis.examples.apps</groupId>
+ <artifactId>demo-domain</artifactId>
+ <version>${project.version}</version>
+ <type>jar</type>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.isis.mavendeps</groupId>
+ <artifactId>isis-mavendeps-webapp</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.isis.testing</groupId>
+ <artifactId>isis-testing-h2console-ui</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.persistence</groupId>
+ <artifactId>isis-persistence-jdo-datanucleus5</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-runtimeservices</artifactId>
+ </dependency>
+
+ <!-- SECURITY -->
+
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-security</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.isis.security</groupId>
+ <artifactId>isis-security-bypass</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.isis.security</groupId>
+ <artifactId>isis-security-shiro</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>
+ spring-boot-starter-thymeleaf
+ </artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!-- JDK11+ SUPPORT -->
+
+ <dependency>
+ <groupId>org.apache.isis.mavendeps</groupId>
+ <artifactId>isis-mavendeps-jdk11</artifactId>
+ <type>pom</type>
+ </dependency>
+
+ <!-- INCUBATOR: VAADIN VIEWER -->
+
+ <dependency>
+ <groupId>org.apache.isis.incubator.viewer</groupId>
+ <artifactId>isis-viewer-javafx-viewer</artifactId>
+ <!-- incubator version is not managed by app starter bundles -->
+ <version>${project.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-webapp</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>
+ spring-boot-starter-thymeleaf
+ </artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!-- EXTENSIONS -->
+
+ <!-- OTHER DEPENDENCIES -->
+
+ <dependency>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ </dependencies>
+
+</project>
\ No newline at end of file
diff --git a/examples/demo/javafx/src/main/java/demoapp/javafx/DemoAppJavaFx.java b/examples/demo/javafx/src/main/java/demoapp/javafx/DemoAppJavaFx.java
new file mode 100644
index 0000000..cc95900
--- /dev/null
+++ b/examples/demo/javafx/src/main/java/demoapp/javafx/DemoAppJavaFx.java
@@ -0,0 +1,53 @@
+/*
+ * 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 demoapp.javafx;
+
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Import;
+
+import org.apache.isis.core.commons.internal.debug._Probe;
+import org.apache.isis.core.config.presets.IsisPresets;
+import org.apache.isis.core.runtimeservices.session.IsisInteractionFactoryDefault;
+import org.apache.isis.incubator.viewer.javafx.ui.IsisModuleIncViewerJavaFxUi;
+import org.apache.isis.incubator.viewer.javafx.viewer.JavafxViewer;
+
+import demoapp.dom.DemoModule;
+
+/**
+ * Bootstrap the application.
+ */
+@SpringBootApplication
+@Import({
+ DemoModule.class,
+
+ IsisModuleIncViewerJavaFxUi.class,
+
+ // INCUBATING
+
+})
+public class DemoAppJavaFx {
+
+ public static void main(String[] args) {
+ IsisPresets.logging(IsisInteractionFactoryDefault.class, "debug");
+ IsisPresets.logging(_Probe.class, "debug"); // enable debug entry logging
+
+ JavafxViewer.launch(DemoAppJavaFx.class, args);
+ }
+
+}
diff --git a/examples/demo/javafx/src/main/resources/log4j2-spring.xml b/examples/demo/javafx/src/main/resources/log4j2-spring.xml
new file mode 100644
index 0000000..0c0e64c
--- /dev/null
+++ b/examples/demo/javafx/src/main/resources/log4j2-spring.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Configuration status="WARN">
+ <Properties>
+ <Property name="PID">????</Property>
+ <Property name="LOG_EXCEPTION_CONVERSION_WORD">%xwEx</Property>
+ <Property name="LOG_LEVEL_PATTERN">%5p</Property>
+ <Property name="LOG_DATEFORMAT_PATTERN">yyyy-MM-dd HH:mm:ss.SSS</Property>
+ <Property name="CONSOLE_LOG_PATTERN">%clr{%d{${LOG_DATEFORMAT_PATTERN}}}{faint} %clr{${LOG_LEVEL_PATTERN}} %clr{${sys:PID}}{magenta} %clr{---}{faint} %clr{[%15.15t]}{faint} %clr{%-40.40c{1.}}{cyan} %clr{:}{faint} %m%n${sys:LOG_EXCEPTION_CONVERSION_WORD}</Property>
+ <Property name="FILE_LOG_PATTERN">%d{${LOG_DATEFORMAT_PATTERN}} ${LOG_LEVEL_PATTERN} ${sys:PID} --- [%t] %-40.40c{1.} : %m%n${sys:LOG_EXCEPTION_CONVERSION_WORD}</Property>
+ </Properties>
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT" follow="true">
+ <PatternLayout pattern="${sys:CONSOLE_LOG_PATTERN}" />
+ </Console>
+ </Appenders>
+ <Loggers>
+
+ <!-- silence Wicket -->
+ <Logger name="org.apache.wicket.page.PartialPageUpdate" level="error" />
+
+ <Logger name="org.apache.catalina.startup.DigesterFactory" level="error" />
+ <Logger name="org.apache.catalina.util.LifecycleBase" level="error" />
+ <Logger name="org.apache.coyote.http11.Http11NioProtocol" level="warn" />
+ <logger name="org.apache.sshd.common.util.SecurityUtils" level="warn"/>
+ <Logger name="org.apache.tomcat.util.net.NioSelectorPool" level="warn" />
+ <Logger name="org.eclipse.jetty.util.component.AbstractLifeCycle" level="error" />
+ <Logger name="org.hibernate.validator.internal.util.Version" level="warn" />
+ <logger name="org.springframework.boot.actuate.endpoint.jmx" level="warn"/>
+
+ <logger name="org.apache.directory" level="warn"/>
+ <logger name="org.apache.directory.api.ldap.model.entry.Value" level="off"/>
+
+ <logger name="DataNucleus.Persistence" level="info"/>
+ <logger name="DataNucleus.Transaction" level="info"/>
+ <logger name="DataNucleus.Datastore.Schema" level="info"/>
+ <logger name="DataNucleus.Datastore.Native" level="info"/>
+
+ <Root level="info">
+ <AppenderRef ref="Console" />
+ </Root>
+ </Loggers>
+</Configuration>
diff --git a/examples/demo/javafx/src/main/resources/ui.fxml b/examples/demo/javafx/src/main/resources/ui.fxml
new file mode 100644
index 0000000..084213f
--- /dev/null
+++ b/examples/demo/javafx/src/main/resources/ui.fxml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?import javafx.scene.layout.*?>
+<?import java.lang.*?>
+<?import javafx.scene.control.*?>
+
+
+<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
+ <top>
+ <HBox prefHeight="100.0" prefWidth="200.0" BorderPane.alignment="CENTER" />
+ </top>
+</BorderPane>
diff --git a/examples/demo/pom.xml b/examples/demo/pom.xml
index c3aa727..69c036a 100644
--- a/examples/demo/pom.xml
+++ b/examples/demo/pom.xml
@@ -56,11 +56,6 @@
<!-- WEB APPLICATION DEPENDENCY BUNDLE -->
- <dependency>
- <groupId>org.apache.isis.mavendeps</groupId>
- <artifactId>isis-mavendeps-webapp</artifactId>
- <type>pom</type>
- </dependency>
<!-- JDK11+ SUPPORT -->
@@ -108,10 +103,6 @@
<groupId>org.apache.isis.extensions</groupId>
<artifactId>isis-extensions-secman-shiro-realm</artifactId>
</dependency>
- <dependency>
- <groupId>org.apache.isis.testing</groupId>
- <artifactId>isis-testing-h2console-ui</artifactId>
- </dependency>
<!-- OTHER DEPENDENCIES -->
diff --git a/incubator/viewers/javafx/model/pom.xml b/incubator/viewers/javafx/model/pom.xml
new file mode 100644
index 0000000..c892a16
--- /dev/null
+++ b/incubator/viewers/javafx/model/pom.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
+<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">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.isis.incubator.viewer</groupId>
+ <artifactId>isis-viewer-javafx</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>isis-viewer-javafx-model</artifactId>
+ <name>Apache Isis Inc - Viewer JavaFX (Model)</name>
+
+ <properties>
+ <jar-plugin.automaticModuleName>org.apache.isis.incubator.viewer.javafx.model</jar-plugin.automaticModuleName>
+ <git-plugin.propertiesDir>org/apache/isis/incubator/viewer/javafx/model</git-plugin.propertiesDir>
+ </properties>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.isis.viewer</groupId>
+ <artifactId>isis-viewer-common</artifactId>
+ </dependency>
+
+
+ <dependency>
+ <groupId>org.openjfx</groupId>
+ <artifactId>javafx-base</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openjfx</groupId>
+ <artifactId>javafx-controls</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openjfx</groupId>
+ <artifactId>javafx-swing</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openjfx</groupId>
+ <artifactId>javafx-fxml</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openjfx</groupId>
+ <artifactId>javafx-web</artifactId>
+ </dependency>
+
+
+ <!-- TEST DEPENDENCIES -->
+
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-internaltestsupport</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-metamodel</artifactId>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+</project>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/DemoModule.java b/incubator/viewers/javafx/model/src/main/java/org/apache/isis/incubator/viewer/javafx/model/events/IsisModuleIncViewerJavaFxModel.java
similarity index 68%
copy from examples/demo/domain/src/main/java/demoapp/dom/DemoModule.java
copy to incubator/viewers/javafx/model/src/main/java/org/apache/isis/incubator/viewer/javafx/model/events/IsisModuleIncViewerJavaFxModel.java
index fc08b75..dd989df 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/DemoModule.java
+++ b/incubator/viewers/javafx/model/src/main/java/org/apache/isis/incubator/viewer/javafx/model/events/IsisModuleIncViewerJavaFxModel.java
@@ -16,8 +16,26 @@
* specific language governing permissions and limitations
* under the License.
*/
-package demoapp.dom;
+package org.apache.isis.incubator.viewer.javafx.model.events;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+
+/**
+ *
+ * @since 2.0
+ */
+@Configuration
+@Import({
+ // modules
+
+ // @Components's
+
+ // @Service's
+
+ // @Mixin's
+})
+
+public class IsisModuleIncViewerJavaFxModel {
-public final class DemoModule {
- private DemoModule(){}
}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/DemoModule.java b/incubator/viewers/javafx/model/src/main/java/org/apache/isis/incubator/viewer/javafx/model/events/PrimaryStageReadyEvent.java
similarity index 66%
copy from examples/demo/domain/src/main/java/demoapp/dom/DemoModule.java
copy to incubator/viewers/javafx/model/src/main/java/org/apache/isis/incubator/viewer/javafx/model/events/PrimaryStageReadyEvent.java
index fc08b75..d8f050f 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/DemoModule.java
+++ b/incubator/viewers/javafx/model/src/main/java/org/apache/isis/incubator/viewer/javafx/model/events/PrimaryStageReadyEvent.java
@@ -16,8 +16,21 @@
* specific language governing permissions and limitations
* under the License.
*/
-package demoapp.dom;
+package org.apache.isis.incubator.viewer.javafx.model.events;
-public final class DemoModule {
- private DemoModule(){}
+import org.springframework.context.ApplicationEvent;
+
+import javafx.stage.Stage;
+
+public class PrimaryStageReadyEvent extends ApplicationEvent {
+
+ private static final long serialVersionUID = 1L;
+
+ public PrimaryStageReadyEvent(Object source) {
+ super(source);
+ }
+
+ public Stage getStage() {
+ return (Stage) getSource();
+ }
}
diff --git a/incubator/viewers/javafx/pom.xml b/incubator/viewers/javafx/pom.xml
new file mode 100644
index 0000000..23806a7
--- /dev/null
+++ b/incubator/viewers/javafx/pom.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
+<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">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.isis.incubator</groupId>
+ <artifactId>isis-incubator</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.apache.isis.incubator.viewer</groupId>
+ <artifactId>isis-viewer-javafx</artifactId>
+ <name>Apache Isis Inc - Viewer JavaFX</name>
+ <description>
+ Initial sketches
+ </description>
+
+ <properties>
+ <jar-plugin.automaticModuleName>org.apache.isis.incubator.viewer.javafx</jar-plugin.automaticModuleName>
+ <git-plugin.propertiesDir>org/apache/isis/incubator/viewer/javafx</git-plugin.propertiesDir>
+ <javafx.version>11.0.2</javafx.version>
+ </properties>
+
+ <packaging>pom</packaging>
+
+ <build>
+ <plugins>
+ <!-- Compile -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <showDeprecation>false</showDeprecation>
+ <showWarnings>false</showWarnings>
+ <release>11</release>
+ <compilerArgs>
+ <arg>${maven.compiler.arg}</arg>
+ </compilerArgs>
+ </configuration>
+ <!-- goal:compile binds to phase:compile -->
+ <!-- goal:testCompile binds to phase:test-compile -->
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencyManagement>
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.isis.incubator.viewer</groupId>
+ <artifactId>isis-viewer-javafx-model</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.incubator.viewer</groupId>
+ <artifactId>isis-viewer-javafx-ui</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.incubator.viewer</groupId>
+ <artifactId>isis-viewer-javafx-viewer</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </dependency>
+
+ <!-- JAVA-FX -->
+
+ <dependency>
+ <groupId>org.openjfx</groupId>
+ <artifactId>javafx-base</artifactId>
+ <version>${javafx.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openjfx</groupId>
+ <artifactId>javafx-controls</artifactId>
+ <version>${javafx.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openjfx</groupId>
+ <artifactId>javafx-swing</artifactId>
+ <version>${javafx.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openjfx</groupId>
+ <artifactId>javafx-fxml</artifactId>
+ <version>${javafx.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openjfx</groupId>
+ <artifactId>javafx-web</artifactId>
+ <version>${javafx.version}</version>
+ </dependency>
+
+ </dependencies>
+ </dependencyManagement>
+
+ <modules>
+ <module>model</module>
+ <module>viewer</module>
+ <module>ui</module>
+ </modules>
+
+</project>
diff --git a/incubator/viewers/javafx/ui/pom.xml b/incubator/viewers/javafx/ui/pom.xml
new file mode 100644
index 0000000..18cfc94
--- /dev/null
+++ b/incubator/viewers/javafx/ui/pom.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
+<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">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.isis.incubator.viewer</groupId>
+ <artifactId>isis-viewer-javafx</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>isis-viewer-javafx-ui</artifactId>
+ <name>Apache Isis Inc - Viewer JavaFX (UI Components)</name>
+
+ <properties>
+ <jar-plugin.automaticModuleName>org.apache.isis.incubator.viewer.javafx.ui</jar-plugin.automaticModuleName>
+ <git-plugin.propertiesDir>org/apache/isis/incubator/viewer/javafx/ui</git-plugin.propertiesDir>
+ </properties>
+
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.isis.incubator.viewer</groupId>
+ <artifactId>isis-viewer-javafx-model</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-runtimeservices</artifactId>
+ </dependency>
+
+ <!-- JavaFX -->
+
+
+ </dependencies>
+
+</project>
diff --git a/security/shiro/src/main/java/org/apache/isis/security/shiro/IsisModuleSecurityShiro.java b/incubator/viewers/javafx/ui/src/main/java/org/apache/isis/incubator/viewer/javafx/ui/IsisModuleIncViewerJavaFxUi.java
similarity index 61%
copy from security/shiro/src/main/java/org/apache/isis/security/shiro/IsisModuleSecurityShiro.java
copy to incubator/viewers/javafx/ui/src/main/java/org/apache/isis/incubator/viewer/javafx/ui/IsisModuleIncViewerJavaFxUi.java
index b109c0e..8fb2654 100644
--- a/security/shiro/src/main/java/org/apache/isis/security/shiro/IsisModuleSecurityShiro.java
+++ b/incubator/viewers/javafx/ui/src/main/java/org/apache/isis/incubator/viewer/javafx/ui/IsisModuleIncViewerJavaFxUi.java
@@ -16,34 +16,32 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.isis.security.shiro;
+package org.apache.isis.incubator.viewer.javafx.ui;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
-import org.apache.isis.core.runtimeservices.IsisModuleCoreRuntimeServices;
-import org.apache.isis.security.shiro.authentication.AuthenticatorShiro;
-import org.apache.isis.security.shiro.authorization.AuthorizorShiro;
-import org.apache.isis.security.shiro.webmodule.WebModuleShiro;
-import org.apache.isis.core.webapp.IsisModuleCoreWebapp;
+import org.apache.isis.incubator.viewer.javafx.model.events.IsisModuleIncViewerJavaFxModel;
+import org.apache.isis.incubator.viewer.javafx.ui.main.PrimaryStageListener;
/**
- * Configuration Bean to support Isis Security using Shiro.
- *
+ *
* @since 2.0
*/
@Configuration
@Import({
// modules
- IsisModuleCoreRuntimeServices.class,
- IsisModuleCoreWebapp.class,
-
+
+ IsisModuleIncViewerJavaFxModel.class,
+
+ // @Components's
+ PrimaryStageListener.class,
+
// @Service's
- AuthenticatorShiro.class,
- AuthorizorShiro.class,
- WebModuleShiro.class,
+ // @Mixin's
})
-public class IsisModuleSecurityShiro {
+
+public class IsisModuleIncViewerJavaFxUi {
}
diff --git a/incubator/viewers/javafx/ui/src/main/java/org/apache/isis/incubator/viewer/javafx/ui/main/PrimaryStageListener.java b/incubator/viewers/javafx/ui/src/main/java/org/apache/isis/incubator/viewer/javafx/ui/main/PrimaryStageListener.java
new file mode 100644
index 0000000..ec79e2c
--- /dev/null
+++ b/incubator/viewers/javafx/ui/src/main/java/org/apache/isis/incubator/viewer/javafx/ui/main/PrimaryStageListener.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.incubator.viewer.javafx.ui.main;
+
+import javax.inject.Inject;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.event.EventListener;
+import org.springframework.core.io.Resource;
+import org.springframework.stereotype.Component;
+
+import org.apache.isis.incubator.viewer.javafx.model.events.PrimaryStageReadyEvent;
+
+import lombok.SneakyThrows;
+import lombok.val;
+import lombok.extern.log4j.Log4j2;
+
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+
+@Component
+@Log4j2
+public class PrimaryStageListener {
+
+ private final String applicationTitle;
+ private final Resource fxml;
+ private final ApplicationContext springContext;
+
+ @Inject
+ public PrimaryStageListener(
+ @Value("isis.viewer.javafx.application.title") String applicationTitle,
+ @Value("classpath:/ui.fxml") Resource fxml,
+ ApplicationContext springContext) {
+ this.applicationTitle = applicationTitle;
+ this.fxml = fxml;
+ this.springContext = springContext;
+ }
+
+ @EventListener(PrimaryStageReadyEvent.class)
+ @SneakyThrows
+ public void onStageReady(PrimaryStageReadyEvent event) {
+ log.info("JavaFX primary stage is ready");
+ val layoutUrl = this.fxml.getURL();
+ val fxmlLoader = new FXMLLoader(layoutUrl);
+ fxmlLoader.setControllerFactory(springContext::getBean);
+ val uiRoot = (Parent)fxmlLoader.load();
+ val scene = new Scene(uiRoot, 800, 600);
+ val stage = event.getStage();
+ stage.setScene(scene);
+ stage.setTitle(applicationTitle);
+ stage.show();
+ }
+
+}
diff --git a/incubator/viewers/javafx/viewer/pom.xml b/incubator/viewers/javafx/viewer/pom.xml
new file mode 100644
index 0000000..a4615c6
--- /dev/null
+++ b/incubator/viewers/javafx/viewer/pom.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
+<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">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.isis.incubator.viewer</groupId>
+ <artifactId>isis-viewer-javafx</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>isis-viewer-javafx-viewer</artifactId>
+ <name>Apache Isis Inc - Viewer JavaFX (Viewer)</name>
+
+ <properties>
+ <jar-plugin.automaticModuleName>org.apache.isis.incubator.viewer.javafx.viewer</jar-plugin.automaticModuleName>
+ <git-plugin.propertiesDir>org/apache/isis/incubator/viewer/javafx/model/viewer</git-plugin.propertiesDir>
+ </properties>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.isis.incubator.viewer</groupId>
+ <artifactId>isis-viewer-javafx-ui</artifactId>
+ </dependency>
+
+ </dependencies>
+
+
+</project>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/DemoModule.java b/incubator/viewers/javafx/viewer/src/main/java/org/apache/isis/incubator/viewer/javafx/viewer/JavafxViewer.java
similarity index 67%
copy from examples/demo/domain/src/main/java/demoapp/dom/DemoModule.java
copy to incubator/viewers/javafx/viewer/src/main/java/org/apache/isis/incubator/viewer/javafx/viewer/JavafxViewer.java
index fc08b75..57f2e86 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/DemoModule.java
+++ b/incubator/viewers/javafx/viewer/src/main/java/org/apache/isis/incubator/viewer/javafx/viewer/JavafxViewer.java
@@ -16,8 +16,18 @@
* specific language governing permissions and limitations
* under the License.
*/
-package demoapp.dom;
+package org.apache.isis.incubator.viewer.javafx.viewer;
-public final class DemoModule {
- private DemoModule(){}
+import lombok.experimental.UtilityClass;
+
+import javafx.application.Application;
+
+@UtilityClass
+public class JavafxViewer {
+
+ public static final void launch(Class<?> appClass, String... args) {
+ JavafxViewerApplication.sources = new Class<?>[]{appClass};
+ Application.launch(JavafxViewerApplication.class, args);
+ }
+
}
diff --git a/incubator/viewers/javafx/viewer/src/main/java/org/apache/isis/incubator/viewer/javafx/viewer/JavafxViewerApplication.java b/incubator/viewers/javafx/viewer/src/main/java/org/apache/isis/incubator/viewer/javafx/viewer/JavafxViewerApplication.java
new file mode 100644
index 0000000..e58c566
--- /dev/null
+++ b/incubator/viewers/javafx/viewer/src/main/java/org/apache/isis/incubator/viewer/javafx/viewer/JavafxViewerApplication.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.incubator.viewer.javafx.viewer;
+
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.context.ApplicationContextInitializer;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.GenericApplicationContext;
+
+import org.apache.isis.core.commons.internal._Constants;
+import org.apache.isis.incubator.viewer.javafx.model.events.PrimaryStageReadyEvent;
+
+import javafx.application.Application;
+import javafx.application.HostServices;
+import javafx.application.Platform;
+import javafx.stage.Stage;
+
+public class JavafxViewerApplication extends Application {
+
+ private ConfigurableApplicationContext springContext;
+
+ static Class<?>[] sources;
+
+ @Override
+ public void init() throws Exception {
+
+ final ApplicationContextInitializer<GenericApplicationContext> initializer =
+ ac->{
+ ac.registerBean(Application.class, ()->JavafxViewerApplication.this);
+ ac.registerBean(Parameters.class, this::getParameters);
+ ac.registerBean(HostServices.class, this::getHostServices);
+ };
+
+ this.springContext = new SpringApplicationBuilder()
+ .sources(sources)
+ .initializers(initializer)
+ .run(getParameters().getRaw().toArray(_Constants.emptyStringArray));
+ }
+
+
+
+ @Override
+ public void start(Stage primaryStage) throws Exception {
+ this.springContext.publishEvent(new PrimaryStageReadyEvent(primaryStage));
+ }
+
+ @Override
+ public void stop() throws Exception {
+ this.springContext.close();
+ Platform.exit();
+ }
+
+
+
+}
diff --git a/security/shiro/src/main/java/org/apache/isis/security/shiro/IsisModuleSecurityShiro.java b/security/shiro/src/main/java/org/apache/isis/security/shiro/IsisModuleSecurityShiro.java
index b109c0e..6cacb7f 100644
--- a/security/shiro/src/main/java/org/apache/isis/security/shiro/IsisModuleSecurityShiro.java
+++ b/security/shiro/src/main/java/org/apache/isis/security/shiro/IsisModuleSecurityShiro.java
@@ -25,7 +25,6 @@ import org.apache.isis.core.runtimeservices.IsisModuleCoreRuntimeServices;
import org.apache.isis.security.shiro.authentication.AuthenticatorShiro;
import org.apache.isis.security.shiro.authorization.AuthorizorShiro;
import org.apache.isis.security.shiro.webmodule.WebModuleShiro;
-import org.apache.isis.core.webapp.IsisModuleCoreWebapp;
/**
* Configuration Bean to support Isis Security using Shiro.
@@ -36,7 +35,6 @@ import org.apache.isis.core.webapp.IsisModuleCoreWebapp;
@Import({
// modules
IsisModuleCoreRuntimeServices.class,
- IsisModuleCoreWebapp.class,
// @Service's
AuthenticatorShiro.class,