From d8dd1b86833125a348c274b9dd62b0ff2ca64f19 Mon Sep 17 00:00:00 2001 From: Shiwei Tian Date: Mon, 25 Sep 2017 10:29:29 +0800 Subject: modify pom and rule.enabled = 1 Issue-ID: HOLMES-63 Change-Id: Id136259af2951520f6b9d4781c32f0a64dc4e339 Signed-off-by: Shiwei Tian --- .../src/main/java/org/onap/holmes/common/dcae/entity/Rule.java | 1 + .../org/onap/holmes/common/dcae/utils/DcaeConfigurationParser.java | 2 +- .../src/main/java/org/onap/holmes/common/dmaap/Publisher.java | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'holmes-actions/src/main/java/org') diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/dcae/entity/Rule.java b/holmes-actions/src/main/java/org/onap/holmes/common/dcae/entity/Rule.java index 4ff1d05..207f224 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/dcae/entity/Rule.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/dcae/entity/Rule.java @@ -26,4 +26,5 @@ import lombok.Setter; public class Rule { private String name; private String contents; + private int enabled = 1; } diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/dcae/utils/DcaeConfigurationParser.java b/holmes-actions/src/main/java/org/onap/holmes/common/dcae/utils/DcaeConfigurationParser.java index 260b26a..e4899d3 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/dcae/utils/DcaeConfigurationParser.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/dcae/utils/DcaeConfigurationParser.java @@ -102,7 +102,7 @@ public class DcaeConfigurationParser { Set> entries = jsonObject.entrySet(); for (Entry entry : entries) { if (entry.getKey().startsWith("holmes.default.rule")) { - ret.addDefaultRule(new Rule(entry.getKey(), (String) entry.getValue())); + ret.addDefaultRule(new Rule(entry.getKey(), (String) entry.getValue(), 1)); } } } diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/Publisher.java b/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/Publisher.java index eaeaf43..035ecaa 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/Publisher.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/Publisher.java @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.onap.holmes.common.dmaap; import com.fasterxml.jackson.core.JsonProcessingException; @@ -27,11 +26,13 @@ import javax.ws.rs.core.Response; import lombok.Getter; import lombok.Setter; import org.glassfish.jersey.client.ClientConfig; +import org.jvnet.hk2.annotations.Service; import org.onap.holmes.common.dmaap.entity.PolicyMsg; import org.onap.holmes.common.exception.CorrelationException; @Getter @Setter +@Service public class Publisher { private String topic; -- cgit 1.2.3-korg