Refactor ErrorLogHelper 61/136861/18
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Tue, 19 Dec 2023 10:55:44 +0000 (11:55 +0100)
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Fri, 22 Dec 2023 14:11:57 +0000 (15:11 +0100)
commit03c062dc0d583fff34c17801e1d46a72dfe4c831
tree8b7a6f78f5cbcd2f4cb4b064f076f021ef9fbd67
parentd5a889f9661e89289344ed736600bc7222095379
Refactor ErrorLogHelper

- change is designed to not make any changes to the serialised objects [1]
- introduce common error response object that is used for both service and policy, xml + json format
- separate creation of error response and the marshalling of it
- increase test coverage
- use jackson object mappers for marshalling json and xml objects instead of custom MapperUtil
- make code more functional
- use more descriptive variable names

[1] only the internal representation changes to account for both
Service- and PolicyException

Issue-ID: AAI-3695
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Change-Id: I1e82bf4f0706704679d14aac98969fa00beed758
30 files changed:
aai-core/src/test/java/org/onap/aai/domain/restPolicyException/PolicyExceptionTest.java [deleted file]
aai-core/src/test/java/org/onap/aai/domain/restPolicyException/RequestErrorTest.java [deleted file]
aai-els-onap-logging/pom.xml
aai-els-onap-logging/src/main/java/org/onap/aai/domain/errorResponse/ErrorMessage.java [new file with mode: 0644]
aai-els-onap-logging/src/main/java/org/onap/aai/domain/errorResponse/ExceptionType.java [new file with mode: 0644]
aai-els-onap-logging/src/main/java/org/onap/aai/domain/errorResponse/Fault.java [new file with mode: 0644]
aai-els-onap-logging/src/main/java/org/onap/aai/domain/errorResponse/Info.java [new file with mode: 0644]
aai-els-onap-logging/src/main/java/org/onap/aai/domain/errorResponse/PolicyException.java [new file with mode: 0644]
aai-els-onap-logging/src/main/java/org/onap/aai/domain/errorResponse/PolicyFault.java [new file with mode: 0644]
aai-els-onap-logging/src/main/java/org/onap/aai/domain/errorResponse/RequestError.java [new file with mode: 0644]
aai-els-onap-logging/src/main/java/org/onap/aai/domain/errorResponse/ServiceException.java [new file with mode: 0644]
aai-els-onap-logging/src/main/java/org/onap/aai/domain/errorResponse/ServiceFault.java [new file with mode: 0644]
aai-els-onap-logging/src/main/java/org/onap/aai/domain/restPolicyException/Fault.java [deleted file]
aai-els-onap-logging/src/main/java/org/onap/aai/domain/restPolicyException/ObjectFactory.java [deleted file]
aai-els-onap-logging/src/main/java/org/onap/aai/domain/restPolicyException/PolicyException.java [deleted file]
aai-els-onap-logging/src/main/java/org/onap/aai/domain/restPolicyException/RESTResponse.java [deleted file]
aai-els-onap-logging/src/main/java/org/onap/aai/domain/restPolicyException/RequestError.java [deleted file]
aai-els-onap-logging/src/main/java/org/onap/aai/domain/restResponseInfo/Info.java [deleted file]
aai-els-onap-logging/src/main/java/org/onap/aai/domain/restResponseInfo/ObjectFactory.java [deleted file]
aai-els-onap-logging/src/main/java/org/onap/aai/domain/restServiceException/Fault.java [deleted file]
aai-els-onap-logging/src/main/java/org/onap/aai/domain/restServiceException/ObjectFactory.java [deleted file]
aai-els-onap-logging/src/main/java/org/onap/aai/domain/restServiceException/RESTResponse.java [deleted file]
aai-els-onap-logging/src/main/java/org/onap/aai/domain/restServiceException/RequestError.java [deleted file]
aai-els-onap-logging/src/main/java/org/onap/aai/domain/restServiceException/ServiceException.java [deleted file]
aai-els-onap-logging/src/main/java/org/onap/aai/exceptions/AAIException.java
aai-els-onap-logging/src/main/java/org/onap/aai/logging/ErrorLogHelper.java
aai-els-onap-logging/src/test/java/org/onap/aai/domain/restResponseInfo/InfoTest.java [deleted file]
aai-els-onap-logging/src/test/java/org/onap/aai/domain/restResponseInfo/ObjectFactoryTest.java [deleted file]
aai-els-onap-logging/src/test/java/org/onap/aai/logging/ErrorLogHelperTest.java
aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockRestClient.java