From d546f1b781416976a34d7123e97d1fe5dbfde8df Mon Sep 17 00:00:00 2001 From: Lars Johansson <lars.johansson@ess.eu> Date: Mon, 21 Mar 2022 13:41:24 +0100 Subject: [PATCH] Move content to package rest.beans.response from util.response To package org.openepics.names.rest.beans.response From package org.openepics.names.util.response --- src/main/java/org/openepics/names/rest/api/v1/INames.java | 8 ++++---- .../java/org/openepics/names/rest/api/v1/IStructures.java | 8 ++++---- .../names/{util => rest/beans}/response/Response.java | 2 +- .../{util => rest/beans}/response/ResponseBoolean.java | 2 +- .../beans}/response/ResponseBooleanList.java | 2 +- .../names/{util => rest/beans}/response/ResponsePage.java | 2 +- .../beans}/response/ResponsePageNameElements.java | 2 +- .../beans}/response/ResponsePageStructureElements.java | 2 +- .../rest/controller/GlobalControllerExceptionHandler.java | 2 +- .../openepics/names/rest/controller/NamesController.java | 8 ++++---- .../names/rest/controller/StructuresController.java | 8 ++++---- .../java/org/openepics/names/service/NamesService.java | 2 +- .../org/openepics/names/service/StructuresService.java | 2 +- src/test/java/org/openepics/names/docker/ITUtil.java | 6 +++--- .../org/openepics/names/docker/ITUtilNameElement.java | 6 +++--- .../openepics/names/docker/ITUtilStructureElement.java | 6 +++--- 16 files changed, 34 insertions(+), 34 deletions(-) rename src/main/java/org/openepics/names/{util => rest/beans}/response/Response.java (98%) rename src/main/java/org/openepics/names/{util => rest/beans}/response/ResponseBoolean.java (97%) rename src/main/java/org/openepics/names/{util => rest/beans}/response/ResponseBooleanList.java (98%) rename src/main/java/org/openepics/names/{util => rest/beans}/response/ResponsePage.java (98%) rename src/main/java/org/openepics/names/{util => rest/beans}/response/ResponsePageNameElements.java (98%) rename src/main/java/org/openepics/names/{util => rest/beans}/response/ResponsePageStructureElements.java (98%) diff --git a/src/main/java/org/openepics/names/rest/api/v1/INames.java b/src/main/java/org/openepics/names/rest/api/v1/INames.java index bd9f7b86..3f1b539e 100644 --- a/src/main/java/org/openepics/names/rest/api/v1/INames.java +++ b/src/main/java/org/openepics/names/rest/api/v1/INames.java @@ -22,10 +22,10 @@ import java.util.List; import org.openepics.names.rest.beans.FieldName; import org.openepics.names.rest.beans.NameElement; -import org.openepics.names.util.response.Response; -import org.openepics.names.util.response.ResponseBoolean; -import org.openepics.names.util.response.ResponseBooleanList; -import org.openepics.names.util.response.ResponsePageNameElements; +import org.openepics.names.rest.beans.response.Response; +import org.openepics.names.rest.beans.response.ResponseBoolean; +import org.openepics.names.rest.beans.response.ResponseBooleanList; +import org.openepics.names.rest.beans.response.ResponsePageNameElements; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PutMapping; diff --git a/src/main/java/org/openepics/names/rest/api/v1/IStructures.java b/src/main/java/org/openepics/names/rest/api/v1/IStructures.java index 3b6917fe..a6104f92 100644 --- a/src/main/java/org/openepics/names/rest/api/v1/IStructures.java +++ b/src/main/java/org/openepics/names/rest/api/v1/IStructures.java @@ -24,10 +24,10 @@ import org.openepics.names.rest.beans.FieldStructure; import org.openepics.names.rest.beans.Status; import org.openepics.names.rest.beans.StructureElement; import org.openepics.names.rest.beans.Type; -import org.openepics.names.util.response.Response; -import org.openepics.names.util.response.ResponseBoolean; -import org.openepics.names.util.response.ResponseBooleanList; -import org.openepics.names.util.response.ResponsePageStructureElements; +import org.openepics.names.rest.beans.response.Response; +import org.openepics.names.rest.beans.response.ResponseBoolean; +import org.openepics.names.rest.beans.response.ResponseBooleanList; +import org.openepics.names.rest.beans.response.ResponsePageStructureElements; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; diff --git a/src/main/java/org/openepics/names/util/response/Response.java b/src/main/java/org/openepics/names/rest/beans/response/Response.java similarity index 98% rename from src/main/java/org/openepics/names/util/response/Response.java rename to src/main/java/org/openepics/names/rest/beans/response/Response.java index 66297895..d095d30a 100644 --- a/src/main/java/org/openepics/names/util/response/Response.java +++ b/src/main/java/org/openepics/names/rest/beans/response/Response.java @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -package org.openepics.names.util.response; +package org.openepics.names.rest.beans.response; import org.springframework.http.HttpHeaders; diff --git a/src/main/java/org/openepics/names/util/response/ResponseBoolean.java b/src/main/java/org/openepics/names/rest/beans/response/ResponseBoolean.java similarity index 97% rename from src/main/java/org/openepics/names/util/response/ResponseBoolean.java rename to src/main/java/org/openepics/names/rest/beans/response/ResponseBoolean.java index a9f92e7d..bd839f57 100644 --- a/src/main/java/org/openepics/names/util/response/ResponseBoolean.java +++ b/src/main/java/org/openepics/names/rest/beans/response/ResponseBoolean.java @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -package org.openepics.names.util.response; +package org.openepics.names.rest.beans.response; /** * This class is used to ensure response to request origin are handled in a uniform way. diff --git a/src/main/java/org/openepics/names/util/response/ResponseBooleanList.java b/src/main/java/org/openepics/names/rest/beans/response/ResponseBooleanList.java similarity index 98% rename from src/main/java/org/openepics/names/util/response/ResponseBooleanList.java rename to src/main/java/org/openepics/names/rest/beans/response/ResponseBooleanList.java index f5e287e3..ea83217f 100644 --- a/src/main/java/org/openepics/names/util/response/ResponseBooleanList.java +++ b/src/main/java/org/openepics/names/rest/beans/response/ResponseBooleanList.java @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -package org.openepics.names.util.response; +package org.openepics.names.rest.beans.response; import java.util.List; diff --git a/src/main/java/org/openepics/names/util/response/ResponsePage.java b/src/main/java/org/openepics/names/rest/beans/response/ResponsePage.java similarity index 98% rename from src/main/java/org/openepics/names/util/response/ResponsePage.java rename to src/main/java/org/openepics/names/rest/beans/response/ResponsePage.java index 16e46389..36812787 100644 --- a/src/main/java/org/openepics/names/util/response/ResponsePage.java +++ b/src/main/java/org/openepics/names/rest/beans/response/ResponsePage.java @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -package org.openepics.names.util.response; +package org.openepics.names.rest.beans.response; /** * This class is used to ensure response to request origin are handled in a uniform way. diff --git a/src/main/java/org/openepics/names/util/response/ResponsePageNameElements.java b/src/main/java/org/openepics/names/rest/beans/response/ResponsePageNameElements.java similarity index 98% rename from src/main/java/org/openepics/names/util/response/ResponsePageNameElements.java rename to src/main/java/org/openepics/names/rest/beans/response/ResponsePageNameElements.java index b556ff4f..3e1845f9 100644 --- a/src/main/java/org/openepics/names/util/response/ResponsePageNameElements.java +++ b/src/main/java/org/openepics/names/rest/beans/response/ResponsePageNameElements.java @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -package org.openepics.names.util.response; +package org.openepics.names.rest.beans.response; import java.util.List; diff --git a/src/main/java/org/openepics/names/util/response/ResponsePageStructureElements.java b/src/main/java/org/openepics/names/rest/beans/response/ResponsePageStructureElements.java similarity index 98% rename from src/main/java/org/openepics/names/util/response/ResponsePageStructureElements.java rename to src/main/java/org/openepics/names/rest/beans/response/ResponsePageStructureElements.java index 72a6c6c8..18399234 100644 --- a/src/main/java/org/openepics/names/util/response/ResponsePageStructureElements.java +++ b/src/main/java/org/openepics/names/rest/beans/response/ResponsePageStructureElements.java @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -package org.openepics.names.util.response; +package org.openepics.names.rest.beans.response; import java.util.List; diff --git a/src/main/java/org/openepics/names/rest/controller/GlobalControllerExceptionHandler.java b/src/main/java/org/openepics/names/rest/controller/GlobalControllerExceptionHandler.java index bad26084..529d9be2 100644 --- a/src/main/java/org/openepics/names/rest/controller/GlobalControllerExceptionHandler.java +++ b/src/main/java/org/openepics/names/rest/controller/GlobalControllerExceptionHandler.java @@ -22,9 +22,9 @@ import java.util.logging.Level; import java.util.logging.Logger; import org.apache.commons.lang3.StringUtils; +import org.openepics.names.rest.beans.response.Response; import org.openepics.names.util.ExceptionUtil; import org.openepics.names.util.ServiceHttpStatusException; -import org.openepics.names.util.response.Response; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.ExceptionHandler; diff --git a/src/main/java/org/openepics/names/rest/controller/NamesController.java b/src/main/java/org/openepics/names/rest/controller/NamesController.java index c0871c6f..1589499e 100644 --- a/src/main/java/org/openepics/names/rest/controller/NamesController.java +++ b/src/main/java/org/openepics/names/rest/controller/NamesController.java @@ -25,14 +25,14 @@ import java.util.logging.Logger; import org.openepics.names.rest.api.v1.INames; import org.openepics.names.rest.beans.FieldName; import org.openepics.names.rest.beans.NameElement; +import org.openepics.names.rest.beans.response.Response; +import org.openepics.names.rest.beans.response.ResponseBoolean; +import org.openepics.names.rest.beans.response.ResponseBooleanList; +import org.openepics.names.rest.beans.response.ResponsePageNameElements; import org.openepics.names.service.NamesService; import org.openepics.names.util.ExceptionUtil; import org.openepics.names.util.LogUtil; import org.openepics.names.util.ServiceHttpStatusException; -import org.openepics.names.util.response.Response; -import org.openepics.names.util.response.ResponseBoolean; -import org.openepics.names.util.response.ResponseBooleanList; -import org.openepics.names.util.response.ResponsePageNameElements; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.http.HttpStatus; diff --git a/src/main/java/org/openepics/names/rest/controller/StructuresController.java b/src/main/java/org/openepics/names/rest/controller/StructuresController.java index 83f684a2..e9358465 100644 --- a/src/main/java/org/openepics/names/rest/controller/StructuresController.java +++ b/src/main/java/org/openepics/names/rest/controller/StructuresController.java @@ -27,14 +27,14 @@ import org.openepics.names.rest.beans.FieldStructure; import org.openepics.names.rest.beans.Status; import org.openepics.names.rest.beans.StructureElement; import org.openepics.names.rest.beans.Type; +import org.openepics.names.rest.beans.response.Response; +import org.openepics.names.rest.beans.response.ResponseBoolean; +import org.openepics.names.rest.beans.response.ResponseBooleanList; +import org.openepics.names.rest.beans.response.ResponsePageStructureElements; import org.openepics.names.service.StructuresService; import org.openepics.names.util.ExceptionUtil; import org.openepics.names.util.LogUtil; import org.openepics.names.util.ServiceHttpStatusException; -import org.openepics.names.util.response.Response; -import org.openepics.names.util.response.ResponseBoolean; -import org.openepics.names.util.response.ResponseBooleanList; -import org.openepics.names.util.response.ResponsePageStructureElements; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.http.HttpStatus; diff --git a/src/main/java/org/openepics/names/service/NamesService.java b/src/main/java/org/openepics/names/service/NamesService.java index d8141f78..6a2055ce 100644 --- a/src/main/java/org/openepics/names/service/NamesService.java +++ b/src/main/java/org/openepics/names/service/NamesService.java @@ -43,12 +43,12 @@ import org.openepics.names.repository.model.SystemGroup; import org.openepics.names.rest.beans.FieldName; import org.openepics.names.rest.beans.NameElement; import org.openepics.names.rest.beans.Status; +import org.openepics.names.rest.beans.response.ResponsePageNameElements; import org.openepics.names.util.EssNamingConvention; import org.openepics.names.util.HolderIRepositories; import org.openepics.names.util.HolderSystemDeviceStructure; import org.openepics.names.util.NameElementUtil; import org.openepics.names.util.ValidateUtil; -import org.openepics.names.util.response.ResponsePageNameElements; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Service; diff --git a/src/main/java/org/openepics/names/service/StructuresService.java b/src/main/java/org/openepics/names/service/StructuresService.java index 8cc888f8..1c8a2c65 100644 --- a/src/main/java/org/openepics/names/service/StructuresService.java +++ b/src/main/java/org/openepics/names/service/StructuresService.java @@ -52,6 +52,7 @@ import org.openepics.names.rest.beans.FieldStructure; import org.openepics.names.rest.beans.Status; import org.openepics.names.rest.beans.StructureElement; import org.openepics.names.rest.beans.Type; +import org.openepics.names.rest.beans.response.ResponsePageStructureElements; import org.openepics.names.util.EssNamingConvention; import org.openepics.names.util.HolderIRepositories; import org.openepics.names.util.HolderRepositories; @@ -59,7 +60,6 @@ import org.openepics.names.util.HolderSystemDeviceStructure; import org.openepics.names.util.StructureElementUtil; import org.openepics.names.util.StructureElementUtil.StructureChoice; import org.openepics.names.util.ValidateUtil; -import org.openepics.names.util.response.ResponsePageStructureElements; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/test/java/org/openepics/names/docker/ITUtil.java b/src/test/java/org/openepics/names/docker/ITUtil.java index 48368e9a..56c2a047 100644 --- a/src/test/java/org/openepics/names/docker/ITUtil.java +++ b/src/test/java/org/openepics/names/docker/ITUtil.java @@ -31,9 +31,9 @@ import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; -import org.openepics.names.util.response.Response; -import org.openepics.names.util.response.ResponseBoolean; -import org.openepics.names.util.response.ResponseBooleanList; +import org.openepics.names.rest.beans.response.Response; +import org.openepics.names.rest.beans.response.ResponseBoolean; +import org.openepics.names.rest.beans.response.ResponseBooleanList; /** * Utility class to help (Docker) integration tests for Naming and PostgreSQL. diff --git a/src/test/java/org/openepics/names/docker/ITUtilNameElement.java b/src/test/java/org/openepics/names/docker/ITUtilNameElement.java index 20034d2f..a433eb03 100644 --- a/src/test/java/org/openepics/names/docker/ITUtilNameElement.java +++ b/src/test/java/org/openepics/names/docker/ITUtilNameElement.java @@ -32,10 +32,10 @@ import org.openepics.names.docker.ITUtil.AuthorizationChoice; import org.openepics.names.docker.ITUtil.EndpointChoice; import org.openepics.names.rest.beans.NameElement; import org.openepics.names.rest.beans.Status; +import org.openepics.names.rest.beans.response.ResponseBoolean; +import org.openepics.names.rest.beans.response.ResponseBooleanList; +import org.openepics.names.rest.beans.response.ResponsePageNameElements; import org.openepics.names.util.EnumUtil.NameChoice; -import org.openepics.names.util.response.ResponseBoolean; -import org.openepics.names.util.response.ResponseBooleanList; -import org.openepics.names.util.response.ResponsePageNameElements; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/src/test/java/org/openepics/names/docker/ITUtilStructureElement.java b/src/test/java/org/openepics/names/docker/ITUtilStructureElement.java index 86d0967d..3f847044 100644 --- a/src/test/java/org/openepics/names/docker/ITUtilStructureElement.java +++ b/src/test/java/org/openepics/names/docker/ITUtilStructureElement.java @@ -33,10 +33,10 @@ import org.openepics.names.docker.ITUtil.EndpointChoice; import org.openepics.names.rest.beans.Status; import org.openepics.names.rest.beans.StructureElement; import org.openepics.names.rest.beans.Type; +import org.openepics.names.rest.beans.response.ResponseBoolean; +import org.openepics.names.rest.beans.response.ResponseBooleanList; +import org.openepics.names.rest.beans.response.ResponsePageStructureElements; import org.openepics.names.util.EnumUtil.StructureChoice; -import org.openepics.names.util.response.ResponseBoolean; -import org.openepics.names.util.response.ResponseBooleanList; -import org.openepics.names.util.response.ResponsePageStructureElements; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -- GitLab