Drop unused POJO model classes. 95/495/2
authorLott, Christopher (cl778h) <cl778h@att.com>
Wed, 10 Jul 2019 14:27:26 +0000 (10:27 -0400)
committerLott, Christopher (cl778h) <cl778h@att.com>
Wed, 10 Jul 2019 17:26:37 +0000 (13:26 -0400)
The model classes supported early pendulum demos.
Correct imports in AcXappControllerTest class.

Change-Id: Id2bb5efc023cfe3ad233aca1ff89b0032373d24b
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/DashboardUser.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/DelayTransport.java [deleted file]
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/E2SetupRequestType.java [deleted file]
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/LoadTransport.java [deleted file]
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/MetricsTransport.java [deleted file]
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/PathTransport.java [deleted file]
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/RanDetailsTransport.java
webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/test/controller/AcXappControllerTest.java

index 37186ae..90c2edd 100644 (file)
@@ -23,8 +23,6 @@
  */
 package org.oransc.ric.portal.dashboard.model;
 
-import java.util.Objects;
-
 public class DashboardUser {
 
        private long id;
@@ -74,28 +72,4 @@ public class DashboardUser {
                this.status = status;
        }
 
-       @Override
-       public int hashCode() {
-               final int prime = 31;
-               int result = 1;
-               result = prime * result + ((firstName == null) ? 0 : firstName.hashCode());
-               result = prime * result + (int) (id ^ (id >>> 32));
-               result = prime * result + ((lastName == null) ? 0 : lastName.hashCode());
-               result = prime * result + ((status == null) ? 0 : status.hashCode());
-               return result;
-       }
-
-       @Override
-       public boolean equals(Object obj) {
-               if (this == obj)
-                       return true;
-               if (obj == null)
-                       return false;
-               if (getClass() != obj.getClass())
-                       return false;
-               DashboardUser other = (DashboardUser) obj;
-               return Objects.equals(id, other.id) && Objects.equals(firstName, other.firstName)
-                               && Objects.equals(lastName, other.lastName) && Objects.equals(status, other.status);
-       }
-
 }
diff --git a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/DelayTransport.java b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/DelayTransport.java
deleted file mode 100644 (file)
index 1e0db71..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*-
- * ========================LICENSE_START=================================
- * O-RAN-SC
- * %%
- * Copyright (C) 2019 AT&T Intellectual Property and Nokia
- * %%
- * Licensed 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.
- * ========================LICENSE_END===================================
- */
-
-package org.oransc.ric.portal.dashboard.model;
-
-/**
- * Trivial model to transport a number, to be serialized as JSON.
- */
-public class DelayTransport implements IDashboardResponse {
-
-       private Integer delay;
-
-       /**
-        * Builds an empty object.
-        */
-       public DelayTransport() {
-               // no-arg constructor
-       }
-
-       /**
-        * Builds an object with the specified value.
-        * 
-        * @param i
-        *              value to transport.
-        */
-       public DelayTransport(Integer i) {
-               this.delay = i;
-       }
-
-       public Integer getDelay() {
-               return delay;
-       }
-
-       public void setDelay(Integer i) {
-               this.delay = i;
-       }
-
-}
diff --git a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/E2SetupRequestType.java b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/E2SetupRequestType.java
deleted file mode 100644 (file)
index a8d822f..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*-
- * ========================LICENSE_START=================================
- * O-RAN-SC
- * %%
- * Copyright (C) 2019 AT&T Intellectual Property and Nokia
- * %%
- * Licensed 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.
- * ========================LICENSE_END===================================
- */
-
-package org.oransc.ric.portal.dashboard.model;
-
-public enum E2SetupRequestType {
-       ENDC, X2;
-}
diff --git a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/LoadTransport.java b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/LoadTransport.java
deleted file mode 100644 (file)
index 13f2057..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*-
- * ========================LICENSE_START=================================
- * O-RAN-SC
- * %%
- * Copyright (C) 2019 AT&T Intellectual Property and Nokia
- * %%
- * Licensed 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.
- * ========================LICENSE_END===================================
- */
-
-package org.oransc.ric.portal.dashboard.model;
-
-/**
- * Trivial model to transport a number, to be serialized as JSON.
- */
-public class LoadTransport implements IDashboardResponse {
-
-       public LoadTransport() {
-       }
-
-       public LoadTransport(Integer load) {
-               this.load = load;
-       }
-
-       private Integer load;
-
-       public Integer getLoad() {
-               return load;
-       }
-
-       public void setLoad(Integer i) {
-               this.load = i;
-       }
-
-}
diff --git a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/MetricsTransport.java b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/MetricsTransport.java
deleted file mode 100644 (file)
index ba0db05..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*-
- * ========================LICENSE_START=================================
- * O-RAN-SC
- * %%
- * Copyright (C) 2019 AT&T Intellectual Property and Nokia
- * %%
- * Licensed 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.
- * ========================LICENSE_END===================================
- */
-
-package org.oransc.ric.portal.dashboard.model;
-
-/**
- * Trivial model to transport a batch of numbers, to be serialized as JSON.
- */
-public class MetricsTransport implements IDashboardResponse {
-
-       private Integer latency;
-       private Integer load;
-       private Integer time;
-
-       public MetricsTransport() {
-       }
-
-       public MetricsTransport(Integer latency, Integer load, Integer time) {
-               this.latency = latency;
-               this.load = load;
-               this.time = time;
-       }
-
-       public Integer getLatency() {
-               return latency;
-       }
-
-       public void setLatency(Integer latency) {
-               this.latency = latency;
-       }
-
-       public Integer getLoad() {
-               return load;
-       }
-
-       public void setLoad(Integer load) {
-               this.load = load;
-       }
-
-       public Integer getTime() {
-               return time;
-       }
-
-       public void setTime(Integer time) {
-               this.time = time;
-       }
-
-}
diff --git a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/PathTransport.java b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/PathTransport.java
deleted file mode 100644 (file)
index 003260f..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*-
- * ========================LICENSE_START=================================
- * O-RAN-SC
- * %%
- * Copyright (C) 2019 AT&T Intellectual Property and Nokia
- * %%
- * Licensed 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.
- * ========================LICENSE_END===================================
- */
-
-package org.oransc.ric.portal.dashboard.model;
-
-/**
- * Trivial model to transport a path, to be serialized as JSON.
- */
-public class PathTransport implements IDashboardResponse {
-
-       private String path;
-
-       /**
-        * Builds an empty object.
-        */
-       public PathTransport() {
-               // no-arg constructor
-       }
-
-       /**
-        * Builds an object with the specified value.
-        * 
-        * @param s
-        *              value to transport.
-        */
-       public PathTransport(String s) {
-               this.path = s;
-       }
-
-       public String getPath() {
-               return path;
-       }
-
-       public void setPath(String s) {
-               this.path = s;
-       }
-
-}
index 1053cfc..1005ae2 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ========================LICENSE_END===================================
  */
