2 * ============LICENSE_START=======================================================
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
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.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.sdc.action.errors;
23 public class ActionErrorConstants {
26 public static final String ACTION_REQUEST_INVALID_GENERIC_CODE = "ACT0001";
27 public static final String ACTION_AUTHENTICATION_ERR_CODE = "ACT1000";
28 public static final String ACTION_AUTHORIZATION_ERR_CODE = "ACT1001";
29 public static final String ACTION_INVALID_INSTANCE_ID_CODE = "ACT1002";
30 public static final String ACTION_INVALID_REQUEST_ID_CODE = "ACT1003";
31 public static final String ACTION_INVALID_PARAM_CODE = "ACT1004";
32 //Operation <status> is not supported
33 public static final String ACTION_INVALID_REQUEST_BODY_CODE = "ACT1005";
34 //ACTION_REQUEST_BODY_EMPTY
35 public static final String ACTION_UPDATE_NOT_ALLOWED_CODE_NAME = "ACT1007";
36 public static final String ACTION_CHECKOUT_ON_LOCKED_ENTITY = "ACT1008";
37 public static final String ACTION_ENTITY_UNIQUE_VALUE_ERROR = "ACT1009";
39 public static final String ACTION_INVALID_SEARCH_CRITERIA = "ACT1011";
40 public static final String ACTION_MULT_SEARCH_CRITERIA = "ACT1012";
41 public static final String ACTION_UPDATE_ON_UNLOCKED_ENTITY = "ACT1013";
42 public static final String ACTION_UPDATE_INVALID_VERSION = "ACT1014";
43 public static final String ACTION_UPDATE_NOT_ALLOWED_CODE = "ACT1015";
45 public static final String ACTION_CHECKIN_ON_UNLOCKED_ENTITY = "ACT1017";
46 public static final String ACTION_SUBMIT_FINALIZED_ENTITY_NOT_ALLOWED = "ACT1018";
47 public static final String ACTION_SUBMIT_LOCKED_ENTITY_NOT_ALLOWED = "ACT1019";
48 public static final String ACTION_UNDO_CHECKOUT_ON_UNLOCKED_ENTITY = "ACT1020";
49 public static final String ACTION_NOT_LOCKED_CODE = "ACT1021";
50 public static final String ACTION_ARTIFACT_CHECKSUM_ERROR_CODE = "ACT1022";
51 public static final String ACTION_ARTIFACT_TOO_BIG_ERROR_CODE = "ACT1023";
52 public static final String ACTION_ARTIFACT_ALREADY_EXISTS_CODE = "ACT1025";
53 public static final String ACTION_ARTIFACT_UPDATE_READ_ONLY = "ACT1026";
54 public static final String ACTION_ARTIFACT_DELETE_READ_ONLY = "ACT1027";
55 public static final String ACTION_ARTIFACT_INVALID_PROTECTION_CODE = "ACT1028";
56 public static final String ACTION_ARTIFACT_INVALID_NAME_CODE = "ACT1029";
58 public static final String ACTION_EDIT_ON_ENTITY_LOCKED_BY_OTHER_USER = "ACT1041";
59 public static final String ACTION_CHECKIN_ON_ENTITY_LOCKED_BY_OTHER_USER = "ACT1042";
60 public static final String ACTION_CHECKOUT_ON_LOCKED_ENTITY_OTHER_USER = "ACT1043";
61 public static final String ACTION_UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER = "ACT1044";
62 public static final String ACTION_ENTITY_NOT_EXIST_CODE = "ACT1045";
63 public static final String ACTION_ARTIFACT_ENTITY_NOT_EXIST_CODE = "ACT1046";
64 public static final String ACTION_ARTIFACT_DEL_LOCKED_OTHER_USER_CODE = "ACT1047";
65 public static final String ACTION_DELETE_ON_LOCKED_ENTITY_CODE = "ACT1048";
67 public static final String ACTION_INTERNAL_SERVER_ERR_CODE = "ACT1060";
68 public static final String ACTION_QUERY_FAILURE_CODE = "QUERY_FAILURE";
69 public static final String ACTION_QUERY_FAILURE_MSG = "Query Failure";
73 public static final String ACTION_REQUEST_BODY_EMPTY = "Request Body is missing";
74 //"The API failed due to missing body";
75 public static final String ACTION_REQUEST_MISSING_MANDATORY_PARAM =
76 "Missing mandatory parameter(s) : ";
77 public static final String ACTION_REQUEST_ECOMP_INSTANCE_ID_INVALID =
78 "X-ECOMP-InstanceID HTTP header missing or empty";
79 public static final String ACTION_REQUEST_ECOMP_REQUEST_ID_INVALID =
80 "X-ECOMP-RequestID HTTP header missing or empty";
81 public static final String ACTION_REQUEST_CONTENT_TYPE_INVALID =
82 "Content-Type HTTP header missing or empty";
83 public static final String ACTION_REQUEST_AUTHORIZATION_HEADER_INVALID =
84 "Authentication is required to use the API";
85 public static final String ACTION_REQUEST_INVALID_NAME =
86 "Invalid syntax for action name. No whitespaces allowed.";
87 public static final String ACTION_REQUEST_FILTER_PARAM_INVALID =
88 "Invalid Search filter criteria provided";
89 public static final String ACTION_FILTER_MULTIPLE_QUERY_PARAM_NOT_SUPPORTED =
90 "Multiple filter criteria are not supported";
91 //"Operation supports filter by one property at a time";
92 public static final String ACTION_ARTIFACT_ENTITY_NOT_EXIST = "Specified artifact is not found";
93 public static final String ACTION_REQUEST_ARTIFACT_CHECKSUM_ERROR = "Checksum error";
94 public static final String ACTION_REQUEST_ARTIFACT_INVALID_PROTECTION_VALUE =
95 "Invalid artifact protection value";
97 public static final String ACTION_ARTIFACT_INVALID_NAME =
98 "Artifact name cannot contain any of the following characters : #<>$+%!`&*'|{}?=/:@ "
99 + "including whitespaces, double quotes and back-slash";
100 public static final String ACTION_ARTIFACT_READ_FILE_ERROR = "Error Occurred while reading file";
101 public static final String ACTION_REQUEST_ARTIFACT_OPERATION_ALLOWED =
102 "Artifacts cannot be created/updated using this operation";
103 public static final String ACTION_ARTIFACT_TOO_BIG_ERROR =
104 "Operation is not allowed. Artifact size exceeds the maximum file size limit (20MB).";
106 //Business Validation Error messages
107 public static final String ACTION_UPDATE_NOT_ALLOWED_FOR_NAME =
108 "Action Name update is not allowed";
109 public static final String ACTION_UPDATE_PARAM_INVALID =
110 "Update not allowed for the parameter(s) : %s";
111 public static final String ACTION_ENTITY_NOT_EXIST = "Specified Action is not found";
112 public static final String ACTION_REQUESTED_VERSION_INVALID = "Invalid requested version : %s";
113 public static final String ACTION_UNSUPPORTED_OPERATION = "Operation %s not supported";
114 public static final String ACTION_ENTITY_UNIQUE_VALUE_MSG =
115 "%s with the value '%s' already exists.";
116 public static final String ACTION_ARTIFACT_ALREADY_EXISTS =
117 "Artifact name already exists for Action with id %s. Please use another name.";
118 public static final String ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG =
119 "The request failed due to an internal ASDC problem. ECOMP Component should continue the "
120 + "attempts, with corrected data if required, to create the resource.";
121 public static final String ACTION_ARTIFACT_DELETE_READ_ONLY_MSG =
122 "Cannot delete read only artifact.";
123 public static final String ACTION_ARTIFACT_UPDATE_READ_ONLY_MSG =
124 "Cannot update read only artifact.";
125 public static final String ACTION_NOT_LOCKED_MSG =
126 "Operation is not allowed. Action status should be Locked.";
127 public static final String ACTION_ARTIFACT_UPDATE_NAME_INVALID =
128 "Artifact name cannot be updated.";
129 public static final String ACTION_ARTIFACT_DEL_LOCKED_OTHER_USER =
130 "Cannot delete artifact since it is locked by other user %s.";
131 public static final String UNDO_CHECKOUT_ON_UNLOCKED_ENTITY_MSG =
132 "Can not undo checkout on versionable entity %s with id %s since it is not checked out.";
133 public static final String UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER_MSG =
134 "Can not undo checkout on versionable entity %s with id"
135 + " %s since it is checked out by other user: %s.";