1 package org.openecomp.policy.drools.features;
3 import java.util.Properties;
5 import org.openecomp.policy.drools.system.PolicyController;
6 import org.openecomp.policy.drools.utils.OrderedService;
7 import org.openecomp.policy.drools.utils.OrderedServiceImpl;
9 public interface PolicyControllerFeatureAPI extends OrderedService {
12 * called before creating a controller with name 'name' and
13 * properties 'properties'
15 * @param name name of the the controller
16 * @param properties configuration properties
18 * @return a policy controller. A take over of the creation operation
19 * is performed by returning a non-null policy controller.
20 * 'null' indicates that no take over has taken place, and processing should
21 * continue to the next feature provider.
23 public PolicyController beforeCreate(String name, Properties properties);
26 * called after creating a controller with name 'name'
28 * @param controller controller
30 * @return true if this feature intercepts and takes ownership
31 * of the operation preventing the invocation of
32 * lower priority features. False, otherwise.
34 public boolean afterCreate(PolicyController controller);
37 * Feature providers implementing this interface
39 public static final OrderedServiceImpl<PolicyControllerFeatureAPI> providers =
40 new OrderedServiceImpl<PolicyControllerFeatureAPI>(PolicyControllerFeatureAPI.class);