c256da3665b04e41b251d85ad3221ee28e906825
[aai/data-router.git] / src / main / java / org / onap / aai / datarouter / exception / BaseDataRouterException.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6  * Copyright © 2017-2018 Amdocs
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *       http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  */
21 package org.onap.aai.datarouter.exception;
22
23 /*
24  * COPYRIGHT NOTICE: Copyright (c) 2016 Team Pacifica (Amdocs & AT&T) The contents and intellectual
25  * property contained herein, remain the property of Team Pacifica (Amdocs & AT&T).
26  */
27
28 import java.util.Locale;
29
30 /**
31  * Base SMAdaptor exception class.
32  */
33 public class BaseDataRouterException extends Exception {
34
35   /** Force serialVersionUID. */
36   private static final long serialVersionUID = -6663403070792969748L;
37
38   /** Default locale. */
39   public static final Locale LOCALE = Locale.US;
40
41   /** Exception id. */
42   private final String id;
43
44   /**
45    * Constructor.
46    * 
47    * @param id the incoming id.
48    */
49   public BaseDataRouterException(final String id) {
50     super();
51     this.id = id;
52   }
53
54   /**
55    * Constructor.
56    * 
57    * @param id the incoming id
58    * @param message the incoming message
59    */
60   public BaseDataRouterException(final String id, final String message) {
61     super(message);
62     this.id = id;
63   }
64
65   /**
66    * Constructor.
67    * 
68    * @param id the incoming id
69    * @param message the incoming message
70    * @param cause the incoming throwable
71    */
72   public BaseDataRouterException(final String id, final String message, final Throwable cause) {
73     super(message, cause);
74     this.id = id;
75   }
76
77   /**
78    * Get the exception id.
79    * 
80    * @return the exception id
81    */
82   public String getId() {
83     return this.id;
84   }
85 }