summaryrefslogtreecommitdiffstats
path: root/holmes-actions/src
diff options
context:
space:
mode:
authorShiwei Tian <tian.shiwei@zte.com.cn>2017-09-25 10:29:29 +0800
committerShiwei Tian <tian.shiwei@zte.com.cn>2017-09-25 10:29:29 +0800
commitd8dd1b86833125a348c274b9dd62b0ff2ca64f19 (patch)
treee5423e9c5ab029ce808934f443b81ab25705b6ed /holmes-actions/src
parent9d2cccba20f32fe54e4ccf1f433f68b5cee95bd5 (diff)
modify pom and rule.enabled = 1
Issue-ID: HOLMES-63 Change-Id: Id136259af2951520f6b9d4781c32f0a64dc4e339 Signed-off-by: Shiwei Tian <tian.shiwei@zte.com.cn>
Diffstat (limited to 'holmes-actions/src')
-rw-r--r--holmes-actions/src/main/java/org/onap/holmes/common/dcae/entity/Rule.java1
-rw-r--r--holmes-actions/src/main/java/org/onap/holmes/common/dcae/utils/DcaeConfigurationParser.java2
-rw-r--r--holmes-actions/src/main/java/org/onap/holmes/common/dmaap/Publisher.java3
3 files changed, 4 insertions, 2 deletions
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<Entry<String, Object>> entries = jsonObject.entrySet();
for (Entry<String, Object> 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;