2 * ============LICENSE_START==========================================
4 * ===================================================================
5 * Copyright (c) 2017 AT&T Intellectual Property
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 * ============LICENSE_END=============================================
20 * ====================================================================
23 package org.onap.music.eelf.logging.format;
29 public enum AppMessages {
34 * 100-199 Security/Permission Related - Authentication problems
35 * [ERR100E] Missing Information
36 * [ERR101E] Authentication error occured
38 * 200-299 Availability/Timeout Related/IO - connectivity error - connection timeout
39 * [ERR200E] Connectivity
40 * [ERR201E] Host not available
41 * [ERR202E] Error while connecting to Cassandra cluster
42 * [ERR203E] IO Error has occured
43 * [ERR204E] Execution Interrupted
44 * [ERR205E] Session Expired
45 * [ERR206E] Cache not authenticated
48 * 300-399 Data Access/Integrity Related
49 * [ERR300E] Incorrect data
51 * 400-499 - Cassandra Query Related
52 * [ERR400E] Error while processing prepared query object
53 * [ERR401E] Executing Session Failure for Request
54 * [ERR402E] Ill formed queryObject for the request
55 * [ERR403E] Error processing Prepared Query Object
57 * 500-599 - Zookeepr/Locking Related
58 * [ERR500E] Invalid lock
59 * [ERR501E] Locking Error has occured
60 * [ERR502E] Zookeeper error has occured
61 * [ERR503E] Failed to aquire lock store handle
62 * [ERR504E] Failed to create Lock Reference
63 * [ERR505E] Lock does not exist
64 * [ERR506E] Failed to aquire lock
65 * [ERR507E] Lock not aquired
66 * [ERR508E] Lock state not set
67 * [ERR509E] Lock not destroyed
68 * [ERR510E] Lock not released
69 * [ERR511E] Lock not deleted
70 * [ERR512E] Failed to get ZK Lock Handle
73 * 600 - 699 - Music Service Errors
74 * [ERR600E] Error initializing the cache
76 * 700-799 Schema Interface Type/Validation - received Pay-load checksum is
77 * invalid - received JSON is not valid
79 * 800-899 Business/Flow Processing Related - check out to service is not
80 * allowed - Roll-back is done - failed to generate heat file
83 * 900-999 Unknown Errors - Unexpected exception
84 * [ERR900E] Unexpected error occured
85 * [ERR901E] Number format exception
88 * 1000-1099 Reserved - do not use
95 MISSINGINFO("[ERR100E]", "Missing Information ","Details: NA", "Please check application credentials and/or headers"),
96 AUTHENTICATIONERROR("[ERR101E]", "Authentication error occured ","Details: NA", "Please verify application credentials"),
97 CONNCECTIVITYERROR("[ERR200E]"," Connectivity error","Details: NA ","Please check connectivity to external resources"),
98 HOSTUNAVAILABLE("[ERR201E]","Host not available","Details: NA","Please verify the host details"),
99 CASSANDRACONNECTIVITY("[ERR202E]","Error while connecting to Cassandra cluster",""," Please check cassandra cluster details"),
100 IOERROR("[ERR203E]","IO Error has occured","","Please check IO"),
101 EXECUTIONINTERRUPTED("[ERR204E]"," Execution Interrupted","",""),
102 SESSIONEXPIRED("[ERR205E]"," Session Expired","","Session has expired."),
103 CACHEAUTHENTICATION("[ERR206E]","Cache not authenticated",""," Cache not authenticated"),
105 INCORRECTDATA("[ERR300E]"," Incorrect data",""," Please verify the request payload and try again"),
106 MULTIPLERECORDS("[ERR301E]"," Multiple records found",""," Please verify the request payload and try again"),
107 ALREADYEXIST("[ERR302E]"," Record already exist",""," Please verify the request payload and try again"),
108 MISSINGDATA("[ERR300E]"," Incorrect data",""," Please verify the request payload and try again"),
110 QUERYERROR("[ERR400E]","Error while processing prepared query object",""," Please verify the query"),
111 SESSIONFAILED("[ERR401E]","Executing Session Failure for Request","","Please verify the session and request"),
113 INVALIDLOCK("[ERR500E]"," Invalid lock or acquire failed",""," Lock is not valid to aquire"),
114 LOCKINGERROR("[ERR501E]"," Locking Error has occured",""," Locking Error has occured"),
115 KEEPERERROR("[ERR502E]"," Zookeeper error has occured","","Please check zookeeper details"),
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"),
124 UNKNOWNERROR("[ERR900E]"," Unexpected error occured",""," Please check logs for details");
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;
138 AppMessages(String errorCode, String errorDescription, String details,String resolution) {
140 this.errorCode = errorCode;
141 this.errorDescription = errorDescription;
142 this.details = details;
143 this.resolution = resolution;
149 AppMessages(ErrorTypes eType, ErrorSeverity alarmSeverity,
150 ErrorSeverity errorSeverity, String errorCode, String errorDescription, String details,
154 this.alarmSeverity = alarmSeverity;
155 this.errorSeverity = errorSeverity;
156 this.errorCode = errorCode;
157 this.errorDescription = errorDescription;
158 this.details = details;
159 this.resolution = resolution;
161 public ErrorTypes getEType() {
165 public ErrorSeverity getAlarmSeverity() {
166 return alarmSeverity;
168 public ErrorSeverity getErrorSeverity() {
169 return errorSeverity;
172 public void setDetails(String details){ this.details=details; }
174 public String getDetails() {
178 public void setResolution(String resolution){ this.resolution=resolution; }
180 public String getResolution() {
181 return this.resolution;
184 public void setErrorCode(String errorCode){ this.errorCode=errorCode; }
186 public String getErrorCode() {
187 return this.errorCode;
190 public void setErrorDescription(String errorDescription){ this.errorDescription=errorDescription; }
192 public String getErrorDescription() {
193 return this.errorDescription;