aboutsummaryrefslogtreecommitdiffstats
path: root/policy-management/src/main/java/org/onap/policy/drools/features/PolicyControllerFeatureApi.java
diff options
context:
space:
mode:
authorjhh <jorge.hernandez-herrero@att.com>2020-03-25 19:37:20 -0500
committerjhh <jorge.hernandez-herrero@att.com>2020-03-26 16:54:52 -0500
commit319e008dae673c08706cb41f3da81bf338476035 (patch)
tree3c45a97fc0b5d91402fc512f0ac9becd2dae7bde /policy-management/src/main/java/org/onap/policy/drools/features/PolicyControllerFeatureApi.java
parent2c7a0d5541ba37af068782b0af0482e41f1d4941 (diff)
native policy use engine for top-down processing
This will ensure proper invocation of all feature hooks. Issue-ID: POLICY-2388 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I8d1666bb5e9526faa588e4f613674e080181d4ba Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'policy-management/src/main/java/org/onap/policy/drools/features/PolicyControllerFeatureApi.java')
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/features/PolicyControllerFeatureApi.java29
1 files changed, 26 insertions, 3 deletions
diff --git a/policy-management/src/main/java/org/onap/policy/drools/features/PolicyControllerFeatureApi.java b/policy-management/src/main/java/org/onap/policy/drools/features/PolicyControllerFeatureApi.java
index 9c6ac223..49287786 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/features/PolicyControllerFeatureApi.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/features/PolicyControllerFeatureApi.java
@@ -1,8 +1,8 @@
/*
* ============LICENSE_START=======================================================
- * policy-management
+ * ONAP
* ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ package org.onap.policy.drools.features;
import java.util.Properties;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.utils.services.OrderedService;
+import org.onap.policy.drools.protocol.configuration.DroolsConfiguration;
import org.onap.policy.drools.system.PolicyController;
public interface PolicyControllerFeatureApi extends OrderedService {
@@ -83,7 +84,7 @@ public interface PolicyControllerFeatureApi extends OrderedService {
*
* @return true if this feature intercepts and takes ownership
* of the operation preventing the invocation of
- * lower priority features. False, otherwise..
+ * lower priority features. False, otherwise.
*/
default boolean beforeStop(PolicyController controller) {
return false;
@@ -101,6 +102,28 @@ public interface PolicyControllerFeatureApi extends OrderedService {
}
/**
+ * intercept before the Policy Controller is patched.
+ *
+ * @return true if this feature intercepts and takes ownership
+ * of the operation preventing the invocation of
+ * lower priority features. False, otherwise.
+ */
+ default boolean beforePatch(PolicyController controller, DroolsConfiguration configuration) {
+ return false;
+ }
+
+ /**
+ * intercept after the Policy Controller is patched.
+ *
+ * @return true if this feature intercepts and takes ownership
+ * of the operation preventing the invocation of
+ * lower priority features. False, otherwise.
+ */
+ default boolean afterPatch(PolicyController controller, boolean success) {
+ return false;
+ }
+
+ /**
* intercept before the Policy Controller is locked.
*
* @return true if this feature intercepts and takes ownership