diff options
author | jhh <jorge.hernandez-herrero@att.com> | 2020-08-20 18:27:40 -0500 |
---|---|---|
committer | jhh <jorge.hernandez-herrero@att.com> | 2020-08-20 18:27:40 -0500 |
commit | 78ef929d8bd41712bec2e7c438c95dfa15c1a5bc (patch) | |
tree | 5bfce695c1a3ffbc7356cfcc50aec079357a6f65 /feature-lifecycle/src/main | |
parent | a7d8e6416439ad5129059a5612896a49bdee0fa8 (diff) |
remove legacy operational policies support
Issue-ID: POLICY-2765
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I6066b8040add53ed32572a71854f3f7094bc41d6
Diffstat (limited to 'feature-lifecycle/src/main')
-rw-r--r-- | feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeDroolsController.java | 18 |
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()); } } |