2 * Copyright 2016-2017, Nokia Corporation
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.notification;
18 import com.nokia.cbam.lcm.v32.model.OperationStatus;
20 import java.util.Objects;
23 * Represents a notification successfully processed by the {@link LifecycleChangeNotificationManager}
25 class ProcessedNotification {
26 private String operationExecutionId;
27 //do not remove field the {@link LifecycleChangeNotificationManager} uses the equals
28 // method to compare notifications
29 private OperationStatus status;
31 ProcessedNotification(String operationExecutionId, OperationStatus status) {
32 this.operationExecutionId = operationExecutionId;
37 * @return the identifier of the operation
39 public String getOperationExecutionId() {
40 return operationExecutionId;
44 * @param operationExecutionId the identifier of the operation
46 public void setOperationExecutionId(String operationExecutionId) {
47 this.operationExecutionId = operationExecutionId;
51 * @return the status of the operation
53 public OperationStatus getStatus() {
58 * @param status the status of the operation
60 public void setStatus(OperationStatus status) {
65 public boolean equals(Object o) {
66 if (this == o) return true;
67 if (o == null || getClass() != o.getClass()) return false;
68 ProcessedNotification that = (ProcessedNotification) o;
69 return Objects.equals(operationExecutionId, that.operationExecutionId) &&
70 status == that.status;
74 public int hashCode() {
75 return Objects.hash(operationExecutionId, status);
79 public String toString() {
80 return "ProcessedNotification{" +
81 "operationExecutionId=" + operationExecutionId + '"' +
82 ", status=" + status +