aboutsummaryrefslogtreecommitdiffstats
path: root/main/src
diff options
context:
space:
mode:
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/org/onap/policy/pap/main/startstop/Main.java7
-rw-r--r--main/src/main/java/org/onap/policy/pap/main/startstop/PapActivator.java7
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/startstop/TestPapActivator.java6
3 files changed, 4 insertions, 16 deletions
diff --git a/main/src/main/java/org/onap/policy/pap/main/startstop/Main.java b/main/src/main/java/org/onap/policy/pap/main/startstop/Main.java
index ba73d354..fc3ebbce 100644
--- a/main/src/main/java/org/onap/policy/pap/main/startstop/Main.java
+++ b/main/src/main/java/org/onap/policy/pap/main/startstop/Main.java
@@ -22,8 +22,6 @@
package org.onap.policy.pap.main.startstop;
import java.util.Arrays;
-import java.util.Properties;
-import org.onap.policy.common.endpoints.utils.ParameterUtils;
import org.onap.policy.common.utils.services.Registry;
import org.onap.policy.pap.main.PapConstants;
import org.onap.policy.pap.main.PolicyPapException;
@@ -79,9 +77,6 @@ public class Main {
return;
}
- // Read the properties
- Properties props = ParameterUtils.getTopicProperties(parameterGroup.getTopicParameterGroup());
-
// Initialize database
try {
new PapDatabaseInitializer().initializePapDatabase(parameterGroup.getDatabaseProviderParameters());
@@ -91,7 +86,7 @@ public class Main {
}
// Now, create the activator for the policy pap service
- activator = new PapActivator(parameterGroup, props);
+ activator = new PapActivator(parameterGroup);
Registry.register(PapConstants.REG_PAP_ACTIVATOR, activator);
// Start the activator
diff --git a/main/src/main/java/org/onap/policy/pap/main/startstop/PapActivator.java b/main/src/main/java/org/onap/policy/pap/main/startstop/PapActivator.java
index a15bc0f1..d119044f 100644
--- a/main/src/main/java/org/onap/policy/pap/main/startstop/PapActivator.java
+++ b/main/src/main/java/org/onap/policy/pap/main/startstop/PapActivator.java
@@ -22,7 +22,6 @@
package org.onap.policy.pap.main.startstop;
import java.util.Arrays;
-import java.util.Properties;
import java.util.concurrent.atomic.AtomicReference;
import org.onap.policy.common.endpoints.event.comm.TopicEndpointManager;
import org.onap.policy.common.endpoints.event.comm.TopicSource;
@@ -93,13 +92,11 @@ public class PapActivator extends ServiceManagerContainer {
* Instantiate the activator for policy pap as a complete service.
*
* @param papParameterGroup the parameters for the pap service
- * @param topicProperties properties used to configure the topics
*/
- public PapActivator(final PapParameterGroup papParameterGroup, final Properties topicProperties) {
+ public PapActivator(final PapParameterGroup papParameterGroup) {
super("Policy PAP");
- TopicEndpointManager.getManager().addTopicSinks(topicProperties);
- TopicEndpointManager.getManager().addTopicSources(topicProperties);
+ TopicEndpointManager.getManager().addTopics(papParameterGroup.getTopicParameterGroup());
try {
this.papParameterGroup = papParameterGroup;
diff --git a/main/src/test/java/org/onap/policy/pap/main/startstop/TestPapActivator.java b/main/src/test/java/org/onap/policy/pap/main/startstop/TestPapActivator.java
index 2ebd234c..13c06098 100644
--- a/main/src/test/java/org/onap/policy/pap/main/startstop/TestPapActivator.java
+++ b/main/src/test/java/org/onap/policy/pap/main/startstop/TestPapActivator.java
@@ -28,12 +28,10 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
-import java.util.Properties;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
-import org.onap.policy.common.endpoints.utils.ParameterUtils;
import org.onap.policy.common.utils.services.Registry;
import org.onap.policy.pap.main.PapConstants;
import org.onap.policy.pap.main.PolicyPapException;
@@ -67,9 +65,7 @@ public class TestPapActivator {
final PapCommandLineArguments arguments = new PapCommandLineArguments(papConfigParameters);
final PapParameterGroup parGroup = new PapParameterHandler().getParameters(arguments);
- Properties props = ParameterUtils.getTopicProperties(parGroup.getTopicParameterGroup());
-
- activator = new PapActivator(parGroup, props);
+ activator = new PapActivator(parGroup);
}
/**