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=3bfb2e848af14fe017b190bf9086874e374143b1;hb=refs%2Fchanges%2F49%2F66849%2F1;hp=64d727e4bd053cf26b7d77f6d4c5f27a8708df19;hpb=90ab2ddaebb6056b8b5d4306a614ade5d2f1b56f;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 64d727e..3bfb2e8 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 @@ -20,9 +20,6 @@ import com.codahale.metrics.annotation.Timed; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.StringReader; import java.util.Locale; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -60,7 +57,6 @@ public class EngineResources { DroolsEngine droolsEngine; @PUT - @ApiOperation(value = "Deploy a rule into the Drools engine.", response = CorrelationRuleResponse.class) @Produces(MediaType.APPLICATION_JSON) @Timed public CorrelationRuleResponse deployRule( @@ -80,7 +76,7 @@ public class EngineResources { DmaapService.loopControlNames .put(packageName, deployRuleRequest.getLoopControlName()); - String packageNameRet = droolsEngine.deployRule(deployRuleRequest, locale); + String packageNameRet = droolsEngine.deployRule(deployRuleRequest); if (!packageName.equals(packageNameRet)) { log.info("The parsed package name is different from that returned by the engine."); DmaapService.loopControlNames.remove(packageName); @@ -102,7 +98,6 @@ public class EngineResources { } @DELETE - @ApiOperation(value = "Undeploy a rule from the Drools engine.") @Produces(MediaType.APPLICATION_JSON) @Timed @Path("/{packageName}") @@ -112,12 +107,13 @@ public class EngineResources { Locale locale = LanguageUtil.getLocale(httpRequest); try { - droolsEngine.undeployRule(packageName, locale); + droolsEngine.undeployRule(packageName); DmaapService.loopControlNames.remove(packageName); } catch (CorrelationException correlationException) { log.error(correlationException.getMessage(), correlationException); throw ExceptionUtil.buildExceptionResponse(correlationException.getMessage()); } + return true; } @@ -132,7 +128,7 @@ public class EngineResources { Locale locale = LanguageUtil.getLocale(httpRequest); try { - droolsEngine.compileRule(compileRuleRequest.getContent(), locale); + droolsEngine.compileRule(compileRuleRequest.getContent()); } catch (CorrelationException correlationException) { log.error(correlationException.getMessage(), correlationException); throw ExceptionUtil.buildExceptionResponse(correlationException.getMessage());