2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2019 Nordix Foundation.
4 * ================================================================================
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 * SPDX-License-Identifier: Apache-2.0
18 * ============LICENSE_END=========================================================
21 package org.onap.so.adapters.vnfmadapter.jobmanagement;
24 * Represents an operation on a VNFM.
26 public class VnfmOperation {
28 private final String vnfmId;
29 private final String operationId;
30 private boolean waitForNotificationForSuccess = false;
31 private boolean isNotificationProcessed = false;
33 public VnfmOperation(final String vnfmId, final String operationId, final boolean waitForNotificationForSuccess) {
35 this.operationId = operationId;
36 this.waitForNotificationForSuccess = waitForNotificationForSuccess;
40 * Get the ID of the operation on the VNFM.
42 * @return the ID of the operation on the VNFM
44 public String getOperationId() {
49 * Get the ID of the VNFM the operation is carried out by.
51 * @return the ID of the VNFM
53 public String getVnfmId() {
58 * Check if a notification should be processed before the operation is considered successfully
61 * @return <code>true></code> if a notification must be processed before the operation is considered
62 * successfully completed, <code>false</code> otherwise
64 public boolean isWaitForNotificationForSuccess() {
65 return waitForNotificationForSuccess;
69 * Set the required notification has been processed for the operation.
71 public void setNotificationProcessed() {
72 this.isNotificationProcessed = true;
76 * Check if the required notification has been processed.
78 * @return <code>true</code> of the required notification has been processed, <code>false</code>
81 public boolean isNotificationProcessed() {
82 return isNotificationProcessed;