diff options
author | 2017-02-24 15:55:40 +0800 | |
---|---|---|
committer | 2017-02-24 15:55:40 +0800 | |
commit | 30dbb0ad8f14302718c2091b7ab16190baa647bc (patch) | |
tree | bc566f82ed3eea2520ee77b8637aadf43354e65c /holmes-actions/src | |
parent | 959b668ee3bebc777f26fde722cba67d79dfb659 (diff) |
Fix delete cannot class And modify exception
Change-Id: I5d73bf2eefd395a71f2f612bd0f2d29fcdd395b3
Issue-ID:HOLMES-37
Signed-off-by: FengLiang <feng.liang1@zte.com.cn>
Diffstat (limited to 'holmes-actions/src')
15 files changed, 3 insertions, 662 deletions
diff --git a/holmes-actions/src/main/java/org/openo/holmes/common/api/AlarmsCorrelationDbService.java b/holmes-actions/src/main/java/org/openo/holmes/common/api/AlarmsCorrelationDbService.java deleted file mode 100644 index 4057c03..0000000 --- a/holmes-actions/src/main/java/org/openo/holmes/common/api/AlarmsCorrelationDbService.java +++ /dev/null @@ -1,33 +0,0 @@ -/**
- * Copyright 2017 ZTE Corporation.
- *
- * 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.
- */
-package org.openo.holmes.common.api;
-
-import java.util.List;
-import org.jvnet.hk2.annotations.Contract;
-import org.openo.holmes.common.api.entity.AlarmsCorrelation;
-import org.openo.holmes.common.api.entity.AlarmsCorrelationFilter;
-import org.openo.holmes.common.exception.DbException;
-
-@Contract
-public interface AlarmsCorrelationDbService {
-
- public void saveAlarmsCorrelation(AlarmsCorrelation alarmsCorrelation) throws DbException;
-
- public List<AlarmsCorrelation> queryAlarmsCorrelationByFilter(
- AlarmsCorrelationFilter alarmsCorrelationFilter) throws DbException;
-
- public List<AlarmsCorrelation> queryAllAlarmsCorrelation();
-}
diff --git a/holmes-actions/src/main/java/org/openo/holmes/common/api/AlarmsCorrelationMqService.java b/holmes-actions/src/main/java/org/openo/holmes/common/api/AlarmsCorrelationMqService.java deleted file mode 100644 index 8d34e3e..0000000 --- a/holmes-actions/src/main/java/org/openo/holmes/common/api/AlarmsCorrelationMqService.java +++ /dev/null @@ -1,39 +0,0 @@ -/**
- * Copyright 2017 ZTE Corporation.
- *
- * 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.
- */
-package org.openo.holmes.common.api;
-
-import org.jvnet.hk2.annotations.Contract;
-import org.openo.holmes.common.api.stat.Alarm;
-
-@Contract
-public interface AlarmsCorrelationMqService {
-
- public static final String MQ_TOPIC_NAME_ALARMS_CORRELATION =
- "topic://voss/fm/alarms_correlation";
-
- public static final String MQ_QUEUE_NAME_ALARMS_CORRELATION =
- "queue://voss/fm/alarms_correlation";
-
- public static final String MQ_TOPIC_NAME_ALARM = "topic://voss/fm/alarm";
-
- public boolean sendMQTopicMsg(String ruleId, long createTimeL, Alarm parentAlarm,
- Alarm childAlarm);
-
- public boolean sendMQTopicMsg(Alarm alarm);
-
- public boolean sendMQQueueMsg(String ruleId, long createTimeL, Alarm parentAlarm,
- Alarm childAlarm);
-}
diff --git a/holmes-actions/src/main/java/org/openo/holmes/common/api/entity/AlarmsCorrelationFilter.java b/holmes-actions/src/main/java/org/openo/holmes/common/api/entity/AlarmsCorrelationFilter.java deleted file mode 100644 index bdbc02c..0000000 --- a/holmes-actions/src/main/java/org/openo/holmes/common/api/entity/AlarmsCorrelationFilter.java +++ /dev/null @@ -1,38 +0,0 @@ -/**
- * Copyright 2017 ZTE Corporation.
- *
- * 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.
- */
-package org.openo.holmes.common.api.entity;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-@Data
-@NoArgsConstructor
-public class AlarmsCorrelationFilter {
-
- @JsonProperty(value = "ruleid")
- private String ruleId;
-
- @JsonProperty(value = "parentalarmid")
- private long parentAlarmId;
-
- @JsonProperty(value = "childalarmid")
- private long childAlarmId;
-
- @JsonProperty(value = "where")
- private String where;
-}
diff --git a/holmes-actions/src/main/java/org/openo/holmes/common/config/MQConfig.java b/holmes-actions/src/main/java/org/openo/holmes/common/config/MQConfig.java index d225dae..6553998 100644 --- a/holmes-actions/src/main/java/org/openo/holmes/common/config/MQConfig.java +++ b/holmes-actions/src/main/java/org/openo/holmes/common/config/MQConfig.java @@ -25,54 +25,15 @@ public class MQConfig { @JsonProperty @NotNull - public String brokerIp = "localhost"; + public String brokerIp; @JsonProperty @NotNull - public int brokerPort = 5672; - + public int brokerPort; @JsonProperty public String brokerUsername; @JsonProperty public String brokerPassword; - - @JsonProperty - public boolean autoDiscover = false; - - @JsonProperty - public String mqServiceName = "mqService"; - - @JsonProperty - public String mqServiceVersion = "v1"; - - - @JsonProperty - public long healthCheckMillisecondsToWait = 2000; // 2 seconds - - @JsonProperty - public int shutdownWaitInSeconds = 20; - - @JsonProperty - public int timeToLiveInSeconds = -1; // Default no TTL. Jackson does not support java.util.Optional yet. - - @JsonProperty - public Map<String, String> extConsumerConfMap = new HashMap<>(); - - @JsonProperty - public Map<String, String> extProducerConfMap = new HashMap<>(); - - - @Override - public String toString() { - return "MQConfig [brokerIp=" + brokerIp + ", brokerPort=" + brokerPort + ", brokerUsername=" - + brokerUsername + ", brokerPassword=" + brokerPassword + ", autoDiscover=" - + autoDiscover + ", mqServiceName=" + mqServiceName + ", mqServiceVersion=" - + mqServiceVersion + ", healthCheckMillisecondsToWait=" + healthCheckMillisecondsToWait - + ", shutdownWaitInSeconds=" + shutdownWaitInSeconds + ", timeToLiveInSeconds=" - + timeToLiveInSeconds + "]"; - } - - } diff --git a/holmes-actions/src/main/java/org/openo/holmes/common/constant/MicroServiceConst.java b/holmes-actions/src/main/java/org/openo/holmes/common/constant/MicroServiceConst.java deleted file mode 100644 index c0f5d5e..0000000 --- a/holmes-actions/src/main/java/org/openo/holmes/common/constant/MicroServiceConst.java +++ /dev/null @@ -1,28 +0,0 @@ -/**
- * Copyright 2017 ZTE Corporation.
- *
- * 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.
- */
-package org.openo.holmes.common.constant;
-
-public interface MicroServiceConst {
-
- public static final String CORRELATION_ENGINE = "correlation-engine";
-
- public static final String VERSION = "v1";
-
- public static final String ENGINE_PATH = "/api/correlation-engine/v1/rule";
-
- public static final String CORRELATION_ENGINE_SERVICE_NAME = CORRELATION_ENGINE;
-
-}
diff --git a/holmes-actions/src/main/java/org/openo/holmes/common/db/AlarmCorrelationQueryDao.java b/holmes-actions/src/main/java/org/openo/holmes/common/db/AlarmCorrelationQueryDao.java deleted file mode 100644 index 3e8bfc8..0000000 --- a/holmes-actions/src/main/java/org/openo/holmes/common/db/AlarmCorrelationQueryDao.java +++ /dev/null @@ -1,57 +0,0 @@ -/**
- * Copyright 2017 ZTE Corporation.
- *
- * 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.
- */
-package org.openo.holmes.common.db;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import javax.inject.Inject;
-
-import org.jvnet.hk2.annotations.Service;
-import org.openo.holmes.common.api.entity.AlarmsCorrelation;
-import org.skife.jdbi.v2.Query;
-
-import org.openo.holmes.common.db.mapper.AlarmsCorrelationMapper;
-import org.openo.holmes.common.utils.DbDaoUtil;
-
-import lombok.extern.slf4j.Slf4j;
-
-@Service
-@Slf4j
-public class AlarmCorrelationQueryDao {
-
- @Inject
- private DbDaoUtil dbDaoUtil;
-
- @Inject
- private AlarmsCorrelationMapper mapper;
-
- private final static String SELECT_TABLE_SQL = "SELECT * FROM APLUS_CORRELATION ";
-
- public List<AlarmsCorrelation> queryByFilter(String where) {
- List<AlarmsCorrelation> alarmsCorrelations = new ArrayList<AlarmsCorrelation>();
- StringBuilder querySql = new StringBuilder(SELECT_TABLE_SQL).append(where);
- log.info("Query alarm correlation table! Sql:[" + querySql + "].");
- Query<Map<String, Object>> query = dbDaoUtil.getHandle().createQuery(querySql.toString());
- List<Map<String, Object>> dbDataMaps = query.list();
- for (Map<String, Object> map : dbDataMaps) {
- alarmsCorrelations.add(mapper.getAlarmCorrelationByMap(map));
- }
- log.info("Success to query alarm correlation table! total count:[" + dbDataMaps.size() + "].");
- return alarmsCorrelations;
- }
-}
diff --git a/holmes-actions/src/main/java/org/openo/holmes/common/db/AlarmsCorrelationDao.java b/holmes-actions/src/main/java/org/openo/holmes/common/db/AlarmsCorrelationDao.java deleted file mode 100644 index 43c8bf2..0000000 --- a/holmes-actions/src/main/java/org/openo/holmes/common/db/AlarmsCorrelationDao.java +++ /dev/null @@ -1,36 +0,0 @@ -/**
- * Copyright 2017 ZTE Corporation.
- *
- * 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.
- */
-package org.openo.holmes.common.db;
-
-import java.util.List;
-
-import org.openo.holmes.common.api.entity.AlarmsCorrelation;
-import org.skife.jdbi.v2.sqlobject.BindBean;
-import org.skife.jdbi.v2.sqlobject.SqlQuery;
-import org.skife.jdbi.v2.sqlobject.SqlUpdate;
-import org.skife.jdbi.v2.sqlobject.customizers.RegisterMapper;
-
-import org.openo.holmes.common.db.mapper.AlarmsCorrelationMapper;
-
-@RegisterMapper(AlarmsCorrelationMapper.class)
-public interface AlarmsCorrelationDao {
-
- @SqlUpdate("INSERT INTO APLUS_CORRELATION (ruleId,ruleInfo,resultType,createTime,parentAlarmId,childAlarmId,reserve1,reserve2,reserve3) values(:ruleId,:ruleInfo,:resultType,:createTime,:parentAlarmId,:childAlarmId,:reserve1,:reserve2,:reserve3)")
- public abstract void save(@BindBean AlarmsCorrelation aplusCorrelation);
-
- @SqlQuery("SELECT * FROM APLUS_CORRELATION")
- public abstract List<AlarmsCorrelation> queryAll();
-}
diff --git a/holmes-actions/src/main/java/org/openo/holmes/common/db/mapper/AlarmsCorrelationMapper.java b/holmes-actions/src/main/java/org/openo/holmes/common/db/mapper/AlarmsCorrelationMapper.java deleted file mode 100644 index 2fc2968..0000000 --- a/holmes-actions/src/main/java/org/openo/holmes/common/db/mapper/AlarmsCorrelationMapper.java +++ /dev/null @@ -1,86 +0,0 @@ -/**
- * Copyright 2017 ZTE Corporation.
- *
- * 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.
- */
-package org.openo.holmes.common.db.mapper;
-
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.Date;
-import java.util.Map;
-
-import org.jvnet.hk2.annotations.Service;
-import org.openo.holmes.common.api.entity.AlarmsCorrelation;
-import org.skife.jdbi.v2.StatementContext;
-import org.skife.jdbi.v2.tweak.ResultSetMapper;
-
-@Service
-public class AlarmsCorrelationMapper implements ResultSetMapper<AlarmsCorrelation> {
-
- private final static String RULE_ID = "ruleId";
- private final static String RULE_INFO = "ruleInfo";
- private final static String RESULT_TYPE = "resultType";
- private final static String CREATE_TIME = "createTime";
- private final static String PARENT_ALARM_ID = "parentAlarmId";
- private final static String CHILD_ALARM_ID = "childAlarmId";
- private final static String RESERVE1 = "reserve1";
- private final static String RESERVE2 = "reserve2";
- private final static String RESERVE3 = "reserve3";
-
- @Override
- public AlarmsCorrelation map(int i, ResultSet resultSet, StatementContext statementContext)
- throws SQLException {
- AlarmsCorrelation aplusCorrelation = new AlarmsCorrelation();
- aplusCorrelation.setRuleId(resultSet.getString(RULE_ID));
- aplusCorrelation.setRuleInfo(resultSet.getString(RULE_INFO));
- aplusCorrelation.setResultType(resultSet.getByte(RESULT_TYPE));
- aplusCorrelation.setCreateTime(resultSet.getDate(CREATE_TIME));
- aplusCorrelation.setParentAlarmId(resultSet.getLong(PARENT_ALARM_ID));
- aplusCorrelation.setChildAlarmId(resultSet.getLong(CHILD_ALARM_ID));
- aplusCorrelation.setReserve1(resultSet.getLong(RESERVE1));
- aplusCorrelation.setReserve2(resultSet.getLong(RESERVE2));
- aplusCorrelation.setReserve3(resultSet.getLong(RESERVE3));
- return aplusCorrelation;
- }
-
- public AlarmsCorrelation getAlarmCorrelationByMap(Map<String, Object> map) {
- AlarmsCorrelation aplusCorrelation = new AlarmsCorrelation();
- aplusCorrelation.setRuleId(getStringValue4Map(map, RULE_ID));
- aplusCorrelation.setRuleInfo(getStringValue4Map(map, RULE_INFO));
- aplusCorrelation.setResultType(getByteValue4Map(map, RESULT_TYPE, -1));
- aplusCorrelation.setCreateTime((Date) map.get(CREATE_TIME));
- aplusCorrelation.setParentAlarmId(getLongValue4Map(map, PARENT_ALARM_ID, -1));
- aplusCorrelation.setChildAlarmId(getLongValue4Map(map, CHILD_ALARM_ID, -1));
- aplusCorrelation.setReserve1(getLongValue4Map(map, RESERVE1, -1));
- aplusCorrelation.setReserve2(getLongValue4Map(map, RESERVE2, -1));
- aplusCorrelation.setReserve3(getLongValue4Map(map, RESERVE3, -1));
- return aplusCorrelation;
- }
-
- private String getStringValue4Map(Map<String, Object> map, String key) {
- Object value = map.get(key);
- return value == null ? "" : String.valueOf(value);
- }
-
- private long getLongValue4Map(Map<String, Object> map, String key, long defaultValue) {
- Object value = map.get(key);
- return value == null ? defaultValue : Long.valueOf(String.valueOf(value));
- }
-
- private byte getByteValue4Map(Map<String, Object> map, String key, int defaultValue) {
- Object value = map.get(key);
- return value == null ? Byte.valueOf(String.valueOf(defaultValue))
- : Byte.valueOf(String.valueOf(value));
- }
-}
diff --git a/holmes-actions/src/main/java/org/openo/holmes/common/exception/CorrelationException.java b/holmes-actions/src/main/java/org/openo/holmes/common/exception/CorrelationException.java index 4454cbb..dfe5373 100644 --- a/holmes-actions/src/main/java/org/openo/holmes/common/exception/CorrelationException.java +++ b/holmes-actions/src/main/java/org/openo/holmes/common/exception/CorrelationException.java @@ -5,7 +5,7 @@ * 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
+ * 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,
diff --git a/holmes-actions/src/main/java/org/openo/holmes/common/exception/DbException.java b/holmes-actions/src/main/java/org/openo/holmes/common/exception/DbException.java deleted file mode 100644 index d616481..0000000 --- a/holmes-actions/src/main/java/org/openo/holmes/common/exception/DbException.java +++ /dev/null @@ -1,28 +0,0 @@ -/**
- * Copyright 2017 ZTE Corporation.
- *
- * 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.
- */
-package org.openo.holmes.common.exception;
-
-public class DbException extends Exception {
- private static final long serialVersionUID = 6218393740013925907L;
-
- public DbException( String msg, Exception e ) {
- super( msg, e );
- }
-
- public DbException( String msg ) {
- super( msg );
- }
-}
diff --git a/holmes-actions/src/main/java/org/openo/holmes/common/exception/EngineException.java b/holmes-actions/src/main/java/org/openo/holmes/common/exception/EngineException.java deleted file mode 100644 index d61901d..0000000 --- a/holmes-actions/src/main/java/org/openo/holmes/common/exception/EngineException.java +++ /dev/null @@ -1,32 +0,0 @@ -/**
- * Copyright 2017 ZTE Corporation.
- *
- * 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.
- */
-package org.openo.holmes.common.exception;
-
-public class EngineException extends Exception{
- public EngineException () {}
-
- public EngineException(String msg) {
- super(msg);
- }
-
- public EngineException(String msg, Throwable cause){
- super(msg, cause);
- }
-
- public EngineException(Throwable cause){
- super(cause);
- }
-}
diff --git a/holmes-actions/src/main/java/org/openo/holmes/common/exception/RuleIllegalityException.java b/holmes-actions/src/main/java/org/openo/holmes/common/exception/RuleIllegalityException.java deleted file mode 100644 index 5b1d3bd..0000000 --- a/holmes-actions/src/main/java/org/openo/holmes/common/exception/RuleIllegalityException.java +++ /dev/null @@ -1,32 +0,0 @@ -/**
- * Copyright 2017 ZTE Corporation.
- *
- * 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.
- */
-package org.openo.holmes.common.exception;
-
-public class RuleIllegalityException extends Exception{
- public RuleIllegalityException() {}
-
- public RuleIllegalityException(String msg) {
- super(msg);
- }
-
- public RuleIllegalityException(String msg, Throwable cause){
- super(msg, cause);
- }
-
- public RuleIllegalityException(Throwable cause){
- super(cause);
- }
-}
diff --git a/holmes-actions/src/main/java/org/openo/holmes/common/i18n/correlation-operationcode-i18n-en-US.json b/holmes-actions/src/main/java/org/openo/holmes/common/i18n/correlation-operationcode-i18n-en-US.json deleted file mode 100644 index b7d4853..0000000 --- a/holmes-actions/src/main/java/org/openo/holmes/common/i18n/correlation-operationcode-i18n-en-US.json +++ /dev/null @@ -1,87 +0,0 @@ -{
- "ADD_QUERY_COND":"Add active alarm query condition",
- "MODIFY_QUERY_COND":"Modify active alarm query condition",
- "QUERY_ALL_QUERY_COND":"Query all active alarm query conditions",
- "DELETE_QUERY_COND":"Delete active alarm query condition",
- "ADD_ALARM_ACK_RULE":"Add active alarm acknowledge rule",
- "MODIFY_ALARM_ACK_RULE":"Modify active alarm acknowledge rule",
- "QUERY_ALARM_ACK_RULE":"Query active alarm acknowledge rule",
- "ADD_FILTER_RULE":"Add alarm filter rule",
- "MODIFY_FILTER_RULE":"Modify alarm filter rule",
- "QUERY_FILTER_RULE":"Query alarm filter rule",
- "ADD_MASK_RULE":"Add mask rule",
- "MODIFY_MASK_RULE":"Modify mask rule",
- "ADD_CLEAR_RULE":"Add clear rule",
- "MODIFY_CLEAR_RULE":"Modify clear rule",
- "QUERY_CLEAR_RULE":"Query clear rule",
- "ADD_COUNT_RULE":"Add count rule",
- "MODIFY_COUNT_RULE":"Modify count rule",
- "QUERY_COUNT_RULE":"Query count rule",
- "ADD_DELAY_TIME_RULE":"Add delay time rule",
- "MODIFY_DELAY_TIME_RULE":"Modify delay time rule",
- "QUERY_DELAY_TIME_RULE":"Query delay time rule",
- "ADD_FORWARD_RULE":"Add forward rule",
- "MODIFY_FORWARD_RULE":"Modify forward rule",
- "QUERY_FORWARD_RULE":"Query forward rule",
- "ADD_INTERMITTENT_ALARM_RULE":"Add intermittent alarm rule",
- "MODIFY_INTERMITTENT_ALARM_RULE":"Modify intermittent alarm rule",
- "ADD_MERGE_RULE":"Add merge rule",
- "MODIFY_MERGE_RULE":"Modify merge rule",
- "QUERY_MERGE_RULE":"Query merge rule",
- "ADD_NOTIFICATION_FILTER_RULE":"Add notification filter rule",
- "MODIFY_NOTIFICATION_FILTER_RULE":"Modify notification filter rule",
- "QUERY_NOTIFICATION_FILTER_RULE":"Query notification filter rule",
- "ADD_PERSISTING_RULE":"Add persisting rule",
- "MODIFY_PERSISTING_RULE":"Modify persisting rule",
- "QUERY_PERSISTING_RULE":"Query persisting rule",
- "ADD_PROMPTING_RULE":"Add prompting rule",
- "MODIFY_PROMPTING_RULE":"Modify persisting rule",
- "QUERY_PROMPTING_RULE":"Query persisting rule",
- "SUSPEND_RULE":"Suspend rule",
- "SUSPEND_RULE_FAIL":"Suspend rule failed",
- "ACTIVATE_RULE":"Activate rule",
- "ACTIVATE_RULE_FAIL":"activate rule failed",
- "DELETED_RULE":"Deleted rule",
- "DELETE_RULE_FAIL":"delete rule failed",
- "QUERY_RULE_TYPE":"Query rule type",
- "QUERY_RULE_TYPE_FAIL":"Query rule type failed",
- "QUERY_RULE_BY_TYPE":"Query all rule by rule types",
- "QUERY_TIMING_REPORT_RULE":"Query timing report rule",
- "ADD_TIMING_REPORT_RULE":"Add timing report rule",
- "MODIFY_TIMING_REPORT_RULE":"Modify timing report rule",
- "QUERY_TIMING_REPORT_TASK_LOG":"Query timing report task execute log",
- "DELETED_TIMING_REPORT_RULE":"Deleted timing report rule",
- "DELETED_TIMING_REPORT_RULE_FAIL":"Deleted timing report rule failed",
- "ACTIVATE_TIMING_REPORT_RULE":"Activate timing report rule",
- "ACTIVATE_TIMING_REPORT_RULE_FAIL":"Activate timing report rule failed",
- "SUSPEND_TIMING_REPORT_RULE":"Suspend timing report rule",
- "SUSPEND_TIMING_REPORT_RULE_FAIL":"Suspend timing report rule failed",
- "QUERY_HISTORY_TIMING_REPORT_RULE":"Query history timing report rule",
- "ADD_HISTORY_TIMING_REPORT_RULE":"Add history timing report rule",
- "MODIFY_HISTORY_TIMING_REPORT_RULE":"Modify history timing report rule",
- "DELETED_HISTORY_TIMING_REPORT_RULE":"Deleted history timing report rule",
- "DELETED_HISTORY_TIMING_REPORT_RULE_FAIL":"Deleted history timing report rule failed",
- "ACTIVATE_HISTORY_TIMING_REPORT_RULE":"Activate history timing report rule",
- "ACTIVATE_HISTORY_TIMING_REPORT_RULE_FAIL":"Activate history timing report rule failed",
- "SUSPEND_HISTORY_TIMING_REPORT_RULE":"Suspend history timing report rule",
- "SUSPEND_HISTORY_TIMING_REPORT_RULE_FAIL":"Suspend history timing report rule failed",
- "QUERY_HISTORY_TIMING_REPORT_TASK_LOG":"Query history timing report task execution log",
- "ADD_HISTORY_ALARM_QUERY_COND":"Add history alarm query condition",
- "MODIFY_HISTORY_ALARM_QUERY_COND":"Modify history alarm query condition",
- "QUERY_HISTORY_ALARM_QUERY_COND":"Query history alarm query condition",
- "DELETED_HISTORY_ALARM_QUERY_COND":"Deleted history alarm query condition",
- "ADD_NOTIFICATION_QUERY_COND":"Add notification query condition",
- "MODIFY_NOTIFICATION_QUERY_COND":"Modify notification query condition",
- "QUERY_NOTIFICATION_QUERY_COND":"Query notification query condition",
- "DELETED_NOTIFICATION_QUERY_COND":"Deleted notification query condition",
- "QUERY_BASIC_STATISTIC_TEMPLATE":"Query basic statistic template",
- "ADD_BASIC_STATISTIC_TEMPLATE":"Add basic statistic template",
- "MODIFY_BASIC_STATISTIC_TEMPLATE":"Modify basic statistic template",
- "DELETED_BASIC_STATISTIC_TEMPLATE":"Deleted basic statistic template",
- "MODIFY_BASIC_STATISTIC_TEMPLATE_AS_DEFAULT":"Modify basic statistic template as default template",
- "QUERY_BUSY_TIME_STATISTIC_TEMPLATE":"Query busy time statistic template",
- "ADD_BUSY_TIME_STATISTIC_TEMPLATE":"Add busy time statistic template",
- "MODIFY_BUSY_TIME_STATISTIC_TEMPLATE":"Modify busy time statistic template",
- "DELETED_BUSY_TIME_STATISTIC_TEMPLATE":"Deleted busy time statistic template",
- "MODIFY_BUSY_TIME_STATISTIC_TEMPLATE_AS_DEFAULT":"Modify busy time statistic template as default template"
-}
diff --git a/holmes-actions/src/main/java/org/openo/holmes/common/i18n/correlation-operationcode-i18n-zh-CN.json b/holmes-actions/src/main/java/org/openo/holmes/common/i18n/correlation-operationcode-i18n-zh-CN.json deleted file mode 100644 index 0509c3b..0000000 --- a/holmes-actions/src/main/java/org/openo/holmes/common/i18n/correlation-operationcode-i18n-zh-CN.json +++ /dev/null @@ -1,87 +0,0 @@ -{
- "ADD_QUERY_COND":"添加当前告警查询条件",
- "MODIFY_QUERY_COND":"修改当前告警查询条件",
- "QUERY_ALL_QUERY_COND":"查询所有当前告警查询条件",
- "DELETE_QUERY_COND":"删除当前告警查询条件",
- "ADD_ALARM_ACK_RULE":"添加当前告警确认规则",
- "MODIFY_ALARM_ACK_RULE":"修改当前告警确认规则",
- "QUERY_ALARM_ACK_RULE":"查询当前告警确认规则",
- "ADD_FILTER_RULE":"添加告警过滤规则",
- "MODIFY_FILTER_RULE":"修改告警过滤规则",
- "QUERY_FILTER_RULE":"查询告警过滤规则",
- "ADD_MASK_RULE":"添加屏蔽规则",
- "MODIFY_MASK_RULE":"修改屏蔽规则",
- "ADD_CLEAR_RULE":"添加清除规则",
- "MODIFY_CLEAR_RULE":"修改清除规则",
- "QUERY_CLEAR_RULE":"查询清除规则",
- "ADD_COUNT_RULE":"添加计数规则",
- "MODIFY_COUNT_RULE":"修改计数规则",
- "QUERY_COUNT_RULE":"查询计数规则",
- "ADD_DELAY_TIME_RULE":"添加延时规则",
- "MODIFY_DELAY_TIME_RULE":"修改延时规则",
- "QUERY_DELAY_TIME_RULE":"查询延时规则",
- "ADD_FORWARD_RULE":"添加前转规则",
- "MODIFY_FORWARD_RULE":"修改前转规则",
- "QUERY_FORWARD_RULE":"查询前转规则",
- "ADD_INTERMITTENT_ALARM_RULE":"添加闪断规则",
- "MODIFY_INTERMITTENT_ALARM_RULE":"修改闪断规则",
- "ADD_MERGE_RULE":"添加归并规则",
- "MODIFY_MERGE_RULE":"修改归并规则",
- "QUERY_MERGE_RULE":"查询归并规则",
- "ADD_NOTIFICATION_FILTER_RULE":"添加通知过滤规则",
- "MODIFY_NOTIFICATION_FILTER_RULE":"修改通知过滤规则",
- "QUERY_NOTIFICATION_FILTER_RULE":"查询通知过滤规则",
- "ADD_PERSISTING_RULE":"添加计时规则",
- "MODIFY_PERSISTING_RULE":"修改计时规则",
- "QUERY_PERSISTING_RULE":"查询计时规则",
- "ADD_PROMPTING_RULE":"添加提示规则",
- "MODIFY_PROMPTING_RULE":"修改提示规则",
- "QUERY_PROMPTING_RULE":"查询提示规则",
- "SUSPEND_RULE":"暂停规则",
- "SUSPEND_RULE_FAIL":"暂停规则失败",
- "ACTIVATE_RULE":"激活规则",
- "ACTIVATE_RULE_FAIL":"激活规则失败",
- "DELETED_RULE":"删除规则",
- "DELETE_RULE_FAIL":"删除规则失败",
- "QUERY_RULE_TYPE":"查询规则类型",
- "QUERY_RULE_TYPE_FAIL":"查询规则类型失败",
- "QUERY_RULE_BY_TYPE":"通过规则类型查询所有规则",
- "QUERY_TIMING_REPORT_RULE":"查询定时输出规则",
- "ADD_TIMING_REPORT_RULE":"添加定时输出规则",
- "MODIFY_TIMING_REPORT_RULE":"修改定时输出规则",
- "QUERY_TIMING_REPORT_TASK_LOG":"查询定时输出任务的执行日志",
- "DELETED_TIMING_REPORT_RULE":"删除定时输出规则",
- "DELETED_TIMING_REPORT_RULE_FAIL":"删除定时输出规则失败",
- "ACTIVATE_TIMING_REPORT_RULE":"激活定时输出规则",
- "ACTIVATE_TIMING_REPORT_RULE_FAIL":"激活定时输出规则失败",
- "SUSPEND_TIMING_REPORT_RULE":"暂停定时输出规则",
- "SUSPEND_TIMING_REPORT_RULE_FAIL":"暂停定时输出规则失败",
- "QUERY_HISTORY_TIMING_REPORT_RULE":"查询历史定时输出规则",
- "ADD_HISTORY_TIMING_REPORT_RULE":"添加历史定时输出规则",
- "MODIFY_HISTORY_TIMING_REPORT_RULE":"修改历史定时输出规则",
- "DELETED_HISTORY_TIMING_REPORT_RULE":"删除历史定时输出规则",
- "DELETED_HISTORY_TIMING_REPORT_RULE_FAIL":"删除历史定时输出规则失败",
- "ACTIVATE_HISTORY_TIMING_REPORT_RULE":"激活历史定时输出规则",
- "ACTIVATE_HISTORY_TIMING_REPORT_RULE_FAIL":"激活历史定时输出规则失败",
- "SUSPEND_HISTORY_TIMING_REPORT_RULE":"暂停历史定时输出规则",
- "SUSPEND_HISTORY_TIMING_REPORT_RULE_FAIL":"暂停历史定时输出规则失败",
- "QUERY_HISTORY_TIMING_REPORT_TASK_LOG":"查询历史定时输出任务的执行日志",
- "ADD_HISTORY_ALARM_QUERY_COND":"添加历史告警查询条件",
- "MODIFY_HISTORY_ALARM_QUERY_COND":"修改历史告警查询条件",
- "QUERY_HISTORY_ALARM_QUERY_COND":"查询历史告警查询条件",
- "DELETED_HISTORY_ALARM_QUERY_COND":"删除历史告警查询条件",
- "ADD_NOTIFICATION_QUERY_COND":"添加通知查询条件",
- "MODIFY_NOTIFICATION_QUERY_COND":"修改通知查询条件",
- "QUERY_NOTIFICATION_QUERY_COND":"查询通知查询条件",
- "DELETED_NOTIFICATION_QUERY_COND":"删除通知查询条件",
- "QUERY_BASIC_STATISTIC_TEMPLATE":"查询基础统计模板",
- "ADD_BASIC_STATISTIC_TEMPLATE":"添加基础统计模板",
- "MODIFY_BASIC_STATISTIC_TEMPLATE":"修改基础统计模板",
- "DELETED_BASIC_STATISTIC_TEMPLATE":"删除基础统计模板",
- "MODIFY_BASIC_STATISTIC_TEMPLATE_AS_DEFAULT":"修改基础统计模板为默认模板",
- "QUERY_BUSY_TIME_STATISTIC_TEMPLATE":"查询忙时统计模板",
- "ADD_BUSY_TIME_STATISTIC_TEMPLATE":"添加忙时统计模板",
- "MODIFY_BUSY_TIME_STATISTIC_TEMPLATE":"修改忙时统计模板",
- "DELETED_BUSY_TIME_STATISTIC_TEMPLATE":"删除忙时统计模板",
- "MODIFY_BUSY_TIME_STATISTIC_TEMPLATE_AS_DEFAULT":"修改忙时统计模板为默认模板"
-}
diff --git a/holmes-actions/src/main/java/org/openo/holmes/common/utils/DateForJsonSerializer.java b/holmes-actions/src/main/java/org/openo/holmes/common/utils/DateForJsonSerializer.java deleted file mode 100644 index fe36d74..0000000 --- a/holmes-actions/src/main/java/org/openo/holmes/common/utils/DateForJsonSerializer.java +++ /dev/null @@ -1,37 +0,0 @@ -/**
- * Copyright 2017 ZTE Corporation.
- *
- * 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.
- */
-package org.openo.holmes.common.utils;
-
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.JsonSerializer;
-import com.fasterxml.jackson.databind.SerializerProvider;
-
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-public class DateForJsonSerializer extends JsonSerializer < Date > {
- @Override
- public void serialize( Date date, JsonGenerator jsonGenerator,
- SerializerProvider serializerProvider ) throws IOException, JsonProcessingException {
- if ( date != null ) {
- SimpleDateFormat formatter = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss.SSSXXX" );
- String formattedDate = formatter.format( date );
- jsonGenerator.writeString( formattedDate );
- }
- }
-}
|