summaryrefslogtreecommitdiffstats
path: root/policy-management/src/main/java/org/onap
diff options
context:
space:
mode:
Diffstat (limited to 'policy-management/src/main/java/org/onap')
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/system/PolicyController.java5
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/system/internal/AggregatedPolicyController.java17
2 files changed, 12 insertions, 10 deletions
diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyController.java b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyController.java
index 82cd015e..7501aed5 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyController.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyController.java
@@ -3,6 +3,7 @@
* policy-management
* ================================================================================
* Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +30,7 @@ import org.onap.policy.common.endpoints.event.comm.TopicSink;
import org.onap.policy.common.endpoints.event.comm.TopicSource;
import org.onap.policy.drools.controller.DroolsController;
import org.onap.policy.drools.protocol.configuration.DroolsConfiguration;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyTypeIdentifier;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
/**
* A Policy Controller is the higher level unit of control. It corresponds to the ncomp equivalent
@@ -63,7 +64,7 @@ public interface PolicyController extends Startable, Lockable {
/**
* Get Policy Types supported by this controller.
*/
- List<ToscaPolicyTypeIdentifier> getPolicyTypes();
+ List<ToscaConceptIdentifier> getPolicyTypes();
/**
* Update maven configuration.
diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/internal/AggregatedPolicyController.java b/policy-management/src/main/java/org/onap/policy/drools/system/internal/AggregatedPolicyController.java
index 3f744024..e14b1620 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/system/internal/AggregatedPolicyController.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/system/internal/AggregatedPolicyController.java
@@ -3,6 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -46,7 +47,7 @@ import org.onap.policy.drools.properties.DroolsPropertyConstants;
import org.onap.policy.drools.protocol.configuration.DroolsConfiguration;
import org.onap.policy.drools.system.PolicyController;
import org.onap.policy.drools.utils.PropertyUtil;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyTypeIdentifier;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -110,7 +111,7 @@ public class AggregatedPolicyController implements PolicyController, TopicListen
/**
* Policy Types.
*/
- private List<ToscaPolicyTypeIdentifier> policyTypes;
+ private List<ToscaConceptIdentifier> policyTypes;
/**
* Constructor version mainly used for bootstrapping at initialization time a policy engine
@@ -147,7 +148,7 @@ public class AggregatedPolicyController implements PolicyController, TopicListen
}
@Override
- public List<ToscaPolicyTypeIdentifier> getPolicyTypes() {
+ public List<ToscaConceptIdentifier> getPolicyTypes() {
if (!policyTypes.isEmpty()) {
return policyTypes;
}
@@ -156,13 +157,13 @@ public class AggregatedPolicyController implements PolicyController, TopicListen
.get()
.getBaseDomainNames()
.stream()
- .map(d -> new ToscaPolicyTypeIdentifier(d,
+ .map(d -> new ToscaConceptIdentifier(d,
DroolsPropertyConstants.DEFAULT_CONTROLLER_POLICY_TYPE_VERSION))
.collect(Collectors.toList());
}
- protected List<ToscaPolicyTypeIdentifier> getPolicyTypesFromProperties() {
- List<ToscaPolicyTypeIdentifier> policyTypeIds = new ArrayList<>();
+ protected List<ToscaConceptIdentifier> getPolicyTypesFromProperties() {
+ List<ToscaConceptIdentifier> policyTypeIds = new ArrayList<>();
String ptiPropValue = properties.getProperty(DroolsPropertyConstants.PROPERTY_CONTROLLER_POLICY_TYPES);
if (ptiPropValue == null) {
@@ -173,10 +174,10 @@ public class AggregatedPolicyController implements PolicyController, TopicListen
for (String pti : ptiPropList) {
String[] ptv = pti.split(":");
if (ptv.length == 1) {
- policyTypeIds.add(new ToscaPolicyTypeIdentifier(ptv[0],
+ policyTypeIds.add(new ToscaConceptIdentifier(ptv[0],
DroolsPropertyConstants.DEFAULT_CONTROLLER_POLICY_TYPE_VERSION));
} else if (ptv.length == 2) {
- policyTypeIds.add(new ToscaPolicyTypeIdentifier(ptv[0], ptv[1]));
+ policyTypeIds.add(new ToscaConceptIdentifier(ptv[0], ptv[1]));
}
}