992c6983428e9ff690f691c0755710cf5f4752ae
[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 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  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
21  */
22 package org.onap.aai.exceptions;
23
24 import java.util.HashMap;
25
26 public class AAIExceptionWithInfo extends AAIException {
27
28         HashMap<String, Object> infoHash;
29         String info;
30
31         /**
32          * Instantiates a new AAI exception with info.
33          *
34          * @param infoHash the info hash
35          * @param info the info
36          */
37         public AAIExceptionWithInfo(HashMap<String, Object> infoHash, String info) {
38                 super();
39                 setInfoHash(infoHash);
40                 setInfo(info);
41         }
42
43         /**
44          * Instantiates a new AAI exception with info.
45          *
46          * @param code the code
47          * @param infoHash the info hash
48          * @param info the info
49          */
50         public AAIExceptionWithInfo(String code, HashMap<String, Object> infoHash, String info) {
51                 super(code);
52                 setInfoHash(infoHash);
53                 setInfo(info);
54         }
55         
56         /**
57          * Instantiates a new AAI exception with info.
58          *
59          * @param code the code
60          * @param details the details
61          * @param infoHash the info hash
62          * @param info the info
63          */
64         public AAIExceptionWithInfo(String code, String details, HashMap<String, Object> infoHash, String info) {
65                 super(code, details);
66                 setInfoHash(infoHash);
67                 setInfo(info);
68         }
69
70         /**
71          * Instantiates a new AAI exception with info.
72          *
73          * @param code the code
74          * @param cause the cause
75          * @param infoHash the info hash
76          * @param info the info
77          */
78         public AAIExceptionWithInfo(String code, Throwable cause, HashMap<String, Object> infoHash, String info) {
79                 super(code, cause);
80                 setInfoHash(infoHash);
81                 setInfo(info);
82         }
83         
84         /**
85          * Instantiates a new AAI exception with info.
86          *
87          * @param code the code
88          * @param cause the cause
89          * @param details the details
90          * @param infoHash the info hash
91          * @param info the info
92          */
93         public AAIExceptionWithInfo(String code, Throwable cause, String details, HashMap<String, Object> infoHash, 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 }