From 0429a71c2ca41cd311473c9485fa98bbcadaa542 Mon Sep 17 00:00:00 2001 From: s00370346 Date: Wed, 27 Mar 2019 10:06:03 +0530 Subject: Issue-ID: DCAEGEN2-1055 RestConfCollector bug fixes Change-Id: I4623217ab69eaeecf1b5704172ad4de37e641312 Signed-off-by: s00370346 --- .../dcae/common/ControllerActivationState.java | 25 ++++++++++++++++++++++ .../java/org/onap/dcae/common/EventProcessor.java | 4 ++-- 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 src/main/java/org/onap/dcae/common/ControllerActivationState.java (limited to 'src/main/java/org/onap/dcae/common') diff --git a/src/main/java/org/onap/dcae/common/ControllerActivationState.java b/src/main/java/org/onap/dcae/common/ControllerActivationState.java new file mode 100644 index 0000000..deb2b1f --- /dev/null +++ b/src/main/java/org/onap/dcae/common/ControllerActivationState.java @@ -0,0 +1,25 @@ +/*- + * ============LICENSE_START======================================================= + * org.onap.dcaegen2.collectors.restconf + * ================================================================================ + * Copyright (C) 2018-2019 Huawei. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.common; + +public enum ControllerActivationState { + INIT, ACTIVE, NONE; +} diff --git a/src/main/java/org/onap/dcae/common/EventProcessor.java b/src/main/java/org/onap/dcae/common/EventProcessor.java index 164aed3..cf44921 100644 --- a/src/main/java/org/onap/dcae/common/EventProcessor.java +++ b/src/main/java/org/onap/dcae/common/EventProcessor.java @@ -76,9 +76,9 @@ public class EventProcessor implements Runnable { private void sendEventsToStreams(String[] streamIdList, EventData ev) { for (String aStreamIdList : streamIdList) { log.info("Invoking publisher for streamId:" + aStreamIdList); - if (!ev.getConn().getEvent_ruleId().equals("")) { + if (!ev.getConn().getEventRuleId().equals("")) { JSONObject customHeader = new JSONObject(); - customHeader.put("rule-id", ev.getConn().getEvent_ruleId()); + customHeader.put("rule-id", ev.getConn().getEventRuleId()); eventPublisher.sendEvent(overrideEvent(customHeader, ev.getEventObj()), aStreamIdList); } else { eventPublisher.sendEvent(ev.getEventObj(), aStreamIdList); -- cgit 1.2.3-korg