Format ONAP-XACML and add JUnit
[policy/engine.git] / ONAP-XACML / src / main / java / org / onap / policy / xacml / api / XACMLErrorConstants.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP-XACML
4  * ================================================================================
5  * Copyright (C) 2017, 2019 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.onap.policy.xacml.api;
22
23 /**
24  * List of Error Classifications
25  * PE100 - Permissions
26  * PE200 - System Error (such as availability, timeout, configuration, etc...)
27  * PE300 - Data Issue( such as request for REST/JSON )
28  * PE400 - Schema validation
29  * PE500 - Process Flow issues
30  * PE900 - Default/Unknown Errors
31  *
32  *
33  */
34 public class XACMLErrorConstants {
35     // Captures all the errors related to Authentication, Authorizations and Permissions in the PolicyEngine Process
36     public static final String ERROR_PERMISSIONS = "PE100 - Permissions Error: ";
37
38     // Captures all the errors related to availability, timeout configuration variables, etc... in the PolicyEngine
39     public static final String ERROR_SYSTEM_ERROR = "PE200 - System Error: ";
40
41     /*
42      * Captures all the errors related to configuration values from properties files and data from the interfacing
43      * System
44      * like REST/JSON values
45      */
46     public static final String ERROR_DATA_ISSUE = "PE300 - Data Issue: ";
47
48     // Captures all the errors related to the XML schemas and/or REST/JSON structures
49     public static final String ERROR_SCHEMA_INVALID = "PE400 - Schema validation Error: ";
50
51     // Captures all the errors related to the Process, when data from one Process to another Process does not flow
52     public static final String ERROR_PROCESS_FLOW = "PE500 - Process Flow Issue: ";
53
54     // Captures all the errors that not related to the list of above error codes
55     public static final String ERROR_UNKNOWN = "PE900 - Unknown Error: ";
56
57     // Static class, hide constructor
58     private XACMLErrorConstants() {
59         super();
60     }
61
62 }