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