-
 package org.oransc.ric.portal.dashboard.model;
 
 import org.oransc.ric.e2mgr.client.model.GetNodebResponse;
@@ -62,37 +61,4 @@ public class RanDetailsTransport {
                return this;
        }
 
-       @Override
-       public int hashCode() {
-               final int prime = 31;
-               int result = 1;
-               result = prime * result + ((nodebIdentity == null) ? 0 : nodebIdentity.hashCode());
-               result = prime * result + ((nodebStatus == null) ? 0 : nodebStatus.hashCode());
-               return result;
-       }
-
-       @Override
-       public boolean equals(Object obj) {
-               if (this == obj)
-                       return true;
-               if (obj == null)
-                       return false;
-               if (getClass() != obj.getClass())
-                       return false;
-               RanDetailsTransport other = (RanDetailsTransport) obj;
-               if (nodebIdentity == null) {
-                       if (other.nodebIdentity != null)
-                               return false;
-               } else if (!nodebIdentity.equals(other.nodebIdentity)) {
-                       return false;
-               }
-               if (nodebStatus == null) {
-                       if (other.nodebStatus != null)
-                               return false;
-               } else if (!nodebStatus.equals(other.nodebStatus)) {
-                       return false;
-               }
-               return true;
-       }
-
 }
index faad53b..f0ba8b5 100644 (file)
@@ -22,9 +22,9 @@ package org.oransc.ric.portal.dashboard.test.controller;
 import java.io.IOException;
 import java.lang.invoke.MethodHandles;
 import java.net.URI;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
-import org.junit.Assert;
-import org.junit.Test;
 import org.oransc.ric.portal.dashboard.controller.AcXappController;
 import org.oransc.ric.portal.dashboard.model.SuccessTransport;
 import org.slf4j.Logger;
@@ -45,7 +45,7 @@ public class AcXappControllerTest extends AbstractControllerTest {
                URI uri = buildUri(null, AcXappController.CONTROLLER_PATH, AcXappController.VERSION_METHOD);
                logger.info("Invoking {}", uri);
                SuccessTransport st = restTemplate.getForObject(uri, SuccessTransport.class);
-               Assert.assertFalse(st.getData().toString().isEmpty());
+               Assertions.assertFalse(st.getData().toString().isEmpty());
        }
 
        @Test
@@ -54,7 +54,7 @@ public class AcXappControllerTest extends AbstractControllerTest {
                URI uri = buildUri(null, AcXappController.CONTROLLER_PATH, AcXappController.ADMCTRL_METHOD);
                logger.info("Invoking {}", uri);
                ResponseEntity<String> response = restTemplate.exchange(uri, HttpMethod.GET, null, String.class);
-               Assert.assertTrue(response.getStatusCode().is5xxServerError());
+               Assertions.assertTrue(response.getStatusCode().is5xxServerError());
        }
 
        @Test
@@ -65,7 +65,7 @@ public class AcXappControllerTest extends AbstractControllerTest {
                HttpEntity<JsonNode> entity = new HttpEntity<>(body);
                logger.info("Invoking {}", uri);
                ResponseEntity<Void> voidResponse = restTemplate.exchange(uri, HttpMethod.PUT, entity, Void.class);
-               Assert.assertTrue(voidResponse.getStatusCode().is2xxSuccessful());
+               Assertions.assertTrue(voidResponse.getStatusCode().is2xxSuccessful());
        }
 
 }