5065612e23944aa722bcceae3e6231bc0d427dd5
[aai/aai-common.git] / aai-core / src / main / java / org / openecomp / aai / exceptions / AAIExceptionWithInfo.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * org.openecomp.aai
4  * ================================================================================
5  * Copyright (C) 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
21 package org.openecomp.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, String info) {
93                 super(code, cause, details);
94                 setInfoHash(infoHash);
95                 setInfo(info);
96         }
97         
98         /**
99          * Gets the info hash.
100          *
101          * @return the info hash
102          */
103         public HashMap<String, Object> getInfoHash() {
104                 return infoHash;
105         }
106
107         /**
108          * Sets the info hash.
109          *
110          * @param infoHash the info hash
111          */
112         public void setInfoHash(HashMap<String, Object> infoHash) {
113                 this.infoHash = infoHash;
114         }
115
116         /**
117          * Gets the info.
118          *
119          * @return the info
120          */
121         public String getInfo() {
122                 return info;
123         }
124
125         /**
126          * Sets the info.
127          *
128          * @param info the new info
129          */
130         public void setInfo(String info) {
131                 this.info = info;
132         }
133         
134 }