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 2019/10/02 06:41:46 UTC

[isis] 01/01: ISIS-2086: adds javax.jdo.option settings to IsisConfiguration

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch ISIS-2086
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 2f84732e1a321418c5ad225ca8b84a46a6d85689
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Oct 2 07:41:20 2019 +0100

    ISIS-2086: adds javax.jdo.option settings to IsisConfiguration
    
    with metadata so that they are correctly bound.
---
 .../org/apache/isis/config/IsisConfiguration.java   | 21 +++++++++++++++++++++
 .../additional-spring-configuration-metadata.json   | 16 +++++++++++++++-
 2 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/core/config/src/main/java/org/apache/isis/config/IsisConfiguration.java b/core/config/src/main/java/org/apache/isis/config/IsisConfiguration.java
index f70934b..1c1516a 100644
--- a/core/config/src/main/java/org/apache/isis/config/IsisConfiguration.java
+++ b/core/config/src/main/java/org/apache/isis/config/IsisConfiguration.java
@@ -18,6 +18,7 @@
  */
 package org.apache.isis.config;
 
+import java.net.URL;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -108,6 +109,26 @@ public class IsisConfiguration {
             private final Impl impl = new Impl();
             @Data
             public static class Impl {
+                private final Javax javax = new Javax();
+                @Data
+                public static class Javax {
+                    private final Jdo jdo = new Jdo();
+                    @Data
+                    public static class Jdo {
+                        private final Option option = new Option();
+                        @Data
+                        public static class Option {
+                            // this field also appears in additional-spring-configuration-metadata.json, to fix the casing as 'ConnectionDriverName'
+                            private String connectionDriverName;
+                            // this field also appears in additional-spring-configuration-metadata.json, to fix the casing as 'ConnectionURL'
+                            private String connectionUrl;
+                            // this field also appears in additional-spring-configuration-metadata.json, to fix the casing as 'ConnectionUserName'
+                            private String connectionUserName;
+                            // this field also appears in additional-spring-configuration-metadata.json, to fix the casing as 'ConnectionPassword'
+                            private String connectionPassword;
+                        }
+                    }
+                }
             }
 
             private final StandaloneCollection standaloneCollection = new StandaloneCollection();
diff --git a/core/config/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/core/config/src/main/resources/META-INF/additional-spring-configuration-metadata.json
index 51d9684..81e89f0 100644
--- a/core/config/src/main/resources/META-INF/additional-spring-configuration-metadata.json
+++ b/core/config/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -1,10 +1,24 @@
 {
   "properties": [
     {
+      "name": "isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName",
+      "type": "java.lang.String",
+      "description": "JDBC driver used by DataNucleus Object store to connect.",
+    },
+    {
       "name": "isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL",
       "type": "java.lang.String",
       "description": "URL used by DataNucleus Object store to connect.",
-      "defaultValue": ""
+    },
+    {
+      "name": "isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName",
+      "type": "java.lang.String",
+      "description": "User account used by DataNucleus Object store to connect.",
+    },
+    {
+      "name": "isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword",
+      "type": "java.lang.String",
+      "description": "Password for the user account used by DataNucleus Object store to connect.",
     },
     {
       "name": "isis.viewer.wicket.credit.1.url",