1929e7f13a0e6860bae2fe0e475dec4f20d8792c
[dcaegen2/analytics/tca-gen2.git] / eelf-logger / eelf-logger-api / src / main / java / org / onap / dcae / utils / eelf / logger / api / info / ResponseLogInfo.java
1 /*
2  * ================================================================================
3  * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
4  * ================================================================================
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  * ============LICENSE_END=========================================================
17  *
18  */
19
20 package org.onap.dcae.utils.eelf.logger.api.info;
21
22 /**
23  * Captures field required for logging Response information
24  *
25  * @author Rajiv Singla
26  */
27 public interface ResponseLogInfo extends LogInfo {
28
29     /**
30      * Required field contains application-specific response codes. While error codes are
31      * application-specific, they
32      * should conform categories mentioned in table below in order to provide consistency
33      * <p>
34      * <table cellspacing=0 border=1>
35      * <tr>
36      * <th style=min-width:50px><b>Error type</b></th>
37      * <th style=min-width:50px><b>Notes</b></th>
38      * </tr>
39      * <tr>
40      * <td style=min-width:50px>0</td>
41      * <td style=min-width:50px>Success</td>
42      * </tr>
43      * <tr>
44      * <td style=min-width:50px>100</td>
45      * <td style=min-width:50px>Permission errors</td>
46      * </tr>
47      * <tr>
48      * <td style=min-width:50px>200</td>
49      * <td style=min-width:50px>Availability errors/Timeouts</td>
50      * </tr>
51      * <tr>
52      * <td style=min-width:50px>300</td>
53      * <td style=min-width:50px>Data errors</td>
54      * </tr>
55      * <tr>
56      * <td style=min-width:50px>400</td>
57      * <td style=min-width:50px>Schema errors</td>
58      * </tr>
59      * <tr>
60      * <td style=min-width:50px>500</td>
61      * <td style=min-width:50px>Business process errors</td>
62      * </tr>
63      * <tr>
64      * <td style=min-width:50px>900</td>
65      * <td style=min-width:50px>Unknown Errors</td>
66      * </tr>
67      * </table>
68      *
69      * @return application-specific error code
70      */
71     Integer getResponseCode();
72
73
74     /**
75      * Required field contains a human readable description of the {@link #getResponseCode()}.
76      *
77      * @return human readable description of the response code
78      */
79     String getResponseDescription();
80
81 }