summaryrefslogtreecommitdiffstats
path: root/feature-lifecycle/src/main
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-08-24 15:02:30 +0000
committerGerrit Code Review <gerrit@onap.org>2020-08-24 15:02:30 +0000
commit3254c7d85a6540bc3590dbe5559fd4dd55acd825 (patch)
treecb09bd9c0a751a87ed0fbf6c2236846d56ed186c /feature-lifecycle/src/main
parent5640fd1856784bc069c348d47498e57da6c7c433 (diff)
parent78ef929d8bd41712bec2e7c438c95dfa15c1a5bc (diff)
Merge "remove legacy operational policies support"
Diffstat (limited to 'feature-lifecycle/src/main')
-rw-r--r--feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeDroolsController.java18
1 files changed, 4 insertions, 14 deletions
diff --git a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeDroolsController.java b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeDroolsController.java
index 0780d3e9..39930c4c 100644
--- a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeDroolsController.java
+++ b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeDroolsController.java
@@ -29,7 +29,6 @@ import lombok.NonNull;
import org.apache.commons.lang3.StringUtils;
import org.onap.policy.common.gson.annotation.GsonJsonIgnore;
import org.onap.policy.common.utils.coder.CoderException;
-import org.onap.policy.drools.domain.models.legacy.LegacyPolicy;
import org.onap.policy.drools.domain.models.operational.OperationalPolicy;
import org.onap.policy.drools.system.PolicyController;
import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy;
@@ -43,8 +42,6 @@ import org.slf4j.LoggerFactory;
*/
public class PolicyTypeDroolsController implements PolicyTypeController {
- protected static final ToscaPolicyTypeIdentifier legacyType =
- new ToscaPolicyTypeIdentifier("onap.policies.controlloop.Operational", "1.0.0");
protected static final ToscaPolicyTypeIdentifier compliantType =
new ToscaPolicyTypeIdentifier("onap.policies.controlloop.operational.common.Drools", "1.0.0");
@@ -142,20 +139,13 @@ public class PolicyTypeDroolsController implements PolicyTypeController {
}
private List<PolicyController> selectControllers(ToscaPolicy policy) throws CoderException {
- List<PolicyController> selected;
- if (legacyType.equals(policyType)) {
- selected = controllers(
- fsm.getDomainMaker().convertTo(policy, LegacyPolicy.class)
- .getProperties()
- .getControllerName());
- } else if (compliantType.equals(policyType)) {
- selected = controllers(
+ if (compliantType.equals(policyType)) {
+ return controllers(
fsm.getDomainMaker().convertTo(policy, OperationalPolicy.class)
.getProperties()
.getControllerName());
- } else {
- selected = List.copyOf(controllers.values());
}
- return selected;
+
+ return List.copyOf(controllers.values());
}
}