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/09/30 07:32:20 UTC

[isis] branch ISIS-2086 updated (a6526eb -> 29eecd1)

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

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


    from a6526eb  ISIS-2158: fixes demo-app launch
     new bf14d5f  ISIS-2086: refactors 'isis.service.email.*' (about a dozen of them) to type-safe config
     new 2e837ba  ISIS-2086: renames ResourceContext#getConfiguration() to #getConfigurationLegacy() for RO viewer.
     new 983654a  ISIS-2086: adds #getConfiguration back for RuntimeContextBase (RO)
     new 29eecd1  ISIS-2086: refactors "isis.viewer.restfulobjects.gsoc2013.legacyParamDetails" to type-safe config

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/isis/config/IsisConfiguration.java  | 54 ++++++++++++++++++++-
 .../services/email/EmailServiceDefault.java        | 56 ++++++----------------
 .../system/context/session/RuntimeContext.java     |  4 +-
 .../system/context/session/RuntimeContextBase.java |  7 ++-
 .../isis/runtime/system/session/IsisSession.java   |  3 +-
 .../domainobjects/ObjectActionReprRenderer.java    |  2 +-
 .../restfulobjects/server/ResourceContext.java     | 16 +++----
 .../server/resources/DomainResourceHelper.java     |  4 +-
 8 files changed, 89 insertions(+), 57 deletions(-)


[isis] 04/04: ISIS-2086: refactors "isis.viewer.restfulobjects.gsoc2013.legacyParamDetails" to type-safe config

Posted by da...@apache.org.
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 29eecd1ca00a98512f5deb7c1c0f3c84711b2dcf
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Sep 30 08:32:00 2019 +0100

    ISIS-2086: refactors "isis.viewer.restfulobjects.gsoc2013.legacyParamDetails" to type-safe config
---
 .../main/java/org/apache/isis/config/IsisConfiguration.java    | 10 +++++++++-
 .../rendering/domainobjects/ObjectActionReprRenderer.java      |  2 +-
 2 files changed, 10 insertions(+), 2 deletions(-)

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 14d3dd6..26bf159 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
@@ -425,7 +425,15 @@ public class IsisConfiguration {
     private final Viewer viewer = new Viewer();
     @Data
     public static class Viewer {
-
+        private final Restfulobjects restfulobjects = new Restfulobjects();
+        @Data
+        public static class Restfulobjects {
+            private final Gsoc2013 gsoc2013 = new Gsoc2013();
+            @Data
+            public static class Gsoc2013 {
+                private boolean legacyParamDetails = false;
+            }
+        }
         private final Wicket wicket = new Wicket();
         @Data
         public static class Wicket {
diff --git a/core/viewer-restfulobjects/rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/domainobjects/ObjectActionReprRenderer.java b/core/viewer-restfulobjects/rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/domainobjects/ObjectActionReprRenderer.java
index c191101..e9a7a22 100644
--- a/core/viewer-restfulobjects/rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/domainobjects/ObjectActionReprRenderer.java
+++ b/core/viewer-restfulobjects/rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/domainobjects/ObjectActionReprRenderer.java
@@ -138,7 +138,7 @@ public class ObjectActionReprRenderer extends AbstractObjectMemberReprRenderer<O
     // ///////////////////////////////////////////////////
 
     private ObjectActionReprRenderer addParameterDetails() {
-        boolean gsoc2013 = getRendererContext().getConfigurationLegacy().getBoolean("isis.viewer.restfulobjects.gsoc2013.legacyParamDetails", false);
+        boolean gsoc2013 = getRendererContext().getConfiguration().getViewer().getRestfulobjects().getGsoc2013().isLegacyParamDetails();
         if(gsoc2013) {
             final List<Object> parameters = _Lists.newArrayList();
             for (int i = 0; i < objectMember.getParameterCount(); i++) {


[isis] 02/04: ISIS-2086: renames ResourceContext#getConfiguration() to #getConfigurationLegacy() for RO viewer.

Posted by da...@apache.org.
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 2e837ba45d3f1bcec9c2e5b0b03c17fca9aa0c77
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Sep 30 08:28:47 2019 +0100

    ISIS-2086: renames ResourceContext#getConfiguration() to #getConfigurationLegacy() for RO viewer.
---
 .../runtime/system/context/session/RuntimeContext.java   |  2 +-
 .../system/context/session/RuntimeContextBase.java       |  4 ++--
 .../domainobjects/ObjectActionReprRenderer.java          |  2 +-
 .../viewer/restfulobjects/server/ResourceContext.java    | 16 ++++++++--------
 .../server/resources/DomainResourceHelper.java           |  4 ++--
 5 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/core/runtime/src/main/java/org/apache/isis/runtime/system/context/session/RuntimeContext.java b/core/runtime/src/main/java/org/apache/isis/runtime/system/context/session/RuntimeContext.java
index 020b981..1b00abc 100644
--- a/core/runtime/src/main/java/org/apache/isis/runtime/system/context/session/RuntimeContext.java
+++ b/core/runtime/src/main/java/org/apache/isis/runtime/system/context/session/RuntimeContext.java
@@ -41,7 +41,7 @@ import org.apache.isis.security.authentication.AuthenticationSession;
 public interface RuntimeContext {
 
     AuthenticationSession getAuthenticationSession();
-    IsisConfigurationLegacy getConfiguration();
+    IsisConfigurationLegacy getConfigurationLegacy();
     SpecificationLoader getSpecificationLoader();
     ServiceInjector getServiceInjector();
     ServiceRegistry getServiceRegistry();
diff --git a/core/runtime/src/main/java/org/apache/isis/runtime/system/context/session/RuntimeContextBase.java b/core/runtime/src/main/java/org/apache/isis/runtime/system/context/session/RuntimeContextBase.java
index aaabad5..563d641 100644
--- a/core/runtime/src/main/java/org/apache/isis/runtime/system/context/session/RuntimeContextBase.java
+++ b/core/runtime/src/main/java/org/apache/isis/runtime/system/context/session/RuntimeContextBase.java
@@ -54,7 +54,7 @@ public abstract class RuntimeContextBase implements RuntimeContext {
 
     // -- FINAL FIELDS
 
-    @Getter protected final IsisConfigurationLegacy configuration;
+    @Getter protected final IsisConfigurationLegacy configurationLegacy;
     @Getter protected final ServiceInjector serviceInjector;
     @Getter protected final ServiceRegistry serviceRegistry;
     @Getter protected final SpecificationLoader specificationLoader;
@@ -67,7 +67,7 @@ public abstract class RuntimeContextBase implements RuntimeContext {
 
     protected RuntimeContextBase() {
         val mmc = MetaModelContext.current();
-        configuration = mmc.getConfigurationLegacy();
+        configurationLegacy = mmc.getConfigurationLegacy();
         serviceInjector = mmc.getServiceInjector();
         serviceRegistry = mmc.getServiceRegistry();
         specificationLoader = mmc.getSpecificationLoader();
diff --git a/core/viewer-restfulobjects/rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/domainobjects/ObjectActionReprRenderer.java b/core/viewer-restfulobjects/rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/domainobjects/ObjectActionReprRenderer.java
index b656cbd..c191101 100644
--- a/core/viewer-restfulobjects/rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/domainobjects/ObjectActionReprRenderer.java
+++ b/core/viewer-restfulobjects/rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/domainobjects/ObjectActionReprRenderer.java
@@ -138,7 +138,7 @@ public class ObjectActionReprRenderer extends AbstractObjectMemberReprRenderer<O
     // ///////////////////////////////////////////////////
 
     private ObjectActionReprRenderer addParameterDetails() {
-        boolean gsoc2013 = getRendererContext().getConfiguration().getBoolean("isis.viewer.restfulobjects.gsoc2013.legacyParamDetails", false);
+        boolean gsoc2013 = getRendererContext().getConfigurationLegacy().getBoolean("isis.viewer.restfulobjects.gsoc2013.legacyParamDetails", false);
         if(gsoc2013) {
             final List<Object> parameters = _Lists.newArrayList();
             for (int i = 0; i < objectMember.getParameterCount(); i++) {
diff --git a/core/viewer-restfulobjects/server/src/main/java/org/apache/isis/viewer/restfulobjects/server/ResourceContext.java b/core/viewer-restfulobjects/server/src/main/java/org/apache/isis/viewer/restfulobjects/server/ResourceContext.java
index 2caab9f..a6bc036 100644
--- a/core/viewer-restfulobjects/server/src/main/java/org/apache/isis/viewer/restfulobjects/server/ResourceContext.java
+++ b/core/viewer-restfulobjects/server/src/main/java/org/apache/isis/viewer/restfulobjects/server/ResourceContext.java
@@ -231,42 +231,42 @@ public class ResourceContext extends RuntimeContextBase implements RendererConte
 
     @Override
     public boolean honorUiHints() {
-        return getConfiguration().getBoolean("isis.viewer.restfulobjects.honorUiHints", HONOR_UI_HINTS_DEFAULT);
+        return getConfigurationLegacy().getBoolean("isis.viewer.restfulobjects.honorUiHints", HONOR_UI_HINTS_DEFAULT);
     }
 
     @Override
     public boolean objectPropertyValuesOnly() {
-        return getConfiguration().getBoolean("isis.viewer.restfulobjects.objectPropertyValuesOnly", OBJECT_PROPERTY_VALUES_ONLY_DEFAULT);
+        return getConfigurationLegacy().getBoolean("isis.viewer.restfulobjects.objectPropertyValuesOnly", OBJECT_PROPERTY_VALUES_ONLY_DEFAULT);
     }
 
     @Override
     public boolean suppressDescribedByLinks() {
-        return getConfiguration().getBoolean("isis.viewer.restfulobjects.suppressDescribedByLinks", SUPPRESS_DESCRIBED_BY_LINKS_DEFAULT);
+        return getConfigurationLegacy().getBoolean("isis.viewer.restfulobjects.suppressDescribedByLinks", SUPPRESS_DESCRIBED_BY_LINKS_DEFAULT);
     }
 
     @Override
     public boolean suppressUpdateLink() {
-        return getConfiguration().getBoolean("isis.viewer.restfulobjects.suppressUpdateLink", SUPPRESS_UPDATE_LINK_DEFAULT);
+        return getConfigurationLegacy().getBoolean("isis.viewer.restfulobjects.suppressUpdateLink", SUPPRESS_UPDATE_LINK_DEFAULT);
     }
 
     @Override
     public boolean suppressMemberId() {
-        return getConfiguration().getBoolean("isis.viewer.restfulobjects.suppressMemberId", SUPPRESS_MEMBER_ID_DEFAULT);
+        return getConfigurationLegacy().getBoolean("isis.viewer.restfulobjects.suppressMemberId", SUPPRESS_MEMBER_ID_DEFAULT);
     }
 
     @Override
     public boolean suppressMemberLinks() {
-        return getConfiguration().getBoolean("isis.viewer.restfulobjects.suppressMemberLinks", SUPPRESS_MEMBER_LINKS_DEFAULT);
+        return getConfigurationLegacy().getBoolean("isis.viewer.restfulobjects.suppressMemberLinks", SUPPRESS_MEMBER_LINKS_DEFAULT);
     }
 
     @Override
     public boolean suppressMemberExtensions() {
-        return getConfiguration().getBoolean("isis.viewer.restfulobjects.suppressMemberExtensions", SUPPRESS_MEMBER_EXTENSIONS_DEFAULT);
+        return getConfigurationLegacy().getBoolean("isis.viewer.restfulobjects.suppressMemberExtensions", SUPPRESS_MEMBER_EXTENSIONS_DEFAULT);
     }
 
     @Override
     public boolean suppressMemberDisabledReason() {
-        return getConfiguration().getBoolean("isis.viewer.restfulobjects.suppressMemberDisabledReason", SUPPRESS_MEMBER_DISABLED_REASON_DEFAULT);
+        return getConfigurationLegacy().getBoolean("isis.viewer.restfulobjects.suppressMemberDisabledReason", SUPPRESS_MEMBER_DISABLED_REASON_DEFAULT);
     }
 
     @Override
diff --git a/core/viewer-restfulobjects/server/src/main/java/org/apache/isis/viewer/restfulobjects/server/resources/DomainResourceHelper.java b/core/viewer-restfulobjects/server/src/main/java/org/apache/isis/viewer/restfulobjects/server/resources/DomainResourceHelper.java
index cb848fb..9b3d809 100644
--- a/core/viewer-restfulobjects/server/src/main/java/org/apache/isis/viewer/restfulobjects/server/resources/DomainResourceHelper.java
+++ b/core/viewer-restfulobjects/server/src/main/java/org/apache/isis/viewer/restfulobjects/server/resources/DomainResourceHelper.java
@@ -87,8 +87,8 @@ class DomainResourceHelper {
         }
 
         @Override
-        public IsisConfigurationLegacy getConfiguration() {
-            return rendererContext.getConfiguration();
+        public IsisConfigurationLegacy getConfigurationLegacy() {
+            return rendererContext.getConfigurationLegacy();
         }
 
         @Override


[isis] 01/04: ISIS-2086: refactors 'isis.service.email.*' (about a dozen of them) to type-safe config

Posted by da...@apache.org.
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 bf14d5f91c3323a27360d9918c04e23f0b492f01
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Sep 30 08:26:10 2019 +0100

    ISIS-2086: refactors 'isis.service.email.*' (about a dozen of them) to type-safe config
---
 .../org/apache/isis/config/IsisConfiguration.java  | 44 +++++++++++++++++
 .../services/email/EmailServiceDefault.java        | 56 ++++++----------------
 2 files changed, 59 insertions(+), 41 deletions(-)

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 935ba60..14d3dd6 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
@@ -295,6 +295,50 @@ public class IsisConfiguration {
         }
     }
 
+    private final Service service = new Service();
+    @Data
+    public static class Service {
+        // isis.service.email.sender.username
+        // isis.service.email.sender.address
+        // isis.service.email.sender.password
+        // isis.service.email.sender.hostname
+        // isis.service.email.port
+        // isis.service.email.socketTimeout
+        // isis.service.email.socketConnectionTimeout
+        // isis.service.email.tls.enabled
+        // isis.service.email.throwExceptionOnFail
+        // isis.service.email.override.to
+        // isis.service.email.override.cc
+        // isis.service.email.override.bcc
+        private final Email email = new Email();
+        @Data
+        public static class Email {
+            private int port = 587;
+            private int socketConnectionTimeout = 2000;
+            private int socketTimeout = 2000;
+            private boolean throwExceptionOnFail = true;
+            private final Override override = new Override();
+            @Data
+            public static class Override {
+                private String to;
+                private String cc;
+                private String bcc;
+            }
+            private final Sender sender = new Sender();
+            @Data
+            public static class Sender {
+                private String username;
+                private String address;
+                private String password;
+                private String hostname;
+            }
+            private final Tls tls = new Tls();
+            @Data
+            public static class Tls {
+                private boolean enabled = true;
+            }
+        }
+    }
     private final Services services = new Services();
     @Data
     public static class Services {
diff --git a/core/runtime-services/src/main/java/org/apache/isis/runtime/services/email/EmailServiceDefault.java b/core/runtime-services/src/main/java/org/apache/isis/runtime/services/email/EmailServiceDefault.java
index 5cf403a..449ee2d 100644
--- a/core/runtime-services/src/main/java/org/apache/isis/runtime/services/email/EmailServiceDefault.java
+++ b/core/runtime-services/src/main/java/org/apache/isis/runtime/services/email/EmailServiceDefault.java
@@ -35,6 +35,7 @@ import org.apache.isis.applib.annotation.DomainService;
 import org.apache.isis.applib.annotation.NatureOfService;
 import org.apache.isis.applib.services.email.EmailService;
 import org.apache.isis.commons.internal.base._Strings;
+import org.apache.isis.config.IsisConfiguration;
 import org.apache.isis.config.IsisConfigurationLegacy;
 
 import lombok.extern.log4j.Log4j2;
@@ -56,34 +57,6 @@ public class EmailServiceDefault implements EmailService {
         }
     }
 
-    // -- CONSTANTS
-
-    private static final String ISIS_SERVICE_EMAIL_SENDER_USERNAME = "isis.service.email.sender.username";
-    private static final String ISIS_SERVICE_EMAIL_SENDER_ADDRESS = "isis.service.email.sender.address";
-    private static final String ISIS_SERVICE_EMAIL_SENDER_PASSWORD = "isis.service.email.sender.password";
-
-    private static final String ISIS_SERVICE_EMAIL_SENDER_HOSTNAME = "isis.service.email.sender.hostname";
-    private static final String ISIS_SERVICE_EMAIL_SENDER_HOSTNAME_DEFAULT = "smtp.gmail.com";
-
-    private static final String ISIS_SERVICE_EMAIL_PORT = "isis.service.email.port";
-    private static final int ISIS_SERVICE_EMAIL_PORT_DEFAULT = 587;
-
-    private static final String ISIS_SERVICE_EMAIL_TLS_ENABLED = "isis.service.email.tls.enabled";
-    private static final boolean ISIS_SERVICE_EMAIL_TLS_ENABLED_DEFAULT = true;
-
-    private static final String ISIS_SERVICE_EMAIL_THROW_EXCEPTION_ON_FAIL = "isis.service.email.throwExceptionOnFail";
-    private static final boolean ISIS_SERVICE_EMAIL_THROW_EXCEPTION_ON_FAIL_DEFAULT = true;
-
-    private static final String ISIS_SERVICE_EMAIL_SOCKET_TIMEOUT = "isis.service.email.socketTimeout";
-    private static final int ISIS_SERVICE_EMAIL_SOCKET_TIMEOUT_DEFAULT = 2000;
-
-    private static final String ISIS_SERVICE_EMAIL_SOCKET_CONNECTION_TIMEOUT = "isis.service.email.socketConnectionTimeout";
-    private static final int ISIS_SERVICE_EMAIL_SOCKET_CONNECTION_TIMEOUT_DEFAULT = 2000;
-
-    private static final String ISIS_SERVICE_EMAIL_OVERRIDE_TO = "isis.service.email.override.to";
-    private static final String ISIS_SERVICE_EMAIL_OVERRIDE_CC = "isis.service.email.override.cc";
-    private static final String ISIS_SERVICE_EMAIL_OVERRIDE_BCC = "isis.service.email.override.bcc";
-
     // -- INIT
 
     private boolean initialized;
@@ -109,51 +82,51 @@ public class EmailServiceDefault implements EmailService {
     }
 
     protected String getSenderEmailUsername() {
-        return configuration.getString(ISIS_SERVICE_EMAIL_SENDER_USERNAME);
+        return configuration.getService().getEmail().getSender().getUsername();
     }
 
     protected String getSenderEmailAddress() {
-        return configuration.getString(ISIS_SERVICE_EMAIL_SENDER_ADDRESS);
+        return configuration.getService().getEmail().getSender().getAddress();
     }
 
     protected String getSenderEmailPassword() {
-        return configuration.getString(ISIS_SERVICE_EMAIL_SENDER_PASSWORD);
+        return configuration.getService().getEmail().getSender().getPassword();
     }
 
     protected String getSenderEmailHostName() {
-        return configuration.getString(ISIS_SERVICE_EMAIL_SENDER_HOSTNAME, ISIS_SERVICE_EMAIL_SENDER_HOSTNAME_DEFAULT);
+        return configuration.getService().getEmail().getSender().getHostname();
     }
 
     protected Integer getSenderEmailPort() {
-        return configuration.getInteger(ISIS_SERVICE_EMAIL_PORT, ISIS_SERVICE_EMAIL_PORT_DEFAULT);
+        return configuration.getService().getEmail().getPort();
     }
 
     protected Boolean getSenderEmailTlsEnabled() {
-        return configuration.getBoolean(ISIS_SERVICE_EMAIL_TLS_ENABLED, ISIS_SERVICE_EMAIL_TLS_ENABLED_DEFAULT);
+        return configuration.getService().getEmail().getTls().isEnabled();
     }
 
     protected Boolean isThrowExceptionOnFail() {
-        return configuration.getBoolean(ISIS_SERVICE_EMAIL_THROW_EXCEPTION_ON_FAIL, ISIS_SERVICE_EMAIL_THROW_EXCEPTION_ON_FAIL_DEFAULT);
+        return configuration.getService().getEmail().isThrowExceptionOnFail();
     }
 
     protected int getSocketTimeout() {
-        return configuration.getInteger(ISIS_SERVICE_EMAIL_SOCKET_TIMEOUT, ISIS_SERVICE_EMAIL_SOCKET_TIMEOUT_DEFAULT);
+        return configuration.getService().getEmail().getSocketTimeout();
     }
 
     protected int getSocketConnectionTimeout() {
-        return configuration.getInteger(ISIS_SERVICE_EMAIL_SOCKET_CONNECTION_TIMEOUT, ISIS_SERVICE_EMAIL_SOCKET_CONNECTION_TIMEOUT_DEFAULT);
+        return configuration.getService().getEmail().getSocketConnectionTimeout();
     }
 
     protected String getEmailOverrideTo() {
-        return configuration.getString(ISIS_SERVICE_EMAIL_OVERRIDE_TO);
+        return configuration.getService().getEmail().getOverride().getTo();
     }
 
     protected String getEmailOverrideCc() {
-        return configuration.getString(ISIS_SERVICE_EMAIL_OVERRIDE_CC);
+        return configuration.getService().getEmail().getOverride().getCc();
     }
 
     protected String getEmailOverrideBcc() {
-        return configuration.getString(ISIS_SERVICE_EMAIL_OVERRIDE_BCC);
+        return configuration.getService().getEmail().getOverride().getBcc();
     }
 
     @Override
@@ -260,6 +233,7 @@ public class EmailServiceDefault implements EmailService {
         return addresses != null && addresses.length > 0;
     }
 
-    @Inject IsisConfigurationLegacy configuration;
+    @Inject IsisConfigurationLegacy configurationLegacy;
+    @Inject IsisConfiguration configuration;
 
 }
\ No newline at end of file


[isis] 03/04: ISIS-2086: adds #getConfiguration back for RuntimeContextBase (RO)

Posted by da...@apache.org.
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 983654a2e78f09f0bf1181150cdf1f7ac4815eb1
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Sep 30 08:30:13 2019 +0100

    ISIS-2086: adds #getConfiguration back for RuntimeContextBase (RO)
---
 .../org/apache/isis/runtime/system/context/session/RuntimeContext.java | 2 ++
 .../apache/isis/runtime/system/context/session/RuntimeContextBase.java | 3 +++
 .../main/java/org/apache/isis/runtime/system/session/IsisSession.java  | 3 ++-
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/core/runtime/src/main/java/org/apache/isis/runtime/system/context/session/RuntimeContext.java b/core/runtime/src/main/java/org/apache/isis/runtime/system/context/session/RuntimeContext.java
index 1b00abc..55d894c 100644
--- a/core/runtime/src/main/java/org/apache/isis/runtime/system/context/session/RuntimeContext.java
+++ b/core/runtime/src/main/java/org/apache/isis/runtime/system/context/session/RuntimeContext.java
@@ -20,6 +20,7 @@ package org.apache.isis.runtime.system.context.session;
 
 import org.apache.isis.applib.services.inject.ServiceInjector;
 import org.apache.isis.applib.services.registry.ServiceRegistry;
+import org.apache.isis.config.IsisConfiguration;
 import org.apache.isis.config.IsisConfigurationLegacy;
 import org.apache.isis.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.metamodel.adapter.oid.Oid;
@@ -41,6 +42,7 @@ import org.apache.isis.security.authentication.AuthenticationSession;
 public interface RuntimeContext {
 
     AuthenticationSession getAuthenticationSession();
+    IsisConfiguration getConfiguration();
     IsisConfigurationLegacy getConfigurationLegacy();
     SpecificationLoader getSpecificationLoader();
     ServiceInjector getServiceInjector();
diff --git a/core/runtime/src/main/java/org/apache/isis/runtime/system/context/session/RuntimeContextBase.java b/core/runtime/src/main/java/org/apache/isis/runtime/system/context/session/RuntimeContextBase.java
index 563d641..cc8a80f 100644
--- a/core/runtime/src/main/java/org/apache/isis/runtime/system/context/session/RuntimeContextBase.java
+++ b/core/runtime/src/main/java/org/apache/isis/runtime/system/context/session/RuntimeContextBase.java
@@ -24,6 +24,7 @@ import org.apache.isis.applib.services.inject.ServiceInjector;
 import org.apache.isis.applib.services.registry.ServiceRegistry;
 import org.apache.isis.applib.services.xactn.TransactionService;
 import org.apache.isis.commons.internal.base._Lazy;
+import org.apache.isis.config.IsisConfiguration;
 import org.apache.isis.config.IsisConfigurationLegacy;
 import org.apache.isis.metamodel.MetaModelContext;
 import org.apache.isis.metamodel.adapter.ObjectAdapter;
@@ -54,6 +55,7 @@ public abstract class RuntimeContextBase implements RuntimeContext {
 
     // -- FINAL FIELDS
 
+    @Getter protected final IsisConfiguration configuration;
     @Getter protected final IsisConfigurationLegacy configurationLegacy;
     @Getter protected final ServiceInjector serviceInjector;
     @Getter protected final ServiceRegistry serviceRegistry;
@@ -67,6 +69,7 @@ public abstract class RuntimeContextBase implements RuntimeContext {
 
     protected RuntimeContextBase() {
         val mmc = MetaModelContext.current();
+        configuration = mmc.getConfiguration();
         configurationLegacy = mmc.getConfigurationLegacy();
         serviceInjector = mmc.getServiceInjector();
         serviceRegistry = mmc.getServiceRegistry();
diff --git a/core/runtime/src/main/java/org/apache/isis/runtime/system/session/IsisSession.java b/core/runtime/src/main/java/org/apache/isis/runtime/system/session/IsisSession.java
index 243efe4..21149f8 100644
--- a/core/runtime/src/main/java/org/apache/isis/runtime/system/session/IsisSession.java
+++ b/core/runtime/src/main/java/org/apache/isis/runtime/system/session/IsisSession.java
@@ -63,7 +63,8 @@ public class IsisSession extends RuntimeContextBase {
             final RuntimeEventService runtimeEventService,
             final AuthenticationSession authenticationSession) {
 
-        super(IsisContext.getConfigurationLegacy(),
+        super(  IsisContext.getConfiguration(),
+                IsisContext.getConfigurationLegacy(),
                 IsisContext.getServiceInjector(),
                 IsisContext.getServiceRegistry(),
                 IsisContext.getSpecificationLoader(),