summaryrefslogtreecommitdiffstats
path: root/context/context-test-utils/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'context/context-test-utils/src/main/java/org')
-rw-r--r--context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVM.java14
-rw-r--r--context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVMThread.java8
-rw-r--r--context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/ZooKeeperServerServiceProvider.java3
3 files changed, 12 insertions, 13 deletions
diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVM.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVM.java
index 3288f56dd..0f6900dbb 100644
--- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVM.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVM.java
@@ -43,8 +43,8 @@ import org.onap.policy.apex.context.test.utils.Constants;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.model.basicmodel.concepts.ApexRuntimeException;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.policy.apex.model.basicmodel.service.AbstractParameters;
-import org.onap.policy.apex.model.basicmodel.service.ParameterService;
+import org.onap.policy.common.parameters.ParameterGroup;
+import org.onap.policy.common.parameters.ParameterService;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
@@ -144,13 +144,13 @@ public final class ConcurrentContextJVM {
for (int p = 7; p < args.length - 1; p += 2) {
@SuppressWarnings("rawtypes")
final Class parametersClass = Class.forName(args[p]);
- final AbstractParameters parameters =
- (AbstractParameters) new Gson().fromJson(args[p + 1], parametersClass);
- ParameterService.registerParameters(parametersClass, parameters);
+ final ParameterGroup parameters =
+ (ParameterGroup) new Gson().fromJson(args[p + 1], parametersClass);
+ ParameterService.register(parameters);
}
- for (final Entry<Class<?>, AbstractParameters> parameterEntry : ParameterService.getAll()) {
- LOGGER.info("Parameter class " + parameterEntry.getKey().getCanonicalName() + "="
+ for (final Entry<String, ParameterGroup> parameterEntry : ParameterService.getAll()) {
+ LOGGER.info("Parameter class " + parameterEntry.getKey() + "="
+ parameterEntry.getValue().toString());
}
diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVMThread.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVMThread.java
index 117a396dc..0c2aa7a90 100644
--- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVMThread.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVMThread.java
@@ -31,8 +31,8 @@ import java.util.List;
import java.util.Map.Entry;
import org.onap.policy.apex.context.test.utils.ConfigrationProvider;
-import org.onap.policy.apex.model.basicmodel.service.AbstractParameters;
-import org.onap.policy.apex.model.basicmodel.service.ParameterService;
+import org.onap.policy.common.parameters.ParameterGroup;
+import org.onap.policy.common.parameters.ParameterService;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
@@ -79,8 +79,8 @@ public class ConcurrentContextJVMThread implements Runnable, Closeable {
commandList.add(new Integer(configrationProvider.getLockType().getValue()).toString());
commandList.add(System.getProperty("hazelcast.config", ""));
- for (final Entry<Class<?>, AbstractParameters> parameterServiceEntry : ParameterService.getAll()) {
- commandList.add(parameterServiceEntry.getKey().getCanonicalName());
+ for (final Entry<String, ParameterGroup> parameterServiceEntry : ParameterService.getAll()) {
+ commandList.add(parameterServiceEntry.getValue().getClass().getCanonicalName());
commandList.add(new Gson().toJson(parameterServiceEntry.getValue()));
}
diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/ZooKeeperServerServiceProvider.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/ZooKeeperServerServiceProvider.java
index 5a7813a7e..654040d3f 100644
--- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/ZooKeeperServerServiceProvider.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/ZooKeeperServerServiceProvider.java
@@ -26,8 +26,7 @@ import java.net.InetSocketAddress;
import org.apache.zookeeper.server.NIOServerCnxnFactory;
import org.apache.zookeeper.server.ZooKeeperServer;
-import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
-import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
+
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;