e7f2901e6c8e0049f66c7ca719c61f1a1cac82d2
[aai/aai-common.git] / aai-core / src / main / java / org / onap / aai / exceptions / AAIExceptionWithInfo.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
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 package org.onap.aai.exceptions;
22
23 import java.util.HashMap;
24
25 public class AAIExceptionWithInfo extends AAIException {
26
27     HashMap<String, Object> infoHash;
28     String info;
29
30     /**
31      * Instantiates a new AAI exception with info.
32      *
33      * @param infoHash the info hash
34      * @param info the info
35      */
36     public AAIExceptionWithInfo(HashMap<String, Object> infoHash, String info) {
37         super();
38         setInfoHash(infoHash);
39         setInfo(info);
40     }
41
42     /**
43      * Instantiates a new AAI exception with info.
44      *
45      * @param code the code
46      * @param infoHash the info hash
47      * @param info the info
48      */
49     public AAIExceptionWithInfo(String code, HashMap<String, Object> infoHash, String info) {
50         super(code);
51         setInfoHash(infoHash);
52         setInfo(info);
53     }
54
55     /**
56      * Instantiates a new AAI exception with info.
57      *
58      * @param code the code
59      * @param details the details
60      * @param infoHash the info hash
61      * @param info the info
62      */
63     public AAIExceptionWithInfo(String code, String details, HashMap<String, Object> infoHash, String info) {
64         super(code, details);
65         setInfoHash(infoHash);
66         setInfo(info);
67     }
68
69     /**
70      * Instantiates a new AAI exception with info.
71      *
72      * @param code the code
73      * @param cause the cause
74      * @param infoHash the info hash
75      * @param info the info
76      */
77     public AAIExceptionWithInfo(String code, Throwable cause, HashMap<String, Object> infoHash, String info) {
78         super(code, cause);
79         setInfoHash(infoHash);
80         setInfo(info);
81     }
82
83     /**
84      * Instantiates a new AAI exception with info.
85      *
86      * @param code the code
87      * @param cause the cause
88      * @param details the details
89      * @param infoHash the info hash
90      * @param info the info
91      */
92     public AAIExceptionWithInfo(String code, Throwable cause, String details, HashMap<String, Object> infoHash,
93             String info) {
94         super(code, cause, details);
95         setInfoHash(infoHash);
96         setInfo(info);
97     }
98
99     /**
100      * Gets the info hash.
101      *
102      * @return the info hash
103      */
104     public HashMap<String, Object> getInfoHash() {
105         return infoHash;
106     }
107
108     /**
109      * Sets the info hash.
110      *
111      * @param infoHash the info hash
112      */
113     public void setInfoHash(HashMap<String, Object> infoHash) {
114         this.infoHash = infoHash;
115     }
116
117     /**
118      * Gets the info.
119      *
120      * @return the info
121      */
122     public String getInfo() {
123         return info;
124     }
125
126     /**
127      * Sets the info.
128      *
129      * @param info the new info
130      */
131     public void setInfo(String info) {
132         this.info = info;
133     }
134
135 }