Package org.opennms.web.event
Class Event
- java.lang.Object
-
- org.opennms.web.event.Event
-
public class Event extends Object
A JavaBean implementation to hold information about a network event as defined by OpenNMS.- Author:
- Lawrence Karnowski , OpenNMS
-
-
Field Summary
Fields Modifier and Type Field Description protected DateacknowledgeTimeThe time this event was acknowledged.protected StringacknowledgeUserThe name of the user who acknowledged this event.protected IntegeralarmIdThe alarmId if reduced.protected StringautoActionAutomated Action for event.protected DatecreateTimeCreation time of event in database, cannot be nullprotected StringdescriptionFree-form textual description of the eventprotected StringdpNameThe dpName of the Dist Poller which received the event, cannot be null.protected BooleaneventDisplayWhether the event is displayable.protected StringforwardThe forwarding information.protected StringhostThe <host> element from the Event Data Stream DTDprotected intidUnique identifier for the event, cannot be nullprotected StringipAddrIP Address of node's interfaceprotected Stringlocationprotected StringlogGroupLogical group with which to associate event.protected StringlogMessageFormatted display text to control how the event will appear in the browser.protected StringmouseOverTextMouse over text.protected IntegernodeIDUnique integer identifier for node, can be nullprotected StringnodeLabelThe human-readable name of the node of this event.protected StringnodeLocationprotected StringnotificationNotification string.protected StringoperatorActionOperator Action for event.protected StringoperatorActionMenuTextText of the eventOperAction.protected StringoperatorInstructionOperator instruction for event.protected Map<String,String>parmsThe <parms> element from the Event Data Stream DTDprotected IntegerserviceIDUnique integer identifier of service/poller package, can be nullprotected StringserviceNameHuman-readable name of the serviceprotected OnmsSeverityseveritySeverity the of event.protected StringsnmpContains the eid, eidtext (optionally), specific, and generic identifier for the SNMP Trap.protected StringsnmphostThe <snmphost> element from the Event Data Stream DTDprotected StringsystemIdprotected DatetimeThe <time> element from the Event Data Stream DTD, which is the time the event was received by the source process.protected StringtroubleTicketTrouble ticket integration string.protected IntegertroubleTicketStateState of the trouble ticket.protected StringueiUniversal Event Identifer (UEI) for this event, cannot be null
-
Constructor Summary
Constructors Constructor Description Event()Empty constructor to create an emptyEventinstance.Event(int id, String uei, Date time, String dpName, Date createTime, int severityId)Create an event that represents a real network event with only the required parameters.Event(int id, String uei, Date time, String dpName, Date createTime, int severityId, String snmp, String host, String snmphost, Map<String,String> parms, Integer nodeID, Integer serviceID, String ipAddr, String description, String logMessage, String logGroup, String operatorInstruction, String autoAction, String operatorAction, String operatorActionMenuText, String notification, String troubleTicket, Integer troubleTicketState, String forward, String mouseOverText, String acknowledgeUser, Date acknowledgeTime)Create an event that represents a real network event with all the parameters.Event(int id, String uei, Date time, String dpName, Date createTime, int severityId, String snmp, String host, String snmphost, Map<String,String> parms, Integer nodeID, Integer serviceID, String ipAddr, String description, String logMessage, String logGroup, String operatorInstruction, String autoAction, String operatorAction, String operatorActionMenuText, String notification, String troubleTicket, Integer troubleTicketState, String forward, String mouseOverText, String acknowledgeUser, Date acknowledgeTime, String nodeLabel, String serviceName, Integer alarmId)Constructor for Event.Event(int id, String uei, Date time, String dpName, Date createTime, int severityId, String snmp, String host, String snmphost, Map<String,String> parms, Integer nodeID, Integer serviceID, String ipAddr, String description, String logMessage, String logGroup, String operatorInstruction, String autoAction, String operatorAction, String operatorActionMenuText, String notification, String troubleTicket, Integer troubleTicketState, String forward, String mouseOverText, String acknowledgeUser, Date acknowledgeTime, String nodeLabel, String serviceName, Integer alarmId, Boolean eventDisplay)Create an event that represents a real network event with all the parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DategetAcknowledgeTime()Getter for the fieldacknowledgeTime.StringgetAcknowledgeUser()Getter for the fieldacknowledgeUser.IntegergetAlarmId()Getter for the fieldalarmId.StringgetAutoAction()Getter for the fieldautoAction.DategetCreateTime()Getter for the fieldcreateTime.StringgetDescription()Getter for the fielddescription.StringgetDpName()Getter for the fielddpName.BooleangetEventDisplay()Getter for the fieldeventDisplay.StringgetForward()Getter for the fieldforward.StringgetHost()Getter for the fieldhost.intgetId()Getter for the fieldid.StringgetIpAddress()getIpAddressStringgetLocation()StringgetLogGroup()Getter for the fieldlogGroup.StringgetLogMessage()Getter for the fieldlogMessage.StringgetMouseOverText()Getter for the fieldmouseOverText.intgetNodeId()getNodeIdStringgetNodeLabel()Getter for the fieldnodeLabel.StringgetNodeLocation()StringgetNotification()Getter for the fieldnotification.StringgetOperatorAction()Getter for the fieldoperatorAction.StringgetOperatorActionMenuText()Getter for the fieldoperatorActionMenuText.StringgetOperatorInstruction()Getter for the fieldoperatorInstruction.Map<String,String>getParms()Getter for the fieldparms.intgetServiceId()getServiceIdStringgetServiceName()Getter for the fieldserviceName.OnmsSeveritygetSeverity()Getter for the fieldseverity.StringgetSnmp()Getter for the fieldsnmp.StringgetSnmpHost()getSnmpHostStringgetSystemId()DategetTime()Getter for the fieldtime.StringgetTroubleTicket()Getter for the fieldtroubleTicket.IntegergetTroubleTicketState()Getter for the fieldtroubleTicketState.StringgetUei()Getter for the fielduei.booleanisAcknowledged()isAcknowledged
-
-
-
Field Detail
-
id
protected int id
Unique identifier for the event, cannot be null
-
uei
protected String uei
Universal Event Identifer (UEI) for this event, cannot be null
-
snmp
protected String snmp
Contains the eid, eidtext (optionally), specific, and generic identifier for the SNMP Trap. This maps directly to the <snmp>element in the Event Data Stream DTD.
-
time
protected Date time
The <time> element from the Event Data Stream DTD, which is the time the event was received by the source process. Cannot be null.
-
host
protected String host
The <host> element from the Event Data Stream DTD
-
snmphost
protected String snmphost
The <snmphost> element from the Event Data Stream DTD
-
dpName
protected String dpName
The dpName of the Dist Poller which received the event, cannot be null.
-
nodeID
protected Integer nodeID
Unique integer identifier for node, can be null
-
serviceID
protected Integer serviceID
Unique integer identifier of service/poller package, can be null
-
serviceName
protected String serviceName
Human-readable name of the service
-
ipAddr
protected String ipAddr
IP Address of node's interface
-
createTime
protected Date createTime
Creation time of event in database, cannot be null
-
description
protected String description
Free-form textual description of the event
-
logMessage
protected String logMessage
Formatted display text to control how the event will appear in the browser. This field may contain variables that are populated by field values of the message.
-
logGroup
protected String logGroup
Logical group with which to associate event. This field provides a means of logically grouping related events.
-
severity
protected OnmsSeverity severity
Severity the of event.1 = Indeterminate 2 = Cleared (unimplemented at this time) 3 = Warning 4 = Minor 5 = Major 6 = Critical
-
operatorInstruction
protected String operatorInstruction
Operator instruction for event.
-
autoAction
protected String autoAction
Automated Action for event. Should consist of fully-qualfied pathname to executable command, with possible variables used to reference event-specific data
-
operatorAction
protected String operatorAction
Operator Action for event. Should consist of fully-qualfied pathname to executable command, with possible variables used to reference event-specific data
-
operatorActionMenuText
protected String operatorActionMenuText
Text of the eventOperAction. Menu text displayed to Operator, which if selected, will invoke action described in eventOperAction.
-
notification
protected String notification
Notification string. Should consist of a fully-qualfied pathname to an executable which invokes the notification software, and will likely contain event-specific variables
-
troubleTicket
protected String troubleTicket
Trouble ticket integration string. Should consist of fully-qualfied pathname to executable command, with possible variables used to reference event-specific data
-
troubleTicketState
protected Integer troubleTicketState
State of the trouble ticket. Trouble ticket on/off boolean 1=on, 0=off. Can be null.
-
forward
protected String forward
The forwarding information. Contains a list of triplets:Destination,State,Mechanism;Destination,State,Mechanism;which reflect the following:- State is a boolean flag as to whether the entry is active or not. 1=on, 0=off.
- Destination is hostname or IP of system to forward the event to
- Method is the means by which it will be forwarded. A keyword, e.g., SNMP
-
mouseOverText
protected String mouseOverText
Mouse over text. Text to be displayed on MouseOver event, if the event is displayed in the browser and the operator needs additional info.
-
acknowledgeUser
protected String acknowledgeUser
The name of the user who acknowledged this event.
-
acknowledgeTime
protected Date acknowledgeTime
The time this event was acknowledged.
-
nodeLabel
protected String nodeLabel
The human-readable name of the node of this event. Can be null.
-
alarmId
protected Integer alarmId
The alarmId if reduced. Can be null.
-
eventDisplay
protected Boolean eventDisplay
Whether the event is displayable.
-
systemId
protected String systemId
-
location
protected String location
-
nodeLocation
protected String nodeLocation
-
-
Constructor Detail
-
Event
public Event()
Empty constructor to create an emptyEventinstance. All fields will hold the default values.
-
Event
public Event(int id, String uei, Date time, String dpName, Date createTime, int severityId)Create an event that represents a real network event with only the required parameters.
-
Event
public Event(int id, String uei, Date time, String dpName, Date createTime, int severityId, String snmp, String host, String snmphost, Map<String,String> parms, Integer nodeID, Integer serviceID, String ipAddr, String description, String logMessage, String logGroup, String operatorInstruction, String autoAction, String operatorAction, String operatorActionMenuText, String notification, String troubleTicket, Integer troubleTicketState, String forward, String mouseOverText, String acknowledgeUser, Date acknowledgeTime)Create an event that represents a real network event with all the parameters.- Parameters:
id- a int.uei- aStringobject.time- aDateobject.dpName- aStringobject.createTime- aDateobject.severityId- a int.snmp- aStringobject.host- aStringobject.snmphost- aStringobject.parms- aStringobject.nodeID- aIntegerobject.serviceID- aIntegerobject.ipAddr- aStringobject.description- aStringobject.logMessage- aStringobject.logGroup- aStringobject.operatorInstruction- aStringobject.autoAction- aStringobject.operatorAction- aStringobject.operatorActionMenuText- aStringobject.notification- aStringobject.troubleTicket- aStringobject.troubleTicketState- aIntegerobject.forward- aStringobject.mouseOverText- aStringobject.acknowledgeUser- aStringobject.acknowledgeTime- aDateobject.
-
Event
public Event(int id, String uei, Date time, String dpName, Date createTime, int severityId, String snmp, String host, String snmphost, Map<String,String> parms, Integer nodeID, Integer serviceID, String ipAddr, String description, String logMessage, String logGroup, String operatorInstruction, String autoAction, String operatorAction, String operatorActionMenuText, String notification, String troubleTicket, Integer troubleTicketState, String forward, String mouseOverText, String acknowledgeUser, Date acknowledgeTime, String nodeLabel, String serviceName, Integer alarmId)Constructor for Event.
- Parameters:
id- a int.uei- aStringobject.time- aDateobject.dpName- aStringobject.createTime- aDateobject.severityId- a int.snmp- aStringobject.host- aStringobject.snmphost- aStringobject.parms- aStringobject.nodeID- aIntegerobject.serviceID- aIntegerobject.ipAddr- aStringobject.description- aStringobject.logMessage- aStringobject.logGroup- aStringobject.operatorInstruction- aStringobject.autoAction- aStringobject.operatorAction- aStringobject.operatorActionMenuText- aStringobject.notification- aStringobject.troubleTicket- aStringobject.troubleTicketState- aIntegerobject.forward- aStringobject.mouseOverText- aStringobject.acknowledgeUser- aStringobject.acknowledgeTime- aDateobject.nodeLabel- aStringobject.serviceName- aStringobject.alarmId- aIntegerobject.
-
Event
public Event(int id, String uei, Date time, String dpName, Date createTime, int severityId, String snmp, String host, String snmphost, Map<String,String> parms, Integer nodeID, Integer serviceID, String ipAddr, String description, String logMessage, String logGroup, String operatorInstruction, String autoAction, String operatorAction, String operatorActionMenuText, String notification, String troubleTicket, Integer troubleTicketState, String forward, String mouseOverText, String acknowledgeUser, Date acknowledgeTime, String nodeLabel, String serviceName, Integer alarmId, Boolean eventDisplay)Create an event that represents a real network event with all the parameters.
-
-
Method Detail
-
getId
public int getId()
Getter for the field
id.- Returns:
- a int.
-
getSeverity
public OnmsSeverity getSeverity()
Getter for the field
severity.- Returns:
- a
OnmsSeverityobject.
-
getParms
public Map<String,String> getParms()
Getter for the field
parms.- Returns:
- a
Stringobject.
-
getNodeId
public int getNodeId()
getNodeId
- Returns:
- a int.
-
getServiceId
public int getServiceId()
getServiceId
- Returns:
- a int.
-
getServiceName
public String getServiceName()
Getter for the field
serviceName.- Returns:
- a
Stringobject.
-
getDescription
public String getDescription()
Getter for the field
description.- Returns:
- a
Stringobject.
-
getLogMessage
public String getLogMessage()
Getter for the field
logMessage.- Returns:
- a
Stringobject.
-
getOperatorInstruction
public String getOperatorInstruction()
Getter for the field
operatorInstruction.- Returns:
- a
Stringobject.
-
getAutoAction
public String getAutoAction()
Getter for the field
autoAction.- Returns:
- a
Stringobject.
-
getOperatorAction
public String getOperatorAction()
Getter for the field
operatorAction.- Returns:
- a
Stringobject.
-
getOperatorActionMenuText
public String getOperatorActionMenuText()
Getter for the field
operatorActionMenuText.- Returns:
- a
Stringobject.
-
getNotification
public String getNotification()
Getter for the field
notification.- Returns:
- a
Stringobject.
-
getTroubleTicket
public String getTroubleTicket()
Getter for the field
troubleTicket.- Returns:
- a
Stringobject.
-
getTroubleTicketState
public Integer getTroubleTicketState()
Getter for the field
troubleTicketState.- Returns:
- a
Integerobject.
-
getMouseOverText
public String getMouseOverText()
Getter for the field
mouseOverText.- Returns:
- a
Stringobject.
-
getAcknowledgeUser
public String getAcknowledgeUser()
Getter for the field
acknowledgeUser.- Returns:
- a
Stringobject.
-
getAcknowledgeTime
public Date getAcknowledgeTime()
Getter for the field
acknowledgeTime.- Returns:
- a
Dateobject.
-
isAcknowledged
public boolean isAcknowledged()
isAcknowledged
- Returns:
- a boolean.
-
getEventDisplay
public Boolean getEventDisplay()
Getter for the field
eventDisplay.- Returns:
- a
Booleanobject.
-
getSystemId
public String getSystemId()
-
getLocation
public String getLocation()
-
getNodeLocation
public String getNodeLocation()
-
-