summaryrefslogtreecommitdiffstats
path: root/policy-management/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'policy-management/src/main')
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/features/PolicyControllerFeatureApi.java7
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/system/internal/AggregatedPolicyController.java4
2 files changed, 7 insertions, 4 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 49287786..d11863f0 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
@@ -108,7 +108,8 @@ public interface PolicyControllerFeatureApi extends OrderedService {
* of the operation preventing the invocation of
* lower priority features. False, otherwise.
*/
- default boolean beforePatch(PolicyController controller, DroolsConfiguration configuration) {
+ default boolean beforePatch(
+ PolicyController controller, DroolsConfiguration oldConfiguration, DroolsConfiguration newConfiguration) {
return false;
}
@@ -119,7 +120,9 @@ public interface PolicyControllerFeatureApi extends OrderedService {
* of the operation preventing the invocation of
* lower priority features. False, otherwise.
*/
- default boolean afterPatch(PolicyController controller, boolean success) {
+ default boolean afterPatch(
+ PolicyController controller, DroolsConfiguration oldConfiguration,
+ DroolsConfiguration newConfiguration, boolean success) {
return false;
}
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 b80f4c86..0c12dbcb 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
@@ -227,7 +227,7 @@ public class AggregatedPolicyController implements PolicyController, TopicListen
}
if (FeatureApiUtils.apply(getProviders(),
- feature -> feature.beforePatch(this, newDroolsConfiguration),
+ feature -> feature.beforePatch(this, oldDroolsConfiguration, newDroolsConfiguration),
(feature, ex) -> logger.error("{}: feature {} before-patch failure because of {}", this,
feature.getClass().getName(), ex.getMessage(), ex))) {
return true;
@@ -268,7 +268,7 @@ public class AggregatedPolicyController implements PolicyController, TopicListen
boolean finalSuccess = success;
FeatureApiUtils.apply(getProviders(),
- feature -> feature.afterPatch(this, finalSuccess),
+ feature -> feature.afterPatch(this, oldDroolsConfiguration, newDroolsConfiguration, finalSuccess),
(feature, ex) -> logger.error("{}: feature {} after-patch failure because of {}", this,
feature.getClass().getName(), ex.getMessage(), ex));