Remove straggling zookeper references
[music.git] / src / main / java / org / onap / music / eelf / logging / format / AppMessages.java
1 /*
2  * ============LICENSE_START==========================================
3  * org.onap.music
4  * ===================================================================
5  *  Copyright (c) 2017 AT&T Intellectual Property
6  *  Copyright (c) 2019 IBM Intellectual Property
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  * 
20  * ============LICENSE_END=============================================
21  * ====================================================================
22  */
23
24 package org.onap.music.eelf.logging.format;
25
26 /**
27  * @author inam
28  *
29  */
30 public enum AppMessages {
31     
32     
33     
34     /*
35      * 100-199 Security/Permission Related - Authentication problems
36      * [ERR100E] Missing Information 
37      * [ERR101E] Authentication error occured
38      * 
39      * 200-299 Availability/Timeout Related/IO - connectivity error - connection timeout
40      *  [ERR200E] Connectivity
41      *  [ERR201E] Host not available 
42      *     [ERR202E] Error while connecting to Cassandra cluster
43      *  [ERR203E] IO Error has occured
44      *  [ERR204E] Execution Interrupted
45      *     [ERR205E] Session Expired
46      *  [ERR206E] Cache not authenticated
47      * 
48      * 
49      * 300-399 Data Access/Integrity Related
50      * [ERR300E] Incorrect data  
51      * 
52      * 400-499 - Cassandra Query Related
53      * [ERR400E] Error while processing prepared query object
54      * [ERR401E] Executing Session Failure for Request
55      * [ERR402E] Ill formed queryObject for the request
56      * [ERR403E] Error processing Prepared Query Object  
57      * 
58      * 500-599 - Locking Related
59      * [ERR500E] Invalid lock
60      * [ERR501E] Locking Error has occured
61      * [ERR502E] Deprecated
62      * [ERR503E] Failed to aquire lock store handle  
63      * [ERR504E] Failed to create Lock Reference
64      * [ERR505E] Lock does not exist
65      * [ERR506E] Failed to aquire lock
66      * [ERR507E] Lock not aquired 
67      * [ERR508E] Lock state not set 
68      * [ERR509E] Lock not destroyed 
69      * [ERR510E] Lock not released 
70      * [ERR511E] Lock not deleted 
71      * [ERR512E] Deprecated
72      * 
73      * 
74      * 600 - 699 - Music Service Errors
75      * [ERR600E] Error initializing the cache 
76      * 
77      * 700-799 Schema Interface Type/Validation - received Pay-load checksum is
78      * invalid - received JSON is not valid
79      * 
80      * 800-899 Business/Flow Processing Related - check out to service is not
81      * allowed - Roll-back is done - failed to generate heat file
82      * 
83      * 
84      * 900-999 Unknown Errors - Unexpected exception
85      * [ERR900E] Unexpected error occured
86      * [ERR901E] Number format exception  
87      * 
88      * 
89      * 1000-1099 Reserved - do not use
90      * 
91      */
92
93
94
95     
96     MISSINGINFO("[ERR100E]", "Missing Information ","Details: NA", "Please check application credentials and/or headers"),
97     AUTHENTICATIONERROR("[ERR101E]", "Authentication error occured ","Details: NA", "Please verify application credentials"),
98     CONNCECTIVITYERROR("[ERR200E]"," Connectivity error","Details: NA ","Please check connectivity to external resources"),
99     HOSTUNAVAILABLE("[ERR201E]","Host not available","Details: NA","Please verify the host details"),
100     CASSANDRACONNECTIVITY("[ERR202E]","Error while connecting to Cassandra cluster",""," Please check cassandra cluster details"),
101     IOERROR("[ERR203E]","IO Error has occured","","Please check IO"),
102     EXECUTIONINTERRUPTED("[ERR204E]"," Execution Interrupted","",""),
103     SESSIONEXPIRED("[ERR205E]"," Session Expired","","Session has expired."),
104     CACHEAUTHENTICATION("[ERR206E]","Cache not authenticated",""," Cache not authenticated"),
105     
106     INCORRECTDATA("[ERR300E]"," Incorrect data",""," Please verify the request payload and try again"),
107     MULTIPLERECORDS("[ERR301E]"," Multiple records found",""," Please verify the request payload and try again"),
108     ALREADYEXIST("[ERR302E]"," Record already exist",""," Please verify the request payload and try again"),
109     MISSINGDATA("[ERR300E]"," Incorrect data",""," Please verify the request payload and try again"),
110     
111     QUERYERROR("[ERR400E]","Error while processing prepared query object",""," Please verify the query"),
112     SESSIONFAILED("[ERR401E]","Executing Session Failure for Request","","Please verify the session and request"),
113     
114     INVALIDLOCK("[ERR500E]"," Invalid lock or acquire failed",""," Lock is not valid to aquire"),
115     LOCKINGERROR("[ERR501E]"," Locking Error has occured",""," Locking Error has occured"),
116     LOCKHANDLE("[ERR503E]","Failed to aquire lock store handle",""," Failed to aquire lock store handle"),
117     CREATELOCK("[ERR504E]","Failed to aquire lock store handle  ","","Failed to aquire lock store handle  "),
118     LOCKSTATE("[ERR508E]"," Lock state not set",""," Lock state not set"),
119     DESTROYLOCK("[ERR509E]"," Lock not destroyed",""," Lock not destroyed"),
120     RELEASELOCK("[ERR510E]"," Lock not released",""," Lock not released"),
121     DELTELOCK("[ERR511E]",""," Lock not deleted "," Lock not deleted "),
122     CACHEERROR("[ERR600E]"," Error initializing the cache",""," Error initializing the cache"),
123     
124     UNKNOWNERROR("[ERR900E]"," Unexpected error occured",""," Please check logs for details");
125
126
127
128
129     private ErrorTypes eType;
130     private ErrorSeverity alarmSeverity;
131     private ErrorSeverity errorSeverity;
132     private String errorCode;
133     private String errorDescription;
134     private String details;
135     private String resolution;
136
137
138     AppMessages(String errorCode, String errorDescription, String details,String resolution) {
139     
140         this.errorCode = errorCode;
141         this.errorDescription = errorDescription;
142         this.details = details;
143         this.resolution = resolution;
144     }
145
146
147     public ErrorTypes getEType() {
148         return eType;
149     }
150
151     public ErrorSeverity getAlarmSeverity() {
152         return alarmSeverity;
153     }
154     public ErrorSeverity getErrorSeverity() {
155         return errorSeverity;
156     }
157     
158     public void setDetails(String details){ this.details=details; }
159
160     public String getDetails() {
161         return this.details;
162     }
163
164     public void setResolution(String resolution){ this.resolution=resolution; }
165
166     public String getResolution() {
167         return this.resolution;
168     }
169
170     public void setErrorCode(String errorCode){ this.errorCode=errorCode; }
171
172     public String getErrorCode() {
173         return this.errorCode;
174     }
175
176     public void setErrorDescription(String errorDescription){ this.errorDescription=errorDescription; }
177
178     public String getErrorDescription() {
179         return this.errorDescription;
180     }
181
182     
183
184     
185     
186     
187
188 }