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;
return;
}
- // Read the properties
- Properties props = ParameterUtils.getTopicProperties(parameterGroup.getTopicParameterGroup());
-
// Initialize database
try {
new PapDatabaseInitializer().initializePapDatabase(parameterGroup.getDatabaseProviderParameters());
}
// 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
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;
* 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;
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;
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);
}
/**