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
50 * 400-499 - Cassandra Query Related
51 * [ERR400E] Error while processing prepared query object
52 * [ERR401E] Executing Session Failure for Request
53 * [ERR402E] Ill formed queryObject for the request
54 * [ERR403E] Error processing Prepared Query Object
56 * 500-599 - Zookeepr/Locking Related
57 * [ERR500E] Invalid lock
58 * [ERR501E] Locking Error has occured
59 * [ERR502E] Zookeeper error has occured
60 * [ERR503E] Failed to aquire lock store handle
61 * [ERR504E] Failed to create Lock Reference
62 * [ERR505E] Lock does not exist
63 * [ERR506E] Failed to aquire lock
64 * [ERR507E] Lock not aquired
65 * [ERR508E] Lock state not set
66 * [ERR509E] Lock not destroyed
67 * [ERR510E] Lock not released
68 * [ERR511E] Lock not deleted
69 * [ERR512E] Failed to get ZK Lock Handle
72 * 600 - 699 - Music Service Errors
73 * [ERR600E] Error initializing the cache
75 * 700-799 Schema Interface Type/Validation - received Pay-load checksum is
76 * invalid - received JSON is not valid
78 * 800-899 Business/Flow Processing Related - check out to service is not
79 * allowed - Roll-back is done - failed to generate heat file
82 * 900-999 Unknown Errors - Unexpected exception
83 * [ERR900E] Unexpected error occured
84 * [ERR901E] Number format exception
87 * 1000-1099 Reserved - do not use
94 MISSINGINFO("[ERR100E]", "Missing Information ","Details: NA", "Please check application credentials and headers"),
95 AUTHENTICATIONERROR("[ERR101E]", "Authentication error occured ","Details: NA", "Please verify application credentials"),
96 CONNCECTIVITYERROR("[ERR200E]"," Connectivity error","Details: NA ","Please check connectivity to external resources"),
97 HOSTUNAVAILABLE("[ERR201E]","Host not available","Details: NA","Please verify the host details"),
98 CASSANDRACONNECTIVITY("[ERR202E]","Error while connecting to Cassandra cluster",""," Please check cassandra cluster details"),
99 IOERROR("[ERR203E]","IO Error has occured","","Please check IO"),
100 EXECUTIONINTERRUPTED("[ERR204E]"," Execution Interrupted","",""),
101 SESSIONEXPIRED("[ERR205E]"," Session Expired","","Session has expired."),
102 CACHEAUTHENTICATION("[ERR206E]","Cache not authenticated",""," Cache not authenticated"),
104 QUERYERROR("[ERR400E]","Error while processing prepared query object",""," Please verify the query"),
105 SESSIONFAILED("[ERR401E]","Executing Session Failure for Request","","Please verify the session and request"),
107 INVALIDLOCK("[ERR500E]"," Invalid lock or acquire failed",""," Lock is not valid to aquire"),
108 LOCKINGERROR("[ERR501E]"," Locking Error has occured",""," Locking Error has occured"),
109 KEEPERERROR("[ERR502E]"," Zookeeper error has occured","","Please check zookeeper details"),
110 LOCKHANDLE("[ERR503E]","Failed to aquire lock store handle",""," Failed to aquire lock store handle"),
111 CREATELOCK("[ERR504E]","Failed to aquire lock store handle ","","Failed to aquire lock store handle "),
112 LOCKSTATE("[ERR508E]"," Lock state not set",""," Lock state not set"),
113 DESTROYLOCK("[ERR509E]"," Lock not destroyed",""," Lock not destroyed"),
114 RELEASELOCK("[ERR510E]"," Lock not released",""," Lock not released"),
115 DELTELOCK("[ERR511E]",""," Lock not deleted "," Lock not deleted "),
116 CACHEERROR("[ERR600E]"," Error initializing the cache",""," Error initializing the cache"),
118 UNKNOWNERROR("[ERR900E]"," Unexpected error occured",""," Please check logs for details");
123 ErrorSeverity alarmSeverity;
124 ErrorSeverity errorSeverity;
126 String errorDescription;
131 AppMessages(String errorCode, String errorDescription, String details,String resolution) {
133 this.errorCode = errorCode;
134 this.errorDescription = errorDescription;
135 this.details = details;
136 this.resolution = resolution;
142 AppMessages(ErrorTypes eType, ErrorSeverity alarmSeverity,
143 ErrorSeverity errorSeverity, String errorCode, String errorDescription, String details,
147 this.alarmSeverity = alarmSeverity;
148 this.errorSeverity = errorSeverity;
149 this.errorCode = errorCode;
150 this.errorDescription = errorDescription;
151 this.details = details;
152 this.resolution = resolution;
155 public String getDetails() {
159 public String getResolution() {
160 return this.resolution;
163 public String getErrorCode() {
164 return this.errorCode;
167 public String getErrorDescription() {
168 return this.errorDescription;