aboutsummaryrefslogtreecommitdiffstats
path: root/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception
diff options
context:
space:
mode:
Diffstat (limited to 'vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception')
-rw-r--r--vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception/GlobalExceptionHandler.java27
-rw-r--r--vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception/InvalidRestRequestException.java37
-rw-r--r--vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception/RestProcessingException.java37
3 files changed, 0 insertions, 101 deletions
diff --git a/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception/GlobalExceptionHandler.java b/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception/GlobalExceptionHandler.java
deleted file mode 100644
index a06f2d22ad..0000000000
--- a/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception/GlobalExceptionHandler.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.onap.svnfm.simulator.exception;
-
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.http.converter.HttpMessageNotReadableException;
-import org.springframework.web.HttpMediaTypeNotSupportedException;
-import org.springframework.web.bind.annotation.ControllerAdvice;
-import org.springframework.web.context.request.WebRequest;
-import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler;
-
-@ControllerAdvice
-public class GlobalExceptionHandler extends ResponseEntityExceptionHandler {
- @Override
- protected ResponseEntity<Object> handleHttpMessageNotReadable(HttpMessageNotReadableException ex,
- HttpHeaders headers, HttpStatus status, WebRequest request) {
- String error = "Malformed JSON request";
- return new ResponseEntity<>(error, HttpStatus.BAD_REQUEST);
- }
-
- @Override
- protected ResponseEntity<Object> handleHttpMediaTypeNotSupported(HttpMediaTypeNotSupportedException ex,
- HttpHeaders headers, HttpStatus status, WebRequest request) {
- String error = "Media type Not Supported";
- return new ResponseEntity<>(error, HttpStatus.UNSUPPORTED_MEDIA_TYPE);
- }
-}
diff --git a/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception/InvalidRestRequestException.java b/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception/InvalidRestRequestException.java
deleted file mode 100644
index eabd4ec414..0000000000
--- a/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception/InvalidRestRequestException.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * 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.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.svnfm.simulator.exception;
-
-/**
- * @author ronan.kenny@est.tech
- *
- */
-public class InvalidRestRequestException extends RuntimeException {
-
- private static final long serialVersionUID = 3977807111893986938L;
-
- public InvalidRestRequestException(final String message) {
- super(message);
- }
-
- public InvalidRestRequestException(final String message, final Throwable cause) {
- super(message, cause);
- }
-}
diff --git a/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception/RestProcessingException.java b/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception/RestProcessingException.java
deleted file mode 100644
index c84416e245..0000000000
--- a/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception/RestProcessingException.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * 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.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.svnfm.simulator.exception;
-
-/**
- * @author ronan.kenny@est.tech
- *
- */
-public class RestProcessingException extends RuntimeException {
-
- private static final long serialVersionUID = 16862313537198441L;
-
- public RestProcessingException(final String message) {
- super(message);
- }
-
- public RestProcessingException(final String message, final Throwable cause) {
- super(message, cause);
- }
-}