2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017-2018 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 * ============LICENSE_END=========================================================
24 package org.onap.appc.domainmodel.lcm;
27 * This is a Enumeration class which introduces various Request Status
29 public enum RequestStatus {
30 // Unknown request status
31 UNKNOWN(ExternalActionStatus.FAILED, "Status cannot be determined.",true),
32 // Request just entered in APPC boundaries
33 RECEIVED(ExternalActionStatus.IN_PROGRESS, "Request has been received.",false),
34 // APPC has accepted the request/transaction to process after applying various business rules/validation
35 ACCEPTED(ExternalActionStatus.IN_PROGRESS, "Request has been accepted and is in progress.",false),
36 // APPC decided to reject the request based on various applicable business rules/validation.
37 REJECTED(ExternalActionStatus.FAILED, "Request has been rejected.",true),
38 // APPC has processed the VNF management request without any errors
39 SUCCESSFUL(ExternalActionStatus.SUCCESSFUL, "Request has been successfully completed.",true),
40 // APPC encountered error during processing the VNF management request
41 FAILED(ExternalActionStatus.FAILED, "Request failed because of an error",true),
42 // APPC Timed out because of reason that is out of control of APPC.
43 TIMEOUT(ExternalActionStatus.FAILED, "Request failed because it timed out",true),
44 // APPC aborted the request
45 ABORTED(ExternalActionStatus.ABORTED, "Request was aborted",true),
46 // APPC cannot find any related request
47 NOT_FOUND(ExternalActionStatus.NOT_FOUND, "Request was not found",true);
49 private ExternalActionStatus externalActionStatus;
50 private String description;
53 RequestStatus(ExternalActionStatus externalActionStatus, String description, boolean terminal) {
54 this.externalActionStatus = externalActionStatus;
55 this.description = description;
56 this.terminal=terminal;
59 public ExternalActionStatus getExternalActionStatus() {
60 return externalActionStatus;
63 public String getExternalActionStatusName() {
64 return externalActionStatus.name();
67 public String getDescription() {
70 public boolean isTerminal() {