2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Copyright (C) 2017 Amdocs
8 * =============================================================================
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
21 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22 * ============LICENSE_END=========================================================
25 package org.onap.appc.domainmodel.lcm;
28 * This is a Enumeration class which introduces various Request Status
30 public enum RequestStatus {
31 // Unknown request status
32 UNKNOWN(ExternalActionStatus.FAILED, "Status cannot be determined.",true),
33 // Request just entered in APPC boundaries
34 RECEIVED(ExternalActionStatus.IN_PROGRESS, "Request has been received.",false),
35 // APPC has accepted the request/transaction to process after applying various business rules/validation
36 ACCEPTED(ExternalActionStatus.IN_PROGRESS, "Request has been accepted and is in progress.",false),
37 // APPC decided to reject the request based on various applicable business rules/validation.
38 REJECTED(ExternalActionStatus.FAILED, "Request has been rejected.",true),
39 // APPC has processed the VNF management request without any errors
40 SUCCESSFUL(ExternalActionStatus.SUCCESSFUL, "Request has been successfully completed.",true),
41 // APPC encountered error during processing the VNF management request
42 FAILED(ExternalActionStatus.FAILED, "Request failed because of an error",true),
43 // APPC Timed out because of reason that is out of control of APPC.
44 TIMEOUT(ExternalActionStatus.FAILED, "Request failed because it timed out",true),
45 // APPC aborted the request
46 ABORTED(ExternalActionStatus.ABORTED, "Request was aborted",true),
47 // APPC cannot find any related request
48 NOT_FOUND(ExternalActionStatus.NOT_FOUND, "Request was not found",true);
50 private ExternalActionStatus externalActionStatus;
51 private String description;
54 RequestStatus(ExternalActionStatus externalActionStatus, String description, boolean terminal) {
55 this.externalActionStatus = externalActionStatus;
56 this.description = description;
57 this.terminal=terminal;
60 public ExternalActionStatus getExternalActionStatus() {
61 return externalActionStatus;
64 public String getExternalActionStatusName() {
65 return externalActionStatus.name();
68 public String getDescription() {
71 public boolean isTerminal() {