diff options
Diffstat (limited to 'rules/mdons-rule.drl')
-rw-r--r-- | rules/mdons-rule.drl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rules/mdons-rule.drl b/rules/mdons-rule.drl index 4b7dc01..9f4d6ed 100644 --- a/rules/mdons-rule.drl +++ b/rules/mdons-rule.drl @@ -8,7 +8,7 @@ import org.onap.holmes.common.exception.CorrelationException; import org.onap.holmes.common.dmaap.entity.PolicyMsg;
import org.onap.holmes.common.dmaap.DmaapService;
import org.onap.holmes.common.utils.DroolsLog;
-import org.onap.holmes.common.dropwizard.ioc.utils.ServiceLocatorHolder;
+import org.onap.holmes.common.utils.SpringContextUtil;
import org.onap.holmes.common.dmaap.store.UniqueRequestIdCache;
@@ -51,7 +51,7 @@ function PolicyMsg createPolicyMsg(VesAlarm alarm, String serviceInstanceId, Str m.setTarget("vserver.vserver-name");
m.setAai(getAaiObjectPolicy(serviceName, serviceInstanceId));
- ServiceLocatorHolder.getLocator().getService(UniqueRequestIdCache.class).put(alarm.getEventId(), m.getRequestID());
+ SpringContextUtil.getBean(UniqueRequestIdCache.class).put(alarm.getEventId(), m.getRequestID());
return m;
}
@@ -74,7 +74,7 @@ rule "Process Alarms MSA" Map<String, String> map = processAlarm($a.getSourceId() + "-XPDR1");
for(Map.Entry<String,String> entry : map.entrySet()){
PolicyMsg msg = createPolicyMsg($a, entry.getKey(), entry.getValue());
- DmaapService dmaapService = ServiceLocatorHolder.getLocator().getService(DmaapService.class);
+ DmaapService dmaapService = SpringContextUtil.getBean(DmaapService.class);
dmaapService.publishPolicyMsg(msg, "dcae_cl_out");
DroolsLog.printInfo("Published to policy=" + msg.toString());
@@ -94,7 +94,7 @@ rule "Process Alarms TAPI" Map<String, String> map = processAlarm($a.getEventId());
for(Map.Entry<String,String> entry : map.entrySet()){
PolicyMsg msg = createPolicyMsg($a, entry.getKey(), entry.getValue());
- DmaapService dmaapService = ServiceLocatorHolder.getLocator().getService(DmaapService.class);
+ DmaapService dmaapService = SpringContextUtil.getBean(DmaapService.class);
dmaapService.publishPolicyMsg(msg, "dcae_cl_out");
DroolsLog.printInfo("Published to policy=" + msg.toString());
|