X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=engine-d%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fholmes%2Fengine%2Fresources%2FEngineResources.java;h=97243554b8946e164bda83dff86103b426f2ad10;hb=530fcc3970550c2ddbe62f51c59b9705cbaa244b;hp=8f9a271d75cdd6e07b191db896bdd34b4e42f0bd;hpb=fe3bae00cfa7eac9618856b1dd10a8c03daa8810;p=holmes%2Fengine-management.git diff --git a/engine-d/src/main/java/org/onap/holmes/engine/resources/EngineResources.java b/engine-d/src/main/java/org/onap/holmes/engine/resources/EngineResources.java index 8f9a271..9724355 100644 --- a/engine-d/src/main/java/org/onap/holmes/engine/resources/EngineResources.java +++ b/engine-d/src/main/java/org/onap/holmes/engine/resources/EngineResources.java @@ -33,6 +33,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import lombok.extern.slf4j.Slf4j; import org.jvnet.hk2.annotations.Service; +import org.onap.holmes.common.dmaap.DmaapService; import org.onap.holmes.common.exception.CorrelationException; import org.onap.holmes.common.utils.ExceptionUtil; import org.onap.holmes.common.utils.LanguageUtil; @@ -56,8 +57,8 @@ public class EngineResources { @Produces(MediaType.APPLICATION_JSON) @Timed public CorrelationRuleResponse deployRule( - @ApiParam(value = "The request entity of the HTTP call, which comprises two " - + "fields: \"content\" and \"engineid\". " + @ApiParam(value = "The request entity of the HTTP call, which comprises three " + + "fields: \"content\" , \"loopcontrolname\" and \"engineid\". " + "The \"content\" should be a valid Drools rule string and the \"engineid\" " + "has to be \"engine-d\" in the Amsterdam release.", required = true) DeployRuleRequest deployRuleRequest, @Context HttpServletRequest httpRequest) { @@ -65,8 +66,9 @@ public class EngineResources { CorrelationRuleResponse crResponse = new CorrelationRuleResponse(); Locale locale = LanguageUtil.getLocale(httpRequest); try { - String packageName = droolsEngine.deployRule(deployRuleRequest, locale); + DmaapService.loopControlNames + .put(packageName, deployRuleRequest.getLoopControlName()); log.info("Rule deployed. Package name: " + packageName); crResponse.setPackageName(packageName);