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 2018/09/20 05:18:19 UTC

[isis] 03/03: ISIS-1895: remove deprecated deployment types SERVER_EXPLORATION, UNIT_TESTING

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

ahuber pushed a commit to branch v2
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 0b64abc8421d0d519c28df2ef32e21650dc12cf2
Author: Andi Huber <ah...@apache.org>
AuthorDate: Thu Sep 20 06:50:26 2018 +0200

    ISIS-1895: remove deprecated deployment types SERVER_EXPLORATION,
    UNIT_TESTING
    
    Task-Url: https://issues.apache.org/jira/browse/ISIS-1895
---
 .../main/java/org/apache/isis/core/runtime/runner/Constants.java  | 1 -
 .../java/org/apache/isis/core/runtime/system/DeploymentType.java  | 2 --
 .../runtime/authentication/standard/AuthenticatorDefaultTest.java | 8 ++++----
 .../webserver/internal/OptionHandlerDeploymentTypeWebServer.java  | 3 +--
 4 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/Constants.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/Constants.java
index 51d7d0d..c1c55c0 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/Constants.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/Constants.java
@@ -29,7 +29,6 @@ public final class Constants {
 
     public static final String TYPE_OPT = "t";
     public static final String TYPE_LONG_OPT = "type";
-    public static final String TYPE_SERVER_EXPLORATION = DeploymentType.SERVER_EXPLORATION.friendlyName();
     public static final String TYPE_SERVER_PROTOTYPE = DeploymentType.SERVER_PROTOTYPE.friendlyName();
     public static final String TYPE_SERVER = DeploymentType.SERVER.friendlyName();
 
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/DeploymentType.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/DeploymentType.java
index d358eb7..dc2a652 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/DeploymentType.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/DeploymentType.java
@@ -32,9 +32,7 @@ public class DeploymentType {
     private static List<DeploymentType> deploymentTypes = _Lists.newArrayList();
 
     public static DeploymentType SERVER = new DeploymentType("SERVER", DeploymentCategory.PRODUCTION);
-    public static DeploymentType SERVER_EXPLORATION = new DeploymentType("SERVER_EXPLORATION", DeploymentCategory.EXPLORING);
     public static DeploymentType SERVER_PROTOTYPE = new DeploymentType("SERVER_PROTOTYPE", DeploymentCategory.PROTOTYPING);
-    public static DeploymentType UNIT_TESTING = new DeploymentType("UNIT_TESTING", DeploymentCategory.PRODUCTION);
 
     /**
      * Look up {@link DeploymentType} by their {@link #name()}.
diff --git a/core/runtime/src/test/java/org/apache/isis/core/runtime/authentication/standard/AuthenticatorDefaultTest.java b/core/runtime/src/test/java/org/apache/isis/core/runtime/authentication/standard/AuthenticatorDefaultTest.java
index 4f5b2ac..f05f8a5 100644
--- a/core/runtime/src/test/java/org/apache/isis/core/runtime/authentication/standard/AuthenticatorDefaultTest.java
+++ b/core/runtime/src/test/java/org/apache/isis/core/runtime/authentication/standard/AuthenticatorDefaultTest.java
@@ -19,6 +19,9 @@
 
 package org.apache.isis.core.runtime.authentication.standard;
 
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
 import org.jmock.Mockery;
 import org.jmock.integration.junit4.JMock;
 import org.jmock.integration.junit4.JUnit4Mockery;
@@ -31,9 +34,6 @@ import org.apache.isis.core.metamodel.deployment.DeploymentCategory;
 import org.apache.isis.core.runtime.authentication.AuthenticationRequest;
 import org.apache.isis.core.runtime.system.DeploymentType;
 
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
 @RunWith(JMock.class)
 public class AuthenticatorDefaultTest {
 
@@ -67,7 +67,7 @@ public class AuthenticatorDefaultTest {
 
     @Test
     public void getDeploymentCategory() throws Exception {
-        final DeploymentCategory deploymentCategory = DeploymentType.SERVER_EXPLORATION.getDeploymentCategory();
+        final DeploymentCategory deploymentCategory = DeploymentType.SERVER_PROTOTYPE.getDeploymentCategory();
         authenticator.init(deploymentCategory);
         assertThat(authenticator.getDeploymentCategory(), is(deploymentCategory));
     }
diff --git a/core/webserver/src/main/java/org/apache/isis/core/webserver/internal/OptionHandlerDeploymentTypeWebServer.java b/core/webserver/src/main/java/org/apache/isis/core/webserver/internal/OptionHandlerDeploymentTypeWebServer.java
index 9bddfb8..4a829ff 100644
--- a/core/webserver/src/main/java/org/apache/isis/core/webserver/internal/OptionHandlerDeploymentTypeWebServer.java
+++ b/core/webserver/src/main/java/org/apache/isis/core/webserver/internal/OptionHandlerDeploymentTypeWebServer.java
@@ -20,7 +20,6 @@
 package org.apache.isis.core.webserver.internal;
 
 import static org.apache.isis.core.runtime.runner.Constants.TYPE_SERVER;
-import static org.apache.isis.core.runtime.runner.Constants.TYPE_SERVER_EXPLORATION;
 import static org.apache.isis.core.runtime.runner.Constants.TYPE_SERVER_PROTOTYPE;
 
 import org.apache.isis.core.runtime.runner.opts.OptionHandlerDeploymentType;
@@ -28,7 +27,7 @@ import org.apache.isis.core.runtime.system.DeploymentType;
 
 public class OptionHandlerDeploymentTypeWebServer extends OptionHandlerDeploymentType {
 
-    private static final String TYPES = TYPE_SERVER_EXPLORATION + "; " + TYPE_SERVER_PROTOTYPE + " (default); " + TYPE_SERVER;
+    private static final String TYPES = TYPE_SERVER_PROTOTYPE + " (default); " + TYPE_SERVER;
 
     public OptionHandlerDeploymentTypeWebServer() {
         super(DeploymentType.SERVER_PROTOTYPE, TYPES);