Internal Server Error when creating the same data node twice 86/119986/5
authorniamhcore <niamh.core@est.tech>
Mon, 15 Mar 2021 15:54:12 +0000 (15:54 +0000)
committerniamhcore <niamh.core@est.tech>
Wed, 31 Mar 2021 12:30:09 +0000 (13:30 +0100)
commit22bcf714b12e21352c1b90ba72ffc65b0cf5d6e7
tree81cb5544bf317f264a7677c6ce614cf88ec16c1d
parent4663fd3a91ddee17393d6e4b1452213208ba5243
Internal Server Error when creating the same data node twice

Drop back to honolulu
This change adds a generic exception handler class for a already defined object and handles a JsonSyntaxException.

Issue-ID: CPS-290
Signed-off-by: niamhcore <niamh.core@est.tech>
Change-Id: Ie645237b5dd5b8e2b1d074c5613e7da560f57484
19 files changed:
cps-rest/src/main/java/org/onap/cps/rest/exceptions/CpsRestExceptionHandler.java
cps-rest/src/test/groovy/org/onap/cps/rest/controller/AdminRestControllerSpec.groovy
cps-rest/src/test/groovy/org/onap/cps/rest/controller/DataRestControllerSpec.groovy
cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy
cps-ri/src/main/java/org/onap/cps/spi/impl/CpsAdminPersistenceServiceImpl.java
cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java
cps-ri/src/main/java/org/onap/cps/spi/impl/CpsModulePersistenceServiceImpl.java
cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsAdminPersistenceServiceSpec.groovy
cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceServiceSpec.groovy
cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsModulePersistenceServiceSpec.groovy
cps-service/src/main/java/org/onap/cps/api/CpsAdminService.java
cps-service/src/main/java/org/onap/cps/spi/CpsAdminPersistenceService.java
cps-service/src/main/java/org/onap/cps/spi/exceptions/AlreadyDefinedException.java [new file with mode: 0644]
cps-service/src/main/java/org/onap/cps/spi/exceptions/AnchorAlreadyDefinedException.java [deleted file]
cps-service/src/main/java/org/onap/cps/spi/exceptions/DataspaceAlreadyDefinedException.java [deleted file]
cps-service/src/main/java/org/onap/cps/spi/exceptions/SchemaSetAlreadyDefinedException.java [deleted file]
cps-service/src/main/java/org/onap/cps/utils/YangUtils.java
cps-service/src/test/groovy/org/onap/cps/spi/exceptions/CpsExceptionsSpec.groovy
cps-service/src/test/groovy/org/onap/cps/utils/YangUtilsSpec.groovy