当前位置: 首页>>代码示例>>Java>>正文


Java OnmsEvent.getEventDescr方法代码示例

本文整理汇总了Java中org.opennms.netmgt.model.OnmsEvent.getEventDescr方法的典型用法代码示例。如果您正苦于以下问题:Java OnmsEvent.getEventDescr方法的具体用法?Java OnmsEvent.getEventDescr怎么用?Java OnmsEvent.getEventDescr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.opennms.netmgt.model.OnmsEvent的用法示例。


在下文中一共展示了OnmsEvent.getEventDescr方法的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;
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:39,代码来源:DaoWebEventRepository.java


注:本文中的org.opennms.netmgt.model.OnmsEvent.getEventDescr方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。