2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6 * Copyright © 2017 Amdocs
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
21 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
23 package org.onap.aai.sparky.viewandinspect.entity;
25 import org.onap.aai.sparky.dal.rest.OperationResult;
28 * The Class NodeProcessingTransaction.
30 public class NodeProcessingTransaction {
32 private ActiveInventoryNode processingNode;
33 private OperationResult opResult;
34 private String selfLinkWithModifiers;
35 private String requestParameters;
38 * Instantiates a new node processing transaction.
40 public NodeProcessingTransaction() {}
42 public String getRequestParameters() {
43 return requestParameters;
46 public void setRequestParameters(String requestParameters) {
47 this.requestParameters = requestParameters;
50 public String getSelfLink() {
51 if (processingNode == null) {
55 return processingNode.getSelfLink();
58 public String getSelfLinkWithModifiers() {
59 if (processingNode == null) {
63 return processingNode.getSelfLink() + requestParameters;
66 public ActiveInventoryNode getProcessingNode() {
67 return processingNode;
70 public void setProcessingNode(ActiveInventoryNode processingNode) {
71 this.processingNode = processingNode;
74 public OperationResult getOpResult() {
78 public void setOpResult(OperationResult opResult) {
79 this.opResult = opResult;
83 * Processing error occurred.
85 * @return true, if successful
87 public boolean processingErrorOccurred() {
88 if (opResult == null) {
92 return !opResult.wasSuccessful();
99 * @see java.lang.Object#toString()
102 public String toString() {
103 return "NodeProcessingTransaction ["
104 + (processingNode != null ? "processingNode=" + processingNode + ", " : "")
105 + (opResult != null ? "opResult=" + opResult + ", " : "") + "processorErrorOccurred="
106 + processingErrorOccurred() + "]";