2 * ============LICENSE_START===================================================
3 * SPARKY (AAI UI service)
4 * ============================================================================
5 * Copyright © 2017 AT&T Intellectual Property.
6 * Copyright © 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.
20 * ============LICENSE_END=====================================================
22 * ECOMP and OpenECOMP are trademarks
23 * and service marks of AT&T Intellectual Property.
26 package org.openecomp.sparky.viewandinspect.entity;
28 import org.openecomp.sparky.dal.rest.OperationResult;
31 * The Class NodeProcessingTransaction.
33 public class NodeProcessingTransaction {
35 private ActiveInventoryNode processingNode;
36 private OperationResult opResult;
37 private String selfLinkWithModifiers;
38 private String requestParameters;
41 * Instantiates a new node processing transaction.
43 public NodeProcessingTransaction() {}
45 public String getRequestParameters() {
46 return requestParameters;
49 public void setRequestParameters(String requestParameters) {
50 this.requestParameters = requestParameters;
53 public String getSelfLinkWithModifiers() {
55 if (processingNode == null) {
59 return processingNode.getSelfLink() + requestParameters;
62 public ActiveInventoryNode getProcessingNode() {
63 return processingNode;
66 public void setProcessingNode(ActiveInventoryNode processingNode) {
67 this.processingNode = processingNode;
70 public OperationResult getOpResult() {
74 public void setOpResult(OperationResult opResult) {
75 this.opResult = opResult;
79 * Processing error occurred.
81 * @return true, if successful
83 public boolean processingErrorOccurred() {
84 if (opResult == null) {
88 return !opResult.wasSuccessful();
93 * @see java.lang.Object#toString()
96 public String toString() {
97 return "NodeProcessingTransaction ["
98 + (processingNode != null ? "processingNode=" + processingNode + ", " : "")
99 + (opResult != null ? "opResult=" + opResult + ", " : "") + "processorErrorOccurred="
100 + processingErrorOccurred() + "]";