push addional code
[sdc.git] / openecomp-be / lib / openecomp-common-lib / src / main / java / org / openecomp / sdc / common / errors / ErrorCategory.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.sdc.common.errors;
22
23 public enum ErrorCategory {
24   /**
25    * System-level problems caused by external factors, resources shortage and similar. For instance:
26    * <ul>
27    * <li>I/O problems (network connectivity, filesystem access etc)</li>
28    * <li>Java issues (missing or incompatible class definitions etc)</li>
29    * <li>Environment problems</li>
30    * </ul>
31    */
32   SYSTEM,
33
34   /**
35    * Application-level issues related to implementation of certain functionality (such as detected
36    * illegal states of a program or data inconsistency).
37    */
38   APPLICATION,
39
40   /**
41    * Problems related to violations of different rules set either by product metadata (catalog
42    * definitions or similar) or other types of constraints.
43    */
44   VALIDATION,
45
46   /**
47    * Problems caused by attempt of a user to perform certain operations which contradict the
48    * system rules. Mostly applicable to UI-driven flows in presentation tier.
49    */
50   USER,
51
52   /**
53    * Improper values set in the system configuration (negative numbers, missing or inconsistent
54    * definitions, mismatch with valid values list etc).
55    * */
56   CONFIGURATION,
57
58   /**
59    * Security constraint violations (failed login attempts, lack of permissions to perform
60    * operation and so on). Any problems related to authentication/authorization should use the
61    * special category for system auditing purposes.
62    */
63   SECURITY
64 }