本文整理了Java中org.opennms.netmgt.xml.event.Event.setCreationTime()
方法的一些代码示例,展示了Event.setCreationTime()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.setCreationTime()
方法的具体详情如下:
包路径:org.opennms.netmgt.xml.event.Event
类名称:Event
方法名:setCreationTime
[英]Sets the value of field 'creationTime'. The field 'creationTime' has the following description: from header
[中]设置字段“creationTime”的值。“creationTime”字段具有以下描述:从标题
代码示例来源:origin: OpenNMS/opennms
/**
* <p>getEvent</p>
*
* @return a {@link org.opennms.netmgt.xml.event.Event} object.
*/
public Event getEvent() {
if (m_event.getTime() == null && zonedDateTimeBuilder != null) {
ZonedDateTime time = zonedDateTimeBuilder.build();
m_event.setTime(Date.from(time.toInstant()));
}
if (m_event.getCreationTime() == null) {
// The creation time has been used as the time when the event
// is stored in the database so update it right before we return
// the event object.
m_event.setCreationTime(new Date());
}
return m_event;
}
代码示例来源:origin: OpenNMS/opennms
@Override
public void processRow(ResultSet rs) throws SQLException {
event.setDbid(rs.getInt("eventid"));
event.setUei(rs.getString("eventuei"));
event.setNodeid(rs.getLong("nodeid"));
event.setTime(rs.getDate("eventtime"));
event.setHost(rs.getString("eventhost"));
event.setInterface(rs.getString("ipaddr"));
event.setSnmphost(rs.getString("eventsnmphost"));
event.setService(getServiceName(rs.getInt("serviceid")));
event.setCreationTime(rs.getDate("eventcreatetime"));
event.setSeverity(rs.getString("eventseverity"));
event.setPathoutage(rs.getString("eventpathoutage"));
Tticket tticket = new Tticket();
tticket.setContent(rs.getString("eventtticket"));
tticket.setState(rs.getString("eventtticketstate"));
event.setTticket(tticket);
event.setSource(rs.getString("eventsource"));
}
代码示例来源:origin: OpenNMS/opennms
e.setCreationTime(new Date());
代码示例来源:origin: org.opennms.core.test-api/org.opennms.core.test-api.db
e.setCreationTime(new Date());
代码示例来源:origin: OpenNMS/opennms
if (onmsEvent.getId() != null) event.setDbid(onmsEvent.getId());
if (onmsEvent.getEventUei() != null ) event.setUei(onmsEvent.getEventUei());
if (onmsEvent.getEventCreateTime() != null ) event.setCreationTime(onmsEvent.getEventCreateTime());
if (onmsEvent.getSeverityLabel() !=null ) event.setSeverity(onmsEvent.getSeverityLabel());
if (onmsEvent.getEventDescr() !=null ) event.setDescr(onmsEvent.getEventDescr());
代码示例来源:origin: org.opennms.plugins/opennms-es-rest.main-module
if (onmsEvent.getEventCreateTime() !=null ) event.setCreationTime(onmsEvent.getEventCreateTime());
代码示例来源:origin: org.opennms.features/org.opennms.features.opennms-es-rest
if (onmsEvent.getId() != null) event.setDbid(onmsEvent.getId());
if (onmsEvent.getEventUei() != null ) event.setUei(onmsEvent.getEventUei());
if (onmsEvent.getEventCreateTime() != null ) event.setCreationTime(onmsEvent.getEventCreateTime());
if (onmsEvent.getSeverityLabel() !=null ) event.setSeverity(onmsEvent.getSeverityLabel());
if (onmsEvent.getEventDescr() !=null ) event.setDescr(onmsEvent.getEventDescr());
代码示例来源:origin: OpenNMS/opennms
event.setCreationTime(alarm.getFirstEventTime());
内容来源于网络,如有侵权,请联系作者删除!