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.viewandinspect.config.VisualizationConfig;
29 import org.openecomp.sparky.viewandinspect.enumeration.NodeProcessingState;
34 public class NodeMeta {
36 private String className;
38 private boolean isEnrichableNode;
39 private boolean isSearchTarget;
41 private NodeDebug nodeDebug;
42 private boolean nodeIssue;
43 private boolean nodeValidated;
44 private long selfLinkResponseTimeInMs;
45 private long numInboundNeighbors;
46 private long numOutboundNeighbors;
48 private boolean atMaxDepth;
49 private boolean selfLinkResolved;
50 private boolean processingErrorOccurred;
51 private boolean neighborsProcessed;
52 private int nodeDepth;
53 private boolean hasNeighbors;
55 private NodeProcessingState processingState;
58 * Instantiates a new node meta.
61 this.isSearchTarget = false;
62 this.isEnrichableNode = false;
64 if (VisualizationConfig.getConfig().isVisualizationDebugEnabled()) {
65 nodeDebug = new NodeDebug();
67 this.numInboundNeighbors = 0;
68 this.numOutboundNeighbors = 0;
70 this.selfLinkResponseTimeInMs = 0;
72 this.atMaxDepth = false;
73 this.selfLinkResolved = false;
74 this.processingErrorOccurred = false;
75 this.hasNeighbors = false;
76 this.neighborsProcessed = false;
77 this.nodeDepth = ActiveInventoryNode.DEFAULT_INIT_NODE_DEPTH;
78 this.processingState = NodeProcessingState.INIT;
82 public boolean isAtMaxDepth() {
86 public void setAtMaxDepth(boolean atMaxDepth) {
87 this.atMaxDepth = atMaxDepth;
90 public boolean isSelfLinkResolved() {
91 return selfLinkResolved;
96 public NodeProcessingState getProcessingState() {
97 return processingState;
100 public void setProcessingState(NodeProcessingState processingState) {
101 this.processingState = processingState;
104 public void setSelfLinkResolved(boolean selfLinkResolved) {
105 this.selfLinkResolved = selfLinkResolved;
108 public boolean isProcessingErrorOccurred() {
109 return processingErrorOccurred;
112 public void setProcessingErrorOccurred(boolean processingErrorOccurred) {
113 this.processingErrorOccurred = processingErrorOccurred;
116 public boolean isHasNeighbors() {
120 public void setHasNeighbors(boolean hasNeighbors) {
121 this.hasNeighbors = hasNeighbors;
124 public boolean isNeighborsProcessed() {
125 return neighborsProcessed;
128 public void setNeighborsProcessed(boolean neighborsProcessed) {
129 this.neighborsProcessed = neighborsProcessed;
132 public int getNodeDepth() {
136 public void setNodeDepth(int nodeDepth) {
137 this.nodeDepth = nodeDepth;
140 public void setNodeDebug(NodeDebug nodeDebug) {
141 this.nodeDebug = nodeDebug;
144 public String getClassName() {
148 public long getNumInboundNeighbors() {
149 return numInboundNeighbors;
152 public void setNumInboundNeighbors(long numInboundNeighbors) {
153 this.numInboundNeighbors = numInboundNeighbors;
156 public long getNumOutboundNeighbors() {
157 return numOutboundNeighbors;
160 public void setNumOutboundNeighbors(long numOutboundNeighbors) {
161 this.numOutboundNeighbors = numOutboundNeighbors;
164 public NodeDebug getNodeDebug() {
168 public long getSelfLinkResponseTimeInMs() {
169 return selfLinkResponseTimeInMs;
172 public boolean isEnrichableNode() {
173 return isEnrichableNode;
176 public boolean isNodeIssue() {
180 public boolean isNodeValidated() {
181 return nodeValidated;
184 public boolean isSearchTarget() {
185 return isSearchTarget;
188 public void setClassName(String className) {
189 this.className = className;
192 public void setEnrichableNode(boolean isEnrichableNode) {
193 this.isEnrichableNode = isEnrichableNode;
196 public void setNodeIssue(boolean nodeIssue) {
197 this.nodeIssue = nodeIssue;
200 public void setNodeValidated(boolean nodeValidated) {
201 this.nodeValidated = nodeValidated;
204 public void setSearchTarget(boolean isSearchTarget) {
205 this.isSearchTarget = isSearchTarget;
208 public void setSelfLinkResponseTimeInMs(long selfLinkResponseTimeInMs) {
209 this.selfLinkResponseTimeInMs = selfLinkResponseTimeInMs;