本文整理汇总了Java中org.opennms.netmgt.model.OnmsEvent.getEventLogMsg方法的典型用法代码示例。如果您正苦于以下问题:Java OnmsEvent.getEventLogMsg方法的具体用法?Java OnmsEvent.getEventLogMsg怎么用?Java OnmsEvent.getEventLogMsg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opennms.netmgt.model.OnmsEvent
的用法示例。
在下文中一共展示了OnmsEvent.getEventLogMsg方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: mapOnmsEventToEvent
import org.opennms.netmgt.model.OnmsEvent; //导入方法依赖的package包/类
private Event mapOnmsEventToEvent(OnmsEvent onmsEvent){
log().debug("Mapping OnmsEvent to WebEvent for event with database id " + onmsEvent.getId());
Event event = new Event();
event.acknowledgeTime = onmsEvent.getEventAckTime();
event.acknowledgeUser = onmsEvent.getEventAckUser();
event.alarmId = onmsEvent.getAlarm() != null ? onmsEvent.getAlarm().getId() : 0;
event.autoAction = onmsEvent.getEventAutoAction();
event.createTime = onmsEvent.getEventCreateTime();
event.description = onmsEvent.getEventDescr();
event.dpName = onmsEvent.getDistPoller() != null ? onmsEvent.getDistPoller().getName() : "";
event.eventDisplay = Boolean.valueOf(onmsEvent.getEventDisplay().equals("Y"));
event.forward = onmsEvent.getEventForward();
event.host = onmsEvent.getEventHost();
event.id = onmsEvent.getId();
event.ipAddr = onmsEvent.getIpAddr() == null ? null : InetAddressUtils.toIpAddrString(onmsEvent.getIpAddr());
event.logGroup = onmsEvent.getEventLogGroup();
event.logMessage = onmsEvent.getEventLogMsg();
event.mouseOverText = onmsEvent.getEventMouseOverText();
event.nodeLabel = getNodeLabelFromNode(onmsEvent);
log().debug("Found NodeLabel for mapped event:" + event.getNodeLabel());
event.nodeID = getNodeIdFromNode(onmsEvent);
log().debug("Found NodeId for mapped event:" + event.getNodeId());
event.notification = onmsEvent.getEventNotification();
event.operatorAction = onmsEvent.getEventOperAction();
event.operatorActionMenuText = onmsEvent.getEventOperActionMenuText();
event.operatorInstruction = onmsEvent.getEventOperInstruct();
event.parms = onmsEvent.getEventParms();
event.serviceID = onmsEvent.getServiceType() != null ? onmsEvent.getServiceType().getId() : 0;
event.serviceName = onmsEvent.getServiceType() != null ? onmsEvent.getServiceType().getName() : "";
event.severity = OnmsSeverity.get(onmsEvent.getEventSeverity());
event.snmp = onmsEvent.getEventSnmp();
event.snmphost = onmsEvent.getEventSnmpHost();
event.time = onmsEvent.getEventTime();
event.troubleTicket = onmsEvent.getEventTTicket();
event.troubleTicketState = onmsEvent.getEventTTicketState();
event.uei = onmsEvent.getEventUei();
return event;
}