diff options
author | jhh <jorge.hernandez-herrero@att.com> | 2019-09-04 21:26:56 -0500 |
---|---|---|
committer | jhh <jorge.hernandez-herrero@att.com> | 2019-09-04 21:32:56 -0500 |
commit | 5d526310e8d2f3c729af4c6a8b1eec0f0a79008d (patch) | |
tree | 25860a90c164b4c581cbdd5eaa8acc04e4e95629 /policy-management/src/main/java/org/onap/policy/drools/features/PolicyEngineFeatureApi.java | |
parent | 1281abe9fdb4a2e0a4f4880b8e0b9b375a0b9a3d (diff) |
Split Engine start method into "start" and "open"
"open" meaning to open external configuration interfaces
to external provisioning systems.
Issue-ID: POLICY-2055
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ic984f0ebccd088503b6b13620c3b80ed8e640899
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'policy-management/src/main/java/org/onap/policy/drools/features/PolicyEngineFeatureApi.java')
-rw-r--r-- | policy-management/src/main/java/org/onap/policy/drools/features/PolicyEngineFeatureApi.java | 98 |
1 files changed, 59 insertions, 39 deletions
diff --git a/policy-management/src/main/java/org/onap/policy/drools/features/PolicyEngineFeatureApi.java b/policy-management/src/main/java/org/onap/policy/drools/features/PolicyEngineFeatureApi.java index b6d827a4..fe31eb50 100644 --- a/policy-management/src/main/java/org/onap/policy/drools/features/PolicyEngineFeatureApi.java +++ b/policy-management/src/main/java/org/onap/policy/drools/features/PolicyEngineFeatureApi.java @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * policy-engine + * ONAP * ================================================================================ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. * ================================================================================ @@ -33,200 +33,200 @@ import org.onap.policy.drools.system.PolicyEngine; public interface PolicyEngineFeatureApi extends OrderedService { /** - * intercept before the Policy Engine is commanded to boot. + * Intercept before the Policy Engine is commanded to boot. * * @return true if this feature intercepts and takes ownership * of the operation preventing the invocation of * lower priority features. False, otherwise. */ - public default boolean beforeBoot(PolicyEngine engine, String[] cliArgs) { + default boolean beforeBoot(PolicyEngine engine, String[] cliArgs) { return false; } /** - * intercept after the Policy Engine is booted. + * Intercept after the Policy Engine is booted. * * @return true if this feature intercepts and takes ownership * of the operation preventing the invocation of * lower priority features. False, otherwise. */ - public default boolean afterBoot(PolicyEngine engine) { + default boolean afterBoot(PolicyEngine engine) { return false; } /** - * intercept before the Policy Engine is configured. + * Intercept before the Policy Engine is configured. * * @return true if this feature intercepts and takes ownership * of the operation preventing the invocation of * lower priority features. False, otherwise. */ - public default boolean beforeConfigure(PolicyEngine engine, Properties properties) { + default boolean beforeConfigure(PolicyEngine engine, Properties properties) { return false; } /** - * intercept after the Policy Engine is configured. + * Intercept after the Policy Engine is configured. * * @return true if this feature intercepts and takes ownership * of the operation preventing the invocation of * lower priority features. False, otherwise. */ - public default boolean afterConfigure(PolicyEngine engine) { + default boolean afterConfigure(PolicyEngine engine) { return false; } /** - * intercept before the Policy Engine goes active. + * Intercept before the Policy Engine goes active. * * @return true if this feature intercepts and takes ownership * of the operation preventing the invocation of * lower priority features. False, otherwise. */ - public default boolean beforeActivate(PolicyEngine engine) { + default boolean beforeActivate(PolicyEngine engine) { return false; } /** - * intercept after the Policy Engine goes active. + * Intercept after the Policy Engine goes active. * * @return true if this feature intercepts and takes ownership * of the operation preventing the invocation of * lower priority features. False, otherwise. */ - public default boolean afterActivate(PolicyEngine engine) { + default boolean afterActivate(PolicyEngine engine) { return false; } /** - * intercept before the Policy Engine goes standby. + * Intercept before the Policy Engine goes standby. * * @return true if this feature intercepts and takes ownership * of the operation preventing the invocation of * lower priority features. False, otherwise. */ - public default boolean beforeDeactivate(PolicyEngine engine) { + default boolean beforeDeactivate(PolicyEngine engine) { return false; } /** - * intercept after the Policy Engine goes standby. + * Intercept after the Policy Engine goes standby. * * @return true if this feature intercepts and takes ownership * of the operation preventing the invocation of * lower priority features. False, otherwise. */ - public default boolean afterDeactivate(PolicyEngine engine) { + default boolean afterDeactivate(PolicyEngine engine) { return false; } /** - * intercept before the Policy Engine is started. + * Intercept before the Policy Engine is started. * * @return true if this feature intercepts and takes ownership * of the operation preventing the invocation of * lower priority features. False, otherwise. */ - public default boolean beforeStart(PolicyEngine engine) { + default boolean beforeStart(PolicyEngine engine) { return false; } /** - * intercept after the Policy Engine is started. + * Intercept after the Policy Engine is started. * * @return true if this feature intercepts and takes ownership * of the operation preventing the invocation of * lower priority features. False, otherwise. */ - public default boolean afterStart(PolicyEngine engine) { + default boolean afterStart(PolicyEngine engine) { return false; } /** - * intercept before the Policy Engine is stopped. + * Intercept before the Policy Engine is stopped. * * @return true if this feature intercepts and takes ownership * of the operation preventing the invocation of * lower priority features. False, otherwise.. */ - public default boolean beforeStop(PolicyEngine engine) { + default boolean beforeStop(PolicyEngine engine) { return false; } /** - * intercept after the Policy Engine is stopped. + * Intercept after the Policy Engine is stopped. * * @return true if this feature intercepts and takes ownership * of the operation preventing the invocation of * lower priority features. False, otherwise.d. */ - public default boolean afterStop(PolicyEngine engine) { + default boolean afterStop(PolicyEngine engine) { return false; } /** - * intercept before the Policy Engine is locked. + * Intercept before the Policy Engine is locked. * * @return true if this feature intercepts and takes ownership * of the operation preventing the invocation of * lower priority features. False, otherwise. */ - public default boolean beforeLock(PolicyEngine engine) { + default boolean beforeLock(PolicyEngine engine) { return false; } /** - * intercept after the Policy Engine is locked. + * Intercept after the Policy Engine is locked. * * @return true if this feature intercepts and takes ownership * of the operation preventing the invocation of * lower priority features. False, otherwise.. */ - public default boolean afterLock(PolicyEngine engine) { + default boolean afterLock(PolicyEngine engine) { return false; } /** - * intercept before the Policy Engine is locked. + * Intercept before the Policy Engine is locked. * * @return true if this feature intercepts and takes ownership * of the operation preventing the invocation of * lower priority features. False, otherwise. */ - public default boolean beforeUnlock(PolicyEngine engine) { + default boolean beforeUnlock(PolicyEngine engine) { return false; } /** - * intercept after the Policy Engine is locked. + * Intercept after the Policy Engine is locked. * * @return true if this feature intercepts and takes ownership * of the operation preventing the invocation of * lower priority features. False, otherwise. */ - public default boolean afterUnlock(PolicyEngine engine) { + default boolean afterUnlock(PolicyEngine engine) { return false; } /** - * intercept the Policy Engine is shut down. + * Intercept the Policy Engine is shut down. * * @return true if this feature intercepts and takes ownership * of the operation preventing the invocation of * lower priority features. False, otherwise.. */ - public default boolean beforeShutdown(PolicyEngine engine) { + default boolean beforeShutdown(PolicyEngine engine) { return false; } /** - * called after the Policy Engine is shut down. + * Called after the Policy Engine is shut down. * * @return true if this feature intercepts and takes ownership * of the operation preventing the invocation of * lower priority features. False, otherwise. */ - public default boolean afterShutdown(PolicyEngine engine) { + default boolean afterShutdown(PolicyEngine engine) { return false; } @@ -236,7 +236,7 @@ public interface PolicyEngineFeatureApi extends OrderedService { * @return True if this feature intercepts and takes ownership of the operation * preventing the invocation of lower priority features. False, otherwise. */ - public default boolean beforeOnTopicEvent(PolicyEngine engine, CommInfrastructure commType, String topic, + default boolean beforeOnTopicEvent(PolicyEngine engine, CommInfrastructure commType, String topic, String event) { return false; } @@ -247,8 +247,28 @@ public interface PolicyEngineFeatureApi extends OrderedService { * @return True if this feature intercepts and takes ownership of the operation * preventing the invocation of lower priority features. False, otherwise */ - public default boolean afterOnTopicEvent(PolicyEngine engine, PdpdConfiguration configuration, + default boolean afterOnTopicEvent(PolicyEngine engine, PdpdConfiguration configuration, CommInfrastructure commType, String topic, String event) { return false; } + + /** + * Called before the PolicyEngine opens its external configuration interfaces. + * + * @return True if this feature intercepts and takes ownership of the operation + * preventing the invocation of lower priority features. False, otherwise + */ + default boolean beforeOpen(PolicyEngine engine) { + return false; + } + + /** + * Called after the PolicyEngine opens its external configuration interfaces. + * + * @return True if this feature intercepts and takes ownership of the operation + * preventing the invocation of lower priority features. False, otherwise + */ + default boolean afterOpen(PolicyEngine engine) { + return false; + } } |