aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-yaml
diff options
context:
space:
mode:
authorRossC <ross.carter@est.tech>2020-06-24 10:49:26 +0100
committerRossC <ross.carter@est.tech>2020-06-24 16:23:19 +0100
commit93e2ba2e1756596323774398673736946b220090 (patch)
treecb29c8f030df79be6175e166020de53d09fcea1d /models-interactions/model-yaml
parentce850be00732359bb04d8dd3666a1293dbf8f1ff (diff)
Updating models dependencies to latest versions
Issue-ID: POLICY-2387 Change-Id: Id89dac64139490f6d9b83b295cfe99c43ed657cf Signed-off-by: RossC <ross.carter@est.tech>
Diffstat (limited to 'models-interactions/model-yaml')
-rw-r--r--models-interactions/model-yaml/pom.xml2
-rw-r--r--models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java16
2 files changed, 9 insertions, 9 deletions
diff --git a/models-interactions/model-yaml/pom.xml b/models-interactions/model-yaml/pom.xml
index 56df41fbe..fb80eafa6 100644
--- a/models-interactions/model-yaml/pom.xml
+++ b/models-interactions/model-yaml/pom.xml
@@ -52,7 +52,7 @@
<dependency>
<groupId>org.jgrapht</groupId>
<artifactId>jgrapht-core</artifactId>
- <version>0.9.2</version>
+ <version>1.2.0</version>
</dependency>
<dependency>
<groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
diff --git a/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java b/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java
index 0bfc9062a..5204a1b7f 100644
--- a/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java
+++ b/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java
@@ -27,7 +27,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import org.apache.commons.lang3.StringUtils;
-import org.jgrapht.DirectedGraph;
+import org.jgrapht.Graph;
import org.jgrapht.graph.ClassBasedEdgeFactory;
import org.jgrapht.graph.DefaultEdge;
import org.jgrapht.graph.DirectedMultigraph;
@@ -115,7 +115,7 @@ public class ControlLoopCompiler implements Serializable {
//
// For this version we can use a directed multigraph, in the future we may not be able to
//
- DirectedGraph<NodeWrapper, LabeledEdge> graph =
+ Graph<NodeWrapper, LabeledEdge> graph =
new DirectedMultigraph<>(new ClassBasedEdgeFactory<NodeWrapper,
LabeledEdge>(LabeledEdge.class));
//
@@ -226,7 +226,7 @@ public class ControlLoopCompiler implements Serializable {
}
private static Map<Policy, PolicyNodeWrapper> addPoliciesAsNodes(ControlLoopPolicy policy,
- DirectedGraph<NodeWrapper, LabeledEdge> graph, TriggerNodeWrapper triggerNode,
+ Graph<NodeWrapper, LabeledEdge> graph, TriggerNodeWrapper triggerNode,
ControlLoopCompilerCallback callback) {
Map<Policy, PolicyNodeWrapper> mapNodes = new HashMap<>();
for (Policy operPolicy : policy.getPolicies()) {
@@ -259,7 +259,7 @@ public class ControlLoopCompiler implements Serializable {
return mapNodes;
}
- private static void addEdge(DirectedGraph<NodeWrapper, LabeledEdge> graph, Map<Policy, PolicyNodeWrapper> mapNodes,
+ private static void addEdge(Graph<NodeWrapper, LabeledEdge> graph, Map<Policy, PolicyNodeWrapper> mapNodes,
String policyId, String connectedPolicy,
FinalResultNodeWrapper finalResultNodeWrapper,
PolicyResult policyResult, NodeWrapper node) throws CompilerException {
@@ -278,7 +278,7 @@ public class ControlLoopCompiler implements Serializable {
}
}
- private static void validateNodesAndEdges(DirectedGraph<NodeWrapper, LabeledEdge> graph,
+ private static void validateNodesAndEdges(Graph<NodeWrapper, LabeledEdge> graph,
ControlLoopCompilerCallback callback) throws CompilerException {
for (NodeWrapper node : graph.vertexSet()) {
if (node instanceof TriggerNodeWrapper) {
@@ -294,7 +294,7 @@ public class ControlLoopCompiler implements Serializable {
}
}
- private static void validateTriggerNodeWrapper(DirectedGraph<NodeWrapper, LabeledEdge> graph,
+ private static void validateTriggerNodeWrapper(Graph<NodeWrapper, LabeledEdge> graph,
NodeWrapper node) throws CompilerException {
if (LOGGER.isDebugEnabled()) {
LOGGER.info("Trigger Node {}", node);
@@ -313,7 +313,7 @@ public class ControlLoopCompiler implements Serializable {
}
}
- private static void validateFinalResultNodeWrapper(DirectedGraph<NodeWrapper, LabeledEdge> graph,
+ private static void validateFinalResultNodeWrapper(Graph<NodeWrapper, LabeledEdge> graph,
NodeWrapper node) throws CompilerException {
if (LOGGER.isDebugEnabled()) {
LOGGER.info("FinalResult Node {}", node);
@@ -326,7 +326,7 @@ public class ControlLoopCompiler implements Serializable {
}
}
- private static void validatePolicyNodeWrapper(DirectedGraph<NodeWrapper, LabeledEdge> graph,
+ private static void validatePolicyNodeWrapper(Graph<NodeWrapper, LabeledEdge> graph,
NodeWrapper node, ControlLoopCompilerCallback callback) throws CompilerException {
if (LOGGER.isDebugEnabled()) {
LOGGER.info("Policy Node {}", node);