aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjrh3 <jrh3@att.com>2019-07-08 13:16:46 -0400
committerjrh3 <jrh3@att.com>2019-07-08 15:32:51 -0400
commita94cf1efa1dc3b4bb5f0d5f6b3655e6ae282c343 (patch)
tree81a6ef78326ff4835a403e1a581d26386ec3febb
parentcad7cff7dc945eefaf27815742461d6db6ab8eac (diff)
Fix apex-pdp due to sonar changes in common
Fixed breakages due to changes made in policy/common to satisfy sonar. Issue-ID: POLICY-1791 Signed-off-by: jrh3 <jrh3@att.com> Change-Id: I79ee847db2fc3c5af992af85b78ccaa587328463
-rw-r--r--pom.xml3
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java13
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/ApexStarterRestServer.java4
3 files changed, 11 insertions, 9 deletions
diff --git a/pom.xml b/pom.xml
index 9662252dd..5f974434b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,6 +2,7 @@
============LICENSE_START=======================================================
Copyright (C) 2018 Ericsson. All rights reserved.
Copyright (C) 2019 Nordix Foundation.
+ Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -45,7 +46,7 @@
<version.jersey>2.26</version.jersey>
<version.hibernate>5.3.7.Final</version.hibernate>
<version.policy.common>1.5.1-SNAPSHOT</version.policy.common>
- <version.policy.models>2.1.0</version.policy.models>
+ <version.policy.models>2.1.1-SNAPSHOT</version.policy.models>
<!-- sonar/jacoco overrides -->
<!-- Overriding oparent default sonar/jacoco settings Combine all our reports
into one file shared across sub-modules -->
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java
index e48d75eb7..968c54d3d 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,10 +23,8 @@ package org.onap.policy.apex.services.onappf;
import java.util.List;
import java.util.Properties;
-
import lombok.Getter;
import lombok.Setter;
-
import org.onap.policy.apex.services.onappf.comm.PdpStateChangeListener;
import org.onap.policy.apex.services.onappf.comm.PdpStatusPublisher;
import org.onap.policy.apex.services.onappf.comm.PdpUpdateListener;
@@ -34,7 +33,7 @@ import org.onap.policy.apex.services.onappf.exception.ApexStarterRunTimeExceptio
import org.onap.policy.apex.services.onappf.handler.PdpMessageHandler;
import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterGroup;
import org.onap.policy.apex.services.onappf.rest.ApexStarterRestServer;
-import org.onap.policy.common.endpoints.event.comm.TopicEndpoint;
+import org.onap.policy.common.endpoints.event.comm.TopicEndpointManager;
import org.onap.policy.common.endpoints.event.comm.TopicSink;
import org.onap.policy.common.endpoints.event.comm.TopicSource;
import org.onap.policy.common.endpoints.listeners.MessageTypeDispatcher;
@@ -86,8 +85,8 @@ public class ApexStarterActivator {
public ApexStarterActivator(final ApexStarterParameterGroup apexStarterParameterGroup,
final Properties topicProperties) {
- topicSinks = TopicEndpoint.manager.addTopicSinks(topicProperties);
- topicSources = TopicEndpoint.manager.addTopicSources(topicProperties);
+ topicSinks = TopicEndpointManager.getManager().addTopicSinks(topicProperties);
+ topicSources = TopicEndpointManager.getManager().addTopicSources(topicProperties);
// TODO: instanceId currently set as a random string, could be fetched from actual deployment
final int random = (int) (Math.random() * 100);
@@ -105,8 +104,8 @@ public class ApexStarterActivator {
// @formatter:off
this.manager = new ServiceManager()
.addAction("topics",
- () -> TopicEndpoint.manager.start(),
- () -> TopicEndpoint.manager.shutdown())
+ () -> TopicEndpointManager.getManager().start(),
+ () -> TopicEndpointManager.getManager().shutdown())
.addAction("set alive",
() -> setAlive(true),
() -> setAlive(false))
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/ApexStarterRestServer.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/ApexStarterRestServer.java
index ba5585b85..fe3b0671b 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/ApexStarterRestServer.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/ApexStarterRestServer.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,6 +27,7 @@ import java.util.Properties;
import org.onap.policy.common.capabilities.Startable;
import org.onap.policy.common.endpoints.http.server.HttpServletServer;
+import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
import org.onap.policy.common.endpoints.parameters.RestServerParameters;
import org.onap.policy.common.endpoints.properties.PolicyEndPointProperties;
import org.onap.policy.common.gson.GsonMessageBodyHandler;
@@ -59,7 +61,7 @@ public class ApexStarterRestServer implements Startable {
@Override
public boolean start() {
try {
- servers = HttpServletServer.factory.build(getServerProperties());
+ servers = HttpServletServerFactoryInstance.getServerFactory().build(getServerProperties());
for (final HttpServletServer server : servers) {
if (server.isAaf()) {
server.addFilterClass(null, ApexStarterAafFilter.class.getName());