From d0715ca90465d0f7b3d090234f6b0098194f0101 Mon Sep 17 00:00:00 2001 From: Daniel Cruz Date: Tue, 19 Mar 2019 09:53:24 -0500 Subject: Remove OrderedService references Removed OrderedService and OrderedServiceImpl from the drools-pdp repo to use OrderedService and OrderedServiceImpl from the common repo. All feature interfaces were updated occordingly. Issue-ID: POLICY-1499 Change-Id: Icc80dd1cbe73a97d4832f95ad2dad52d948b711a Signed-off-by: Daniel Cruz --- .../features/DroolsControllerFeatureAPI.java | 4 +- .../features/PolicyControllerFeatureAPI.java | 94 +++++++++++----------- .../drools/features/PolicyEngineFeatureAPI.java | 4 +- 3 files changed, 51 insertions(+), 51 deletions(-) (limited to 'policy-management') diff --git a/policy-management/src/main/java/org/onap/policy/drools/features/DroolsControllerFeatureAPI.java b/policy-management/src/main/java/org/onap/policy/drools/features/DroolsControllerFeatureAPI.java index d8663f10..d11bd145 100644 --- a/policy-management/src/main/java/org/onap/policy/drools/features/DroolsControllerFeatureAPI.java +++ b/policy-management/src/main/java/org/onap/policy/drools/features/DroolsControllerFeatureAPI.java @@ -21,9 +21,9 @@ package org.onap.policy.drools.features; import org.onap.policy.common.endpoints.event.comm.TopicSink; +import org.onap.policy.common.utils.services.OrderedService; +import org.onap.policy.common.utils.services.OrderedServiceImpl; import org.onap.policy.drools.controller.DroolsController; -import org.onap.policy.drools.utils.OrderedService; -import org.onap.policy.drools.utils.OrderedServiceImpl; /** * Drools Controller Feature API. Hooks into the Drools Controller operations. 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 286948ed..40958427 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 @@ -2,14 +2,14 @@ * ============LICENSE_START======================================================= * policy-management * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,27 +23,27 @@ 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.common.utils.services.OrderedServiceImpl; import org.onap.policy.drools.system.PolicyController; -import org.onap.policy.drools.utils.OrderedService; -import org.onap.policy.drools.utils.OrderedServiceImpl; public interface PolicyControllerFeatureAPI extends OrderedService { /** * Feature providers implementing this interface. */ - public static final OrderedServiceImpl providers = + public static final OrderedServiceImpl providers = new OrderedServiceImpl<>(PolicyControllerFeatureAPI.class); /** - * called before creating a controller with name 'name' and + * called before creating a controller with name 'name' and * properties 'properties'. - * + * * @param name name of the the controller * @param properties configuration properties - * + * * @return a policy controller. A take over of the creation operation - * is performed by returning a non-null policy controller. + * is performed by returning a non-null policy controller. * 'null' indicates that no take over has taken place, and processing should * continue to the next feature provider. */ @@ -53,11 +53,11 @@ public interface PolicyControllerFeatureAPI extends OrderedService { /** * called after creating a controller with name 'name'. - * + * * @param controller controller - * + * * @return true if this feature intercepts and takes ownership - * of the operation preventing the invocation of + * of the operation preventing the invocation of * lower priority features. False, otherwise. */ public default boolean afterCreate(PolicyController controller) { @@ -66,9 +66,9 @@ public interface PolicyControllerFeatureAPI extends OrderedService { /** * intercept before the Policy Controller is started. - * + * * @return true if this feature intercepts and takes ownership - * of the operation preventing the invocation of + * of the operation preventing the invocation of * lower priority features. False, otherwise. */ public default boolean beforeStart(PolicyController controller) { @@ -77,9 +77,9 @@ public interface PolicyControllerFeatureAPI extends OrderedService { /** * intercept after the Policy Controller is started. - * + * * @return true if this feature intercepts and takes ownership - * of the operation preventing the invocation of + * of the operation preventing the invocation of * lower priority features. False, otherwise. */ public default boolean afterStart(PolicyController controller) { @@ -88,9 +88,9 @@ public interface PolicyControllerFeatureAPI extends OrderedService { /** * intercept before the Policy Controller is stopped. - * + * * @return true if this feature intercepts and takes ownership - * of the operation preventing the invocation of + * of the operation preventing the invocation of * lower priority features. False, otherwise.. */ public default boolean beforeStop(PolicyController controller) { @@ -99,9 +99,9 @@ public interface PolicyControllerFeatureAPI extends OrderedService { /** * intercept after the Policy Controller is stopped. - * + * * @return true if this feature intercepts and takes ownership - * of the operation preventing the invocation of + * of the operation preventing the invocation of * lower priority features. False, otherwise.d. */ public default boolean afterStop(PolicyController controller) { @@ -110,9 +110,9 @@ public interface PolicyControllerFeatureAPI extends OrderedService { /** * intercept before the Policy Controller is locked. - * + * * @return true if this feature intercepts and takes ownership - * of the operation preventing the invocation of + * of the operation preventing the invocation of * lower priority features. False, otherwise. */ public default boolean beforeLock(PolicyController controller) { @@ -121,9 +121,9 @@ public interface PolicyControllerFeatureAPI extends OrderedService { /** * intercept after the Policy Controller is locked. - * + * * @return true if this feature intercepts and takes ownership - * of the operation preventing the invocation of + * of the operation preventing the invocation of * lower priority features. False, otherwise.. */ public default boolean afterLock(PolicyController controller) { @@ -132,9 +132,9 @@ public interface PolicyControllerFeatureAPI extends OrderedService { /** * intercept before the Policy Controller is locked. - * + * * @return true if this feature intercepts and takes ownership - * of the operation preventing the invocation of + * of the operation preventing the invocation of * lower priority features. False, otherwise. */ public default boolean beforeUnlock(PolicyController controller) { @@ -143,9 +143,9 @@ public interface PolicyControllerFeatureAPI extends OrderedService { /** * intercept after the Policy Controller is locked. - * + * * @return true if this feature intercepts and takes ownership - * of the operation preventing the invocation of + * of the operation preventing the invocation of * lower priority features. False, otherwise. */ public default boolean afterUnlock(PolicyController controller) { @@ -154,9 +154,9 @@ public interface PolicyControllerFeatureAPI extends OrderedService { /** * intercept before the Policy Controller is shut down. - * + * * @return true if this feature intercepts and takes ownership - * of the operation preventing the invocation of + * of the operation preventing the invocation of * lower priority features. False, otherwise.. */ public default boolean beforeShutdown(PolicyController controller) { @@ -165,9 +165,9 @@ public interface PolicyControllerFeatureAPI extends OrderedService { /** * called after the Policy Controller is shut down. - * + * * @return true if this feature intercepts and takes ownership - * of the operation preventing the invocation of + * of the operation preventing the invocation of * lower priority features. False, otherwise. */ public default boolean afterShutdown(PolicyController controller) { @@ -176,9 +176,9 @@ public interface PolicyControllerFeatureAPI extends OrderedService { /** * intercept before the Policy Controller is halted. - * + * * @return true if this feature intercepts and takes ownership - * of the operation preventing the invocation of + * of the operation preventing the invocation of * lower priority features. False, otherwise.. */ public default boolean beforeHalt(PolicyController controller) { @@ -187,9 +187,9 @@ public interface PolicyControllerFeatureAPI extends OrderedService { /** * called after the Policy Controller is halted. - * + * * @return true if this feature intercepts and takes ownership - * of the operation preventing the invocation of + * of the operation preventing the invocation of * lower priority features. False, otherwise. */ public default boolean afterHalt(PolicyController controller) { @@ -199,9 +199,9 @@ public interface PolicyControllerFeatureAPI extends OrderedService { /** * intercept before the Policy Controller is offered an event. - * + * * @return true if this feature intercepts and takes ownership. - * of the operation preventing the invocation of + * of the operation preventing the invocation of * lower priority features. False, otherwise. */ public default boolean beforeOffer(PolicyController controller, @@ -213,24 +213,24 @@ public interface PolicyControllerFeatureAPI extends OrderedService { /** * called after the Policy Controller processes an event offer. - * + * * @return true if this feature intercepts and takes ownership - * of the operation preventing the invocation of + * of the operation preventing the invocation of * lower priority features. False, otherwise. */ public default boolean afterOffer(PolicyController controller, CommInfrastructure protocol, String topic, - String event, + String event, boolean success) { return false; } /** * intercept before the Policy Controller delivers (posts) an event. - * + * * @return true if this feature intercepts and takes ownership - * of the operation preventing the invocation of + * of the operation preventing the invocation of * lower priority features. False, otherwise. */ public default boolean beforeDeliver(PolicyController controller, @@ -242,15 +242,15 @@ public interface PolicyControllerFeatureAPI extends OrderedService { /** * called after the Policy Controller delivers (posts) an event. - * + * * @return true if this feature intercepts and takes ownership - * of the operation preventing the invocation of + * of the operation preventing the invocation of * lower priority features. False, otherwise. */ public default boolean afterDeliver(PolicyController controller, CommInfrastructure protocol, String topic, - Object event, + Object event, boolean success) { return false; } 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 a8772117..9b099909 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 @@ -22,10 +22,10 @@ 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.common.utils.services.OrderedServiceImpl; import org.onap.policy.drools.protocol.configuration.PdpdConfiguration; import org.onap.policy.drools.system.PolicyEngine; -import org.onap.policy.drools.utils.OrderedService; -import org.onap.policy.drools.utils.OrderedServiceImpl; /** * Policy Engine Feature API. -- cgit 1.2.3-korg