*/
package org.onap.aai.sparky.viewandinspect.config;
-import java.util.Properties;
-
-import org.onap.aai.sparky.util.ConfigHelper;
-
/**
* The Class VisualizationConfig.
*/
-public class VisualizationConfig {
+public class VisualizationConfigs {
private int maxSelfLinkTraversalDepth;
private String selectedSearchedNodeClassName;
+ private int numOfThreadsToFetchNodeIntegrity;
+
private String entityTypesToSummarize;
private String vnfEntityTypes;
private boolean makeAllNeighborsBidirectional;
- private static VisualizationConfig instance;
-
- public static VisualizationConfig getConfig() {
-
- if (instance == null) {
- instance = new VisualizationConfig();
- }
-
- return instance;
-
- }
-
/**
* Instantiates a new visualization config.
*/
- public VisualizationConfig() {
-
- Properties visualizationProps =
- ConfigHelper.loadConfigFromExplicitPath(TierSupportUiConstants.STATIC_CONFIG_APP_LOCATION
- + TierSupportUiConstants.FILESEP + "visualization.properties");
-
- maxSelfLinkTraversalDepth =
- Integer.parseInt(visualizationProps.getProperty("maxSelfLinkTraversalDepth", "2"));
- visualizationDebugEnabled =
- Boolean.parseBoolean(visualizationProps.getProperty("visualizationDebugEnabled", "false"));
- aaiEntityNodeDescriptors = visualizationProps.getProperty("aaiEntityNodeDescriptors", null);
- generalNodeClassName =
- visualizationProps.getProperty("generalNodeClassName", "unknownClassName");
- searchNodeClassName =
- visualizationProps.getProperty("searchedNodeClassName", "unknownClassName");
- selectedSearchedNodeClassName =
- visualizationProps.getProperty("selectedSearchedNodeClassName", "unknownClassName");
-
- entityTypesToSummarize = visualizationProps.getProperty("entityTypesToSummarize",
- "customer,service-instance,complex,pserver,vserver,vnf");
-
- vnfEntityTypes = visualizationProps.getProperty("vnfEntityTypes", "generic-vnf,newvce,vce,vpe");
-
- makeAllNeighborsBidirectional = Boolean
- .parseBoolean(visualizationProps.getProperty("makeAllNeighborsBidirectional", "false"));
-
- }
+ public VisualizationConfigs() {}
return maxSelfLinkTraversalDepth;
}
+ public int getNumOfThreadsToFetchNodeIntegrity() {
+ return numOfThreadsToFetchNodeIntegrity;
+ }
+
+ public void setNumOfThreadsToFetchNodeIntegrity(int numOfThreadsToFetchNodeIntegrity) {
+ this.numOfThreadsToFetchNodeIntegrity = numOfThreadsToFetchNodeIntegrity;
+ }
+
public String getEntityTypesToSummarize() {
return entityTypesToSummarize;
}
this.vnfEntityTypes = vnfEntityTypes;
}
- /**
- * @return the instance
- */
- public static VisualizationConfig getInstance() {
- return instance;
- }
- /**
- * @param instance the instance to set
- */
- public static void setInstance(VisualizationConfig instance) {
- VisualizationConfig.instance = instance;
- }
-
- /**
- * @return the makeAllNeighborsBidirectional
- */
- public boolean isMakeAllNeighborsBidirectional() {
- return makeAllNeighborsBidirectional;
- }
@Override
public String toString() {
- return "VisualizationConfig [maxSelfLinkTraversalDepth=" + maxSelfLinkTraversalDepth
+ return "VisualizationConfigs [maxSelfLinkTraversalDepth=" + maxSelfLinkTraversalDepth
+ ", visualizationDebugEnabled=" + visualizationDebugEnabled + ", "
+ (aaiEntityNodeDescriptors != null
? "aaiEntityNodeDescriptors=" + aaiEntityNodeDescriptors + ", " : "")
+ (searchNodeClassName != null ? "searchNodeClassName=" + searchNodeClassName + ", " : "")
+ (selectedSearchedNodeClassName != null
? "selectedSearchedNodeClassName=" + selectedSearchedNodeClassName + ", " : "")
+ + "numOfThreadsToFetchNodeIntegrity=" + numOfThreadsToFetchNodeIntegrity + ", "
+ (entityTypesToSummarize != null
? "entityTypesToSummarize=" + entityTypesToSummarize + ", " : "")
+ (vnfEntityTypes != null ? "vnfEntityTypes=" + vnfEntityTypes + ", " : "")