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