Class Event


  • public class Event
    extends java.lang.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 java.util.Date acknowledgeTime
      The time this event was acknowledged.
      protected java.lang.String acknowledgeUser
      The name of the user who acknowledged this event.
      protected java.lang.Integer alarmId
      The alarmId if reduced.
      protected java.lang.String autoAction
      Automated Action for event.
      protected java.util.Date createTime
      Creation time of event in database, cannot be null
      protected java.lang.String description
      Free-form textual description of the event
      protected java.lang.String dpName
      The dpName of the Dist Poller which received the event, cannot be null.
      protected java.lang.Boolean eventDisplay
      Whether the event is displayable.
      protected java.lang.String forward
      The forwarding information.
      protected java.lang.String host
      The <host> element from the Event Data Stream DTD
      protected int id
      Unique identifier for the event, cannot be null
      protected java.lang.String ipAddr
      IP Address of node's interface
      protected java.lang.String location  
      protected java.lang.String logGroup
      Logical group with which to associate event.
      protected java.lang.String logMessage
      Formatted display text to control how the event will appear in the browser.
      protected java.lang.String mouseOverText
      Mouse over text.
      protected java.lang.Integer nodeID
      Unique integer identifier for node, can be null
      protected java.lang.String nodeLabel
      The human-readable name of the node of this event.
      protected java.lang.String nodeLocation  
      protected java.lang.String notification
      Notification string.
      protected java.lang.String operatorAction
      Operator Action for event.
      protected java.lang.String operatorActionMenuText
      Text of the eventOperAction.
      protected java.lang.String operatorInstruction
      Operator instruction for event.
      protected java.util.Map<java.lang.String,​java.lang.String> parms
      The <parms> element from the Event Data Stream DTD
      protected java.lang.Integer serviceID
      Unique integer identifier of service/poller package, can be null
      protected java.lang.String serviceName
      Human-readable name of the service
      protected OnmsSeverity severity
      Severity the of event.
      protected java.lang.String snmp
      Contains the eid, eidtext (optionally), specific, and generic identifier for the SNMP Trap.
      protected java.lang.String snmphost
      The <snmphost> element from the Event Data Stream DTD
      protected java.lang.String systemId  
      protected java.util.Date time
      The <time> element from the Event Data Stream DTD, which is the time the event was received by the source process.
      protected java.lang.String troubleTicket
      Trouble ticket integration string.
      protected java.lang.Integer troubleTicketState
      State of the trouble ticket.
      protected java.lang.String uei
      Universal Event Identifer (UEI) for this event, cannot be null
    • Constructor Summary

      Constructors 
      Constructor Description
      Event()
      Empty constructor to create an empty Event instance.
      Event​(int id, java.lang.String uei, java.util.Date time, java.lang.String dpName, java.util.Date createTime, int severityId)
      Create an event that represents a real network event with only the required parameters.
      Event​(int id, java.lang.String uei, java.util.Date time, java.lang.String dpName, java.util.Date createTime, int severityId, java.lang.String snmp, java.lang.String host, java.lang.String snmphost, java.util.Map<java.lang.String,​java.lang.String> parms, java.lang.Integer nodeID, java.lang.Integer serviceID, java.lang.String ipAddr, java.lang.String description, java.lang.String logMessage, java.lang.String logGroup, java.lang.String operatorInstruction, java.lang.String autoAction, java.lang.String operatorAction, java.lang.String operatorActionMenuText, java.lang.String notification, java.lang.String troubleTicket, java.lang.Integer troubleTicketState, java.lang.String forward, java.lang.String mouseOverText, java.lang.String acknowledgeUser, java.util.Date acknowledgeTime)
      Create an event that represents a real network event with all the parameters.
      Event​(int id, java.lang.String uei, java.util.Date time, java.lang.String dpName, java.util.Date createTime, int severityId, java.lang.String snmp, java.lang.String host, java.lang.String snmphost, java.util.Map<java.lang.String,​java.lang.String> parms, java.lang.Integer nodeID, java.lang.Integer serviceID, java.lang.String ipAddr, java.lang.String description, java.lang.String logMessage, java.lang.String logGroup, java.lang.String operatorInstruction, java.lang.String autoAction, java.lang.String operatorAction, java.lang.String operatorActionMenuText, java.lang.String notification, java.lang.String troubleTicket, java.lang.Integer troubleTicketState, java.lang.String forward, java.lang.String mouseOverText, java.lang.String acknowledgeUser, java.util.Date acknowledgeTime, java.lang.String nodeLabel, java.lang.String serviceName, java.lang.Integer alarmId)
      Constructor for Event.
      Event​(int id, java.lang.String uei, java.util.Date time, java.lang.String dpName, java.util.Date createTime, int severityId, java.lang.String snmp, java.lang.String host, java.lang.String snmphost, java.util.Map<java.lang.String,​java.lang.String> parms, java.lang.Integer nodeID, java.lang.Integer serviceID, java.lang.String ipAddr, java.lang.String description, java.lang.String logMessage, java.lang.String logGroup, java.lang.String operatorInstruction, java.lang.String autoAction, java.lang.String operatorAction, java.lang.String operatorActionMenuText, java.lang.String notification, java.lang.String troubleTicket, java.lang.Integer troubleTicketState, java.lang.String forward, java.lang.String mouseOverText, java.lang.String acknowledgeUser, java.util.Date acknowledgeTime, java.lang.String nodeLabel, java.lang.String serviceName, java.lang.Integer alarmId, java.lang.Boolean eventDisplay)
      Create an event that represents a real network event with all the parameters.
    • Field Detail

      • id

        protected int id
        Unique identifier for the event, cannot be null
      • uei

        protected java.lang.String uei
        Universal Event Identifer (UEI) for this event, cannot be null
      • snmp

        protected java.lang.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 java.util.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 java.lang.String host
        The <host> element from the Event Data Stream DTD
      • snmphost

        protected java.lang.String snmphost
        The <snmphost> element from the Event Data Stream DTD
      • dpName

        protected java.lang.String dpName
        The dpName of the Dist Poller which received the event, cannot be null.
      • parms

        protected java.util.Map<java.lang.String,​java.lang.String> parms
        The <parms> element from the Event Data Stream DTD
      • nodeID

        protected java.lang.Integer nodeID
        Unique integer identifier for node, can be null
      • serviceID

        protected java.lang.Integer serviceID
        Unique integer identifier of service/poller package, can be null
      • serviceName

        protected java.lang.String serviceName
        Human-readable name of the service
      • ipAddr

        protected java.lang.String ipAddr
        IP Address of node's interface
      • createTime

        protected java.util.Date createTime
        Creation time of event in database, cannot be null
      • description

        protected java.lang.String description
        Free-form textual description of the event
      • logMessage

        protected java.lang.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 java.lang.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 java.lang.String operatorInstruction
        Operator instruction for event.
      • autoAction

        protected java.lang.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 java.lang.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 java.lang.String operatorActionMenuText
        Text of the eventOperAction. Menu text displayed to Operator, which if selected, will invoke action described in eventOperAction.
      • notification

        protected java.lang.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 java.lang.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 java.lang.Integer troubleTicketState
        State of the trouble ticket. Trouble ticket on/off boolean 1=on, 0=off. Can be null.
      • forward

        protected java.lang.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 java.lang.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 java.lang.String acknowledgeUser
        The name of the user who acknowledged this event.
      • acknowledgeTime

        protected java.util.Date acknowledgeTime
        The time this event was acknowledged.
      • nodeLabel

        protected java.lang.String nodeLabel
        The human-readable name of the node of this event. Can be null.
      • alarmId

        protected java.lang.Integer alarmId
        The alarmId if reduced. Can be null.
      • eventDisplay

        protected java.lang.Boolean eventDisplay
        Whether the event is displayable.
      • systemId

        protected java.lang.String systemId
      • location

        protected java.lang.String location
      • nodeLocation

        protected java.lang.String nodeLocation
    • Constructor Detail

      • Event

        public Event()
        Empty constructor to create an empty Event instance. All fields will hold the default values.
      • Event

        public Event​(int id,
                     java.lang.String uei,
                     java.util.Date time,
                     java.lang.String dpName,
                     java.util.Date createTime,
                     int severityId)
        Create an event that represents a real network event with only the required parameters.
        Parameters:
        id - a int.
        uei - a String object.
        time - a Date object.
        dpName - a String object.
        createTime - a Date object.
        severityId - a int.
      • Event

        public Event​(int id,
                     java.lang.String uei,
                     java.util.Date time,
                     java.lang.String dpName,
                     java.util.Date createTime,
                     int severityId,
                     java.lang.String snmp,
                     java.lang.String host,
                     java.lang.String snmphost,
                     java.util.Map<java.lang.String,​java.lang.String> parms,
                     java.lang.Integer nodeID,
                     java.lang.Integer serviceID,
                     java.lang.String ipAddr,
                     java.lang.String description,
                     java.lang.String logMessage,
                     java.lang.String logGroup,
                     java.lang.String operatorInstruction,
                     java.lang.String autoAction,
                     java.lang.String operatorAction,
                     java.lang.String operatorActionMenuText,
                     java.lang.String notification,
                     java.lang.String troubleTicket,
                     java.lang.Integer troubleTicketState,
                     java.lang.String forward,
                     java.lang.String mouseOverText,
                     java.lang.String acknowledgeUser,
                     java.util.Date acknowledgeTime)
        Create an event that represents a real network event with all the parameters.
        Parameters:
        id - a int.
        uei - a String object.
        time - a Date object.
        dpName - a String object.
        createTime - a Date object.
        severityId - a int.
        snmp - a String object.
        host - a String object.
        snmphost - a String object.
        parms - a String object.
        nodeID - a Integer object.
        serviceID - a Integer object.
        ipAddr - a String object.
        description - a String object.
        logMessage - a String object.
        logGroup - a String object.
        operatorInstruction - a String object.
        autoAction - a String object.
        operatorAction - a String object.
        operatorActionMenuText - a String object.
        notification - a String object.
        troubleTicket - a String object.
        troubleTicketState - a Integer object.
        forward - a String object.
        mouseOverText - a String object.
        acknowledgeUser - a String object.
        acknowledgeTime - a Date object.
      • Event

        public Event​(int id,
                     java.lang.String uei,
                     java.util.Date time,
                     java.lang.String dpName,
                     java.util.Date createTime,
                     int severityId,
                     java.lang.String snmp,
                     java.lang.String host,
                     java.lang.String snmphost,
                     java.util.Map<java.lang.String,​java.lang.String> parms,
                     java.lang.Integer nodeID,
                     java.lang.Integer serviceID,
                     java.lang.String ipAddr,
                     java.lang.String description,
                     java.lang.String logMessage,
                     java.lang.String logGroup,
                     java.lang.String operatorInstruction,
                     java.lang.String autoAction,
                     java.lang.String operatorAction,
                     java.lang.String operatorActionMenuText,
                     java.lang.String notification,
                     java.lang.String troubleTicket,
                     java.lang.Integer troubleTicketState,
                     java.lang.String forward,
                     java.lang.String mouseOverText,
                     java.lang.String acknowledgeUser,
                     java.util.Date acknowledgeTime,
                     java.lang.String nodeLabel,
                     java.lang.String serviceName,
                     java.lang.Integer alarmId)

        Constructor for Event.

        Parameters:
        id - a int.
        uei - a String object.
        time - a Date object.
        dpName - a String object.
        createTime - a Date object.
        severityId - a int.
        snmp - a String object.
        host - a String object.
        snmphost - a String object.
        parms - a String object.
        nodeID - a Integer object.
        serviceID - a Integer object.
        ipAddr - a String object.
        description - a String object.
        logMessage - a String object.
        logGroup - a String object.
        operatorInstruction - a String object.
        autoAction - a String object.
        operatorAction - a String object.
        operatorActionMenuText - a String object.
        notification - a String object.
        troubleTicket - a String object.
        troubleTicketState - a Integer object.
        forward - a String object.
        mouseOverText - a String object.
        acknowledgeUser - a String object.
        acknowledgeTime - a Date object.
        nodeLabel - a String object.
        serviceName - a String object.
        alarmId - a Integer object.
      • Event

        public Event​(int id,
                     java.lang.String uei,
                     java.util.Date time,
                     java.lang.String dpName,
                     java.util.Date createTime,
                     int severityId,
                     java.lang.String snmp,
                     java.lang.String host,
                     java.lang.String snmphost,
                     java.util.Map<java.lang.String,​java.lang.String> parms,
                     java.lang.Integer nodeID,
                     java.lang.Integer serviceID,
                     java.lang.String ipAddr,
                     java.lang.String description,
                     java.lang.String logMessage,
                     java.lang.String logGroup,
                     java.lang.String operatorInstruction,
                     java.lang.String autoAction,
                     java.lang.String operatorAction,
                     java.lang.String operatorActionMenuText,
                     java.lang.String notification,
                     java.lang.String troubleTicket,
                     java.lang.Integer troubleTicketState,
                     java.lang.String forward,
                     java.lang.String mouseOverText,
                     java.lang.String acknowledgeUser,
                     java.util.Date acknowledgeTime,
                     java.lang.String nodeLabel,
                     java.lang.String serviceName,
                     java.lang.Integer alarmId,
                     java.lang.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.
      • getUei

        public java.lang.String getUei()

        Getter for the field uei.

        Returns:
        a String object.
      • getTime

        public java.util.Date getTime()

        Getter for the field time.

        Returns:
        a Date object.
      • getDpName

        public java.lang.String getDpName()

        Getter for the field dpName.

        Returns:
        a String object.
      • getCreateTime

        public java.util.Date getCreateTime()

        Getter for the field createTime.

        Returns:
        a Date object.
      • getSnmp

        public java.lang.String getSnmp()

        Getter for the field snmp.

        Returns:
        a String object.
      • getHost

        public java.lang.String getHost()

        Getter for the field host.

        Returns:
        a String object.
      • getSnmpHost

        public java.lang.String getSnmpHost()

        getSnmpHost

        Returns:
        a String object.
      • getParms

        public java.util.Map<java.lang.String,​java.lang.String> getParms()

        Getter for the field parms.

        Returns:
        a String object.
      • getNodeId

        public int getNodeId()

        getNodeId

        Returns:
        a int.
      • getNodeLabel

        public java.lang.String getNodeLabel()

        Getter for the field nodeLabel.

        Returns:
        a String object.
      • getServiceId

        public int getServiceId()

        getServiceId

        Returns:
        a int.
      • getServiceName

        public java.lang.String getServiceName()

        Getter for the field serviceName.

        Returns:
        a String object.
      • getIpAddress

        public java.lang.String getIpAddress()

        getIpAddress

        Returns:
        a String object.
      • getDescription

        public java.lang.String getDescription()

        Getter for the field description.

        Returns:
        a String object.
      • getLogMessage

        public java.lang.String getLogMessage()

        Getter for the field logMessage.

        Returns:
        a String object.
      • getLogGroup

        public java.lang.String getLogGroup()

        Getter for the field logGroup.

        Returns:
        a String object.
      • getOperatorInstruction

        public java.lang.String getOperatorInstruction()

        Getter for the field operatorInstruction.

        Returns:
        a String object.
      • getAutoAction

        public java.lang.String getAutoAction()

        Getter for the field autoAction.

        Returns:
        a String object.
      • getOperatorAction

        public java.lang.String getOperatorAction()

        Getter for the field operatorAction.

        Returns:
        a String object.
      • getOperatorActionMenuText

        public java.lang.String getOperatorActionMenuText()

        Getter for the field operatorActionMenuText.

        Returns:
        a String object.
      • getNotification

        public java.lang.String getNotification()

        Getter for the field notification.

        Returns:
        a String object.
      • getTroubleTicket

        public java.lang.String getTroubleTicket()

        Getter for the field troubleTicket.

        Returns:
        a String object.
      • getTroubleTicketState

        public java.lang.Integer getTroubleTicketState()

        Getter for the field troubleTicketState.

        Returns:
        a Integer object.
      • getForward

        public java.lang.String getForward()

        Getter for the field forward.

        Returns:
        a String object.
      • getMouseOverText

        public java.lang.String getMouseOverText()

        Getter for the field mouseOverText.

        Returns:
        a String object.
      • getAcknowledgeUser

        public java.lang.String getAcknowledgeUser()

        Getter for the field acknowledgeUser.

        Returns:
        a String object.
      • getAcknowledgeTime

        public java.util.Date getAcknowledgeTime()

        Getter for the field acknowledgeTime.

        Returns:
        a Date object.
      • isAcknowledged

        public boolean isAcknowledged()

        isAcknowledged

        Returns:
        a boolean.
      • getAlarmId

        public java.lang.Integer getAlarmId()

        Getter for the field alarmId.

        Returns:
        a Integer object.
      • getEventDisplay

        public java.lang.Boolean getEventDisplay()

        Getter for the field eventDisplay.

        Returns:
        a Boolean object.
      • getSystemId

        public java.lang.String getSystemId()
      • getLocation

        public java.lang.String getLocation()
      • getNodeLocation

        public java.lang.String getNodeLocation()