Adding UI extensibility
[aai/sparky-be.git] / src / main / java / org / onap / aai / sparky / viewandinspect / entity / NodeMeta.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
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
11  *
12  *       http://www.apache.org/licenses/LICENSE-2.0
13  *
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=========================================================
20  *
21  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22  */
23 package org.onap.aai.sparky.viewandinspect.entity;
24
25 import org.onap.aai.sparky.viewandinspect.config.VisualizationConfigs;
26 import org.onap.aai.sparky.viewandinspect.enumeration.NodeProcessingState;
27
28 /**
29  * The Class NodeMeta.
30  */
31 public class NodeMeta {
32
33   private String className;
34
35   private boolean isSearchTarget;
36
37   private NodeDebug nodeDebug;
38   private boolean nodeIssue;
39   private boolean nodeValidated;
40   private long selfLinkResponseTimeInMs;
41   private long numInboundNeighbors;
42   private long numOutboundNeighbors;
43
44   private boolean atMaxDepth;
45   private boolean selfLinkResolved;
46   private boolean processingErrorOccurred;
47   private boolean neighborsProcessed;
48   private int nodeDepth;
49   private boolean hasNeighbors;
50
51   private NodeProcessingState processingState;
52
53   private VisualizationConfigs visualizationConfigs;
54
55
56
57   /**
58    * Instantiates a new node meta.
59    */
60   public NodeMeta(VisualizationConfigs visualizationConfigs) {
61     this.isSearchTarget = false;
62     this.visualizationConfigs = visualizationConfigs;
63
64
65     if (this.visualizationConfigs.isVisualizationDebugEnabled()) {
66       nodeDebug = new NodeDebug();
67     }
68     this.numInboundNeighbors = 0;
69     this.numOutboundNeighbors = 0;
70
71     this.selfLinkResponseTimeInMs = 0;
72
73     this.atMaxDepth = false;
74     this.selfLinkResolved = false;
75     this.processingErrorOccurred = false;
76     this.hasNeighbors = false;
77     this.neighborsProcessed = false;
78     this.nodeDepth = ActiveInventoryNode.DEFAULT_INIT_NODE_DEPTH;
79     this.processingState = NodeProcessingState.INIT;
80
81   }
82
83   public boolean isAtMaxDepth() {
84     return atMaxDepth;
85   }
86
87   public void setAtMaxDepth(boolean atMaxDepth) {
88     this.atMaxDepth = atMaxDepth;
89   }
90
91   public boolean isSelfLinkResolved() {
92     return selfLinkResolved;
93   }
94
95
96
97   public NodeProcessingState getProcessingState() {
98     return processingState;
99   }
100
101   public void setProcessingState(NodeProcessingState processingState) {
102     this.processingState = processingState;
103   }
104
105   public void setSelfLinkResolved(boolean selfLinkResolved) {
106     this.selfLinkResolved = selfLinkResolved;
107   }
108
109   public boolean isProcessingErrorOccurred() {
110     return processingErrorOccurred;
111   }
112
113   public void setProcessingErrorOccurred(boolean processingErrorOccurred) {
114     this.processingErrorOccurred = processingErrorOccurred;
115   }
116
117   public boolean isHasNeighbors() {
118     return hasNeighbors;
119   }
120
121   public void setHasNeighbors(boolean hasNeighbors) {
122     this.hasNeighbors = hasNeighbors;
123   }
124
125   public boolean isNeighborsProcessed() {
126     return neighborsProcessed;
127   }
128
129   public void setNeighborsProcessed(boolean neighborsProcessed) {
130     this.neighborsProcessed = neighborsProcessed;
131   }
132
133   public int getNodeDepth() {
134     return nodeDepth;
135   }
136
137   public void setNodeDepth(int nodeDepth) {
138     this.nodeDepth = nodeDepth;
139   }
140
141   public void setNodeDebug(NodeDebug nodeDebug) {
142     this.nodeDebug = nodeDebug;
143   }
144
145   public String getClassName() {
146     return className;
147   }
148
149   public long getNumInboundNeighbors() {
150     return numInboundNeighbors;
151   }
152
153   public void setNumInboundNeighbors(long numInboundNeighbors) {
154     this.numInboundNeighbors = numInboundNeighbors;
155   }
156
157   public long getNumOutboundNeighbors() {
158     return numOutboundNeighbors;
159   }
160
161   public void setNumOutboundNeighbors(long numOutboundNeighbors) {
162     this.numOutboundNeighbors = numOutboundNeighbors;
163   }
164
165   public NodeDebug getNodeDebug() {
166     return nodeDebug;
167   }
168
169   public long getSelfLinkResponseTimeInMs() {
170     return selfLinkResponseTimeInMs;
171   }
172
173   public boolean isNodeIssue() {
174     return nodeIssue;
175   }
176
177   public boolean isNodeValidated() {
178     return nodeValidated;
179   }
180
181   public boolean isSearchTarget() {
182     return isSearchTarget;
183   }
184
185   public void setClassName(String className) {
186     this.className = className;
187   }
188
189   public void setNodeIssue(boolean nodeIssue) {
190     this.nodeIssue = nodeIssue;
191   }
192
193   public void setNodeValidated(boolean nodeValidated) {
194     this.nodeValidated = nodeValidated;
195   }
196
197   public void setSearchTarget(boolean isSearchTarget) {
198     this.isSearchTarget = isSearchTarget;
199   }
200
201   public void setSelfLinkResponseTimeInMs(long selfLinkResponseTimeInMs) {
202     this.selfLinkResponseTimeInMs = selfLinkResponseTimeInMs;
203   }
204
205 }