blob: 099f0273d960cc37ecb4c5c35bf6fdf1605eea75 [file] [log] [blame]
Aharoni, Pavel (pa0916)ca3cb012018-10-22 15:29:57 +03001/*-
2 * ============LICENSE_START=======================================================
3 * OSAM
4 * ================================================================================
5 * Copyright (C) 2018 AT&T
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
19 */
20
21
22
23package org.onap.osam.model;
24
25public class MsoExceptionResponse {
26
27 public static class ServiceException {
28
29 public ServiceException(String messageId, String text) {
30 this.messageId = messageId;
31 this.text = text;
32 }
33
34 public ServiceException() {
35 }
36
37 public String messageId;
38 public String text;
39 }
40
41 public ServiceException serviceException;
42
43 public MsoExceptionResponse() {
44 }
45
46 public MsoExceptionResponse(String messageId, String text) {
47 this.serviceException = new ServiceException(messageId, text);
48 }
49
50 public MsoExceptionResponse(Exception exception) {
51 ExceptionResponse exceptionResponse = new ExceptionResponse(exception);
52 this.serviceException = new ServiceException(exceptionResponse.getException(), exceptionResponse.getMessage());
53 }
54}