aboutsummaryrefslogtreecommitdiffstats
path: root/services/services-onappf
diff options
context:
space:
mode:
Diffstat (limited to 'services/services-onappf')
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java32
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/ApexEngineHandler.java1
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/HealthCheckRestControllerV1.java12
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterMain.java2
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestApexStarterParameterHandler.java2
5 files changed, 24 insertions, 25 deletions
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 e08b5b344..e48d75eb7 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
@@ -105,40 +105,40 @@ public class ApexStarterActivator {
// @formatter:off
this.manager = new ServiceManager()
.addAction("topics",
- () -> TopicEndpoint.manager.start(),
- () -> TopicEndpoint.manager.shutdown())
+ () -> TopicEndpoint.manager.start(),
+ () -> TopicEndpoint.manager.shutdown())
.addAction("set alive",
- () -> setAlive(true),
- () -> setAlive(false))
+ () -> setAlive(true),
+ () -> setAlive(false))
.addAction("register pdp status context object",
- () -> Registry.register(ApexStarterConstants.REG_PDP_STATUS_OBJECT,
+ () -> Registry.register(ApexStarterConstants.REG_PDP_STATUS_OBJECT,
new PdpMessageHandler().createPdpStatusFromParameters(instanceId,
apexStarterParameterGroup.getPdpStatusParameters())),
- () -> Registry.unregister(ApexStarterConstants.REG_PDP_STATUS_OBJECT))
+ () -> Registry.unregister(ApexStarterConstants.REG_PDP_STATUS_OBJECT))
.addAction("topic sinks",
- () -> Registry.register(ApexStarterConstants.REG_APEX_PDP_TOPIC_SINKS, topicSinks),
- () -> Registry.unregister(ApexStarterConstants.REG_APEX_PDP_TOPIC_SINKS))
+ () -> Registry.register(ApexStarterConstants.REG_APEX_PDP_TOPIC_SINKS, topicSinks),
+ () -> Registry.unregister(ApexStarterConstants.REG_APEX_PDP_TOPIC_SINKS))
.addAction("Pdp Status publisher",
- () -> Registry.register(ApexStarterConstants.REG_PDP_STATUS_PUBLISHER,
+ () -> Registry.register(ApexStarterConstants.REG_PDP_STATUS_PUBLISHER,
new PdpStatusPublisher(topicSinks,
apexStarterParameterGroup.getPdpStatusParameters().getTimeIntervalMs())),
- () -> stopAndRemovePdpStatusPublisher())
+ () -> stopAndRemovePdpStatusPublisher())
.addAction("Register pdp update listener",
() -> msgDispatcher.register(PdpMessageType.PDP_UPDATE.name(), pdpUpdateListener),
() -> msgDispatcher.unregister(PdpMessageType.PDP_UPDATE.name()))
.addAction("Register pdp state change request dispatcher",
- () -> msgDispatcher.register(PdpMessageType.PDP_STATE_CHANGE.name(), pdpStateChangeListener),
- () -> msgDispatcher.unregister(PdpMessageType.PDP_STATE_CHANGE.name()))
+ () -> msgDispatcher.register(PdpMessageType.PDP_STATE_CHANGE.name(), pdpStateChangeListener),
+ () -> msgDispatcher.unregister(PdpMessageType.PDP_STATE_CHANGE.name()))
.addAction("Message Dispatcher",
() -> registerMsgDispatcher(),
() -> unregisterMsgDispatcher())
.addAction("Create REST server",
- () -> restServer =
+ () -> restServer =
new ApexStarterRestServer(apexStarterParameterGroup.getRestServerParameters()),
- () -> restServer = null)
+ () -> restServer = null)
.addAction("Rest Server",
- () -> restServer.start(),
- () -> restServer.stop());
+ () -> restServer.start(),
+ () -> restServer.stop());
// @formatter:on
}
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/ApexEngineHandler.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/ApexEngineHandler.java
index 8cb3ae13e..699f26c66 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/ApexEngineHandler.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/ApexEngineHandler.java
@@ -23,7 +23,6 @@ package org.onap.policy.apex.services.onappf.handler;
import com.google.gson.JsonObject;
import java.io.IOException;
-import java.io.StringReader;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/HealthCheckRestControllerV1.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/HealthCheckRestControllerV1.java
index 53efa5940..b58a3db24 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/HealthCheckRestControllerV1.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/HealthCheckRestControllerV1.java
@@ -51,15 +51,15 @@ import org.onap.policy.common.endpoints.report.HealthCheckReport;
@Api(value = "PDP-A API")
@Produces(MediaType.APPLICATION_JSON)
@SwaggerDefinition(
- info = @Info(description =
+ info = @Info(description =
"PDP-A is responsible for making policy decisions and for managing the administrative"
+ " state of the PDPs as directed by PolicyAdministration", version = "v1.0",
title = "PDP-A"),
- consumes = {MediaType.APPLICATION_JSON},
- produces = {MediaType.APPLICATION_JSON},
- schemes = {SwaggerDefinition.Scheme.HTTP, SwaggerDefinition.Scheme.HTTPS},
- tags = {@Tag(name = "PDP-A", description = "PDP-A Operations")},
- securityDefinition = @SecurityDefinition(basicAuthDefinitions = {@BasicAuthDefinition(key = "basicAuth")}))
+ consumes = {MediaType.APPLICATION_JSON},
+ produces = {MediaType.APPLICATION_JSON},
+ schemes = {SwaggerDefinition.Scheme.HTTP, SwaggerDefinition.Scheme.HTTPS},
+ tags = {@Tag(name = "PDP-A", description = "PDP-A Operations")},
+ securityDefinition = @SecurityDefinition(basicAuthDefinitions = {@BasicAuthDefinition(key = "basicAuth")}))
//@formatter:on
public class HealthCheckRestControllerV1 {
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterMain.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterMain.java
index c5c0fc483..31c994cda 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterMain.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterMain.java
@@ -102,7 +102,7 @@ public class TestApexStarterMain {
@Test
public void testApexStarter_InvalidParameters() {
final String[] apexStarterConfigParameters =
- { "-c", "src/test/resources/ApexStarterConfigParameters_InvalidName.json" };
+ { "-c", "src/test/resources/ApexStarterConfigParameters_InvalidName.json" };
apexStarter = new ApexStarterMain(apexStarterConfigParameters);
assertTrue(apexStarter.getParameters() == null);
}
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestApexStarterParameterHandler.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestApexStarterParameterHandler.java
index f91baeb45..67ffcf22d 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestApexStarterParameterHandler.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestApexStarterParameterHandler.java
@@ -116,7 +116,7 @@ public class TestApexStarterParameterHandler {
@Test
public void testApexStarterParameterGroup_InvalidName() throws ApexStarterException {
final String[] apexStarterConfigParameters =
- { "-c", "src/test/resources/ApexStarterConfigParameters_InvalidName.json" };
+ { "-c", "src/test/resources/ApexStarterConfigParameters_InvalidName.json" };
final ApexStarterCommandLineArguments arguments = new ApexStarterCommandLineArguments();
arguments.parse(apexStarterConfigParameters);