aboutsummaryrefslogtreecommitdiffstats
path: root/policy-management/src/main/java/org/onap/policy/drools
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2024-04-10 14:12:28 +0100
committeradheli.tavares <adheli.tavares@est.tech>2024-04-10 14:41:20 +0100
commit5bd2e9091fa75bc41fce1667f5deb46ac5e94380 (patch)
treee493c0c7ae2695c42058cbdb5fc2488c94e7b267 /policy-management/src/main/java/org/onap/policy/drools
parent12142469280ab15d3c38802e6be7d7676435c2b9 (diff)
Dependency management update
- including dependencies to pom.xml files only where they are used, avoiding extra dependencies being added in all packages. Issue-ID: POLICY-4945 Change-Id: I376ea0763190d55f254dc8f88b6fa5b89354e8b9 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'policy-management/src/main/java/org/onap/policy/drools')
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/controller/IndexedDroolsControllerFactory.java8
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/persistence/SystemPersistenceConstants.java2
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java40
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/system/Main.java3
4 files changed, 21 insertions, 32 deletions
diff --git a/policy-management/src/main/java/org/onap/policy/drools/controller/IndexedDroolsControllerFactory.java b/policy-management/src/main/java/org/onap/policy/drools/controller/IndexedDroolsControllerFactory.java
index 1965e22f..7f28f9bb 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/controller/IndexedDroolsControllerFactory.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/controller/IndexedDroolsControllerFactory.java
@@ -258,13 +258,7 @@ class IndexedDroolsControllerFactory implements DroolsControllerFactory {
private String getPropertyTopicPrefix(Topic topic) {
boolean isSource = topic instanceof TopicSource;
var commInfra = topic.getTopicCommInfrastructure();
- if (commInfra == CommInfrastructure.UEB) {
- if (isSource) {
- return PolicyEndPointProperties.PROPERTY_UEB_SOURCE_TOPICS + ".";
- } else {
- return PolicyEndPointProperties.PROPERTY_UEB_SINK_TOPICS + ".";
- }
- } else if (commInfra == CommInfrastructure.NOOP) {
+ if (commInfra == CommInfrastructure.NOOP) {
if (isSource) {
return PolicyEndPointProperties.PROPERTY_NOOP_SOURCE_TOPICS + ".";
} else {
diff --git a/policy-management/src/main/java/org/onap/policy/drools/persistence/SystemPersistenceConstants.java b/policy-management/src/main/java/org/onap/policy/drools/persistence/SystemPersistenceConstants.java
index ba6c5e71..dba6d4c1 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/persistence/SystemPersistenceConstants.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/persistence/SystemPersistenceConstants.java
@@ -32,7 +32,7 @@ public final class SystemPersistenceConstants {
public static final String DEFAULT_CONFIGURATION_DIR = "config";
/**
- * Persistence Manager. For now it is a file-based properties management, In the future, it will
+ * Persistence Manager. For now, it is a file-based properties management, In the future, it will
* probably be DB based, so manager implementation will change.
*/
@Getter
diff --git a/policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java b/policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java
index ec06882f..48cd8140 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java
@@ -1392,7 +1392,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@GET
- @Path("engine/topics/sources/{comm: ueb|kafka|noop}")
+ @Path("engine/topics/sources/{comm: kafka|noop}")
public Response commSources(
@PathParam("comm") String comm) {
if (!checkValidNameInput(comm)) {
@@ -1405,9 +1405,6 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
List<TopicSource> sources = new ArrayList<>();
var status = Status.OK;
switch (CommInfrastructure.valueOf(comm.toUpperCase())) {
- case UEB:
- sources.addAll(TopicEndpointManager.getManager().getUebTopicSources());
- break;
case NOOP:
sources.addAll(TopicEndpointManager.getManager().getNoopTopicSources());
break;
@@ -1427,7 +1424,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@GET
- @Path("engine/topics/sinks/{comm: ueb|kafka|noop}")
+ @Path("engine/topics/sinks/{comm: kafka|noop}")
public Response commSinks(
@PathParam("comm") String comm) {
if (!checkValidNameInput(comm)) {
@@ -1440,9 +1437,6 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
List<TopicSink> sinks = new ArrayList<>();
var status = Status.OK;
switch (CommInfrastructure.valueOf(comm.toUpperCase())) {
- case UEB:
- sinks.addAll(TopicEndpointManager.getManager().getUebTopicSinks());
- break;
case NOOP:
sinks.addAll(TopicEndpointManager.getManager().getNoopTopicSinks());
break;
@@ -1462,7 +1456,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@GET
- @Path("engine/topics/sources/{comm: ueb|kafka|noop}/{topic}")
+ @Path("engine/topics/sources/{comm: kafka|noop}/{topic}")
public Response sourceTopic(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1478,7 +1472,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@GET
- @Path("engine/topics/sinks/{comm: ueb|kafka|noop}/{topic}")
+ @Path("engine/topics/sinks/{comm: kafka|noop}/{topic}")
public Response sinkTopic(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1494,7 +1488,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@GET
- @Path("engine/topics/sources/{comm: ueb|kafka|noop}/{topic}/events")
+ @Path("engine/topics/sources/{comm: kafka|noop}/{topic}/events")
public Response sourceEvents(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1510,7 +1504,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@GET
- @Path("engine/topics/sinks/{comm: ueb|kafka|noop}/{topic}/events")
+ @Path("engine/topics/sinks/{comm: kafka|noop}/{topic}/events")
public Response sinkEvents(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1526,7 +1520,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@GET
- @Path("engine/topics/sources/{comm: ueb|kafka|noop}/{topic}/switches")
+ @Path("engine/topics/sources/{comm: kafka|noop}/{topic}/switches")
public Response commSourceTopicSwitches(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1538,7 +1532,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@GET
- @Path("engine/topics/sinks/{comm: ueb|kafka|noop}/{topic}/switches")
+ @Path("engine/topics/sinks/{comm: kafka|noop}/{topic}/switches")
public Response commSinkTopicSwitches(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1550,7 +1544,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@PUT
- @Path("engine/topics/sources/{comm: ueb|kafka|noop}/{topic}/switches/lock")
+ @Path("engine/topics/sources/{comm: kafka|noop}/{topic}/switches/lock")
public Response commSourceTopicLock(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1564,7 +1558,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@DELETE
- @Path("engine/topics/sources/{comm: ueb|kafka|noop}/{topic}/switches/lock")
+ @Path("engine/topics/sources/{comm: kafka|noop}/{topic}/switches/lock")
public Response commSourceTopicUnlock(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1578,7 +1572,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@PUT
- @Path("engine/topics/sources/{comm: ueb|kafka|noop}/{topic}/switches/activation")
+ @Path("engine/topics/sources/{comm: kafka|noop}/{topic}/switches/activation")
public Response commSourceTopicActivation(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1592,7 +1586,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@DELETE
- @Path("engine/topics/sources/{comm: ueb|kafka|noop}/{topic}/switches/activation")
+ @Path("engine/topics/sources/{comm: kafka|noop}/{topic}/switches/activation")
public Response commSourceTopicDeactivation(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1606,7 +1600,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@PUT
- @Path("engine/topics/sinks/{comm: ueb|kafka|noop}/{topic}/switches/lock")
+ @Path("engine/topics/sinks/{comm: kafka|noop}/{topic}/switches/lock")
public Response commSinkTopicLock(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1620,7 +1614,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@DELETE
- @Path("engine/topics/sinks/{comm: ueb|kafka|noop}/{topic}/switches/lock")
+ @Path("engine/topics/sinks/{comm: kafka|noop}/{topic}/switches/lock")
public Response commSinkTopicUnlock(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1634,7 +1628,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@PUT
- @Path("engine/topics/sinks/{comm: ueb|kafka|noop}/{topic}/switches/activation")
+ @Path("engine/topics/sinks/{comm: kafka|noop}/{topic}/switches/activation")
public Response commSinkTopicActivation(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1648,7 +1642,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@DELETE
- @Path("engine/topics/sinks/{comm: ueb|kafka|noop}/{topic}/switches/activation")
+ @Path("engine/topics/sinks/{comm: kafka|noop}/{topic}/switches/activation")
public Response commSinkTopicDeactivation(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1676,7 +1670,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@PUT
- @Path("engine/topics/sources/{comm: ueb|kafka|noop}/{topic}/events")
+ @Path("engine/topics/sources/{comm: kafka|noop}/{topic}/events")
@Consumes(MediaType.TEXT_PLAIN)
public Response commEventOffer(
@PathParam("comm") String comm,
diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/Main.java b/policy-management/src/main/java/org/onap/policy/drools/system/Main.java
index 3d167352..f0530d05 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/system/Main.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/system/Main.java
@@ -3,6 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -124,7 +125,7 @@ public class Main {
try {
engineProperties = SystemPersistenceConstants.getManager().getEngineProperties();
} catch (IllegalArgumentException iae) {
- logger.warn("Main: engine properties not found. Using default configuration.", iae);
+ logger.warn("Main: engine properties not found. Using default configuration. {}", iae.getMessage());
engineProperties = PolicyEngineConstants.getManager().defaultTelemetryConfig();
}