org.opennms.web.alarm
Class Alarm

java.lang.Object
  extended by org.opennms.web.alarm.Alarm

public class Alarm
extends Object

A JavaBean implementation to hold information about a network alarm as defined by OpenNMS.

Author:
Tarus Balog , OpenNMS

Field Summary
protected  Date acknowledgeTime
          The time this alarm was acknowledged.
protected  String acknowledgeUser
          The name of the user who acknowledged this alarm.
protected  int count
          Reduction count for the alarm, cannot be null
protected  String description
          Free-form textual description of the alarm
protected  String dpName
          The dpName of the Dist Poller which received the alarm, cannot be null.
protected  Date firsteventtime
          The first time an event was reduced by this alarm
protected  int id
          Unique identifier for the alarm, cannot be null
protected  String ipAddr
          IP Address of node's interface
protected  int lastEventID
          The last event to be reduced by this alarm
protected  Date lasteventtime
          The last time an event was reduced by this alarm
protected  String logMessage
          Formatted display text to control how the alarm will appear in the browser.
protected  String mouseOverText
          Mouse over text.
protected  Integer nodeID
          Unique integer identifier for node, can be null
protected  String nodeLabel
          The human-readable name of the node of this alarm.
protected  String operatorInstruction
          Operator instruction for event.
protected  String parms
          The <parms> element for this alarm.
static int PROBLEM_TYPE
           
protected  String reductionKey
          Reduction key for this alarm, cannot be null
static int RESOLUTION_TYPE
           
protected  Integer serviceID
          Unique integer identifier of service/poller package, can be null
protected  String serviceName
          Human-readable name of the service
protected  OnmsSeverity severity
          Severity the of alarm.
protected  Date suppressedTime
          The time this alarm was suppressed.
protected  Date suppressedUntil
          The time that suppression will end for this alarm.
protected  String suppressedUser
          The name of the user who suppressed this alarm.
protected  String troubleTicket
          Trouble ticket id.
protected  TroubleTicketState troubleTicketState
          State of the trouble ticket.
protected  String uei
          Universal Event Identifer (UEI) for this alarm, cannot be null
 
Constructor Summary
Alarm()
          Empty constructor to create an empty Alarm instance.
Alarm(int id, String uei, String dpName, Date lasteventtime, Date firsteventtime, int count, int severityId)
          Create an alarm that represents a real network alarm with only the required parameters.
Alarm(int id, String uei, String dpName, Integer nodeID, String ipAddr, Integer serviceID, String reductionKey, int count, int severity, int lastEventID, Date firsteventtime, Date lasteventtime, String description, String logMessage, String operatorInstruction, String troubleTicket, TroubleTicketState troubleTicketState, String mouseOverText, Date suppressedUntil, String suppressedUser, Date suppressedTime, String acknowledgeUser, Date acknowledgeTime, String parms)
          Create an alarm that represents a real network alarm with all the parameters.
Alarm(int id, String uei, String dpName, Integer nodeID, String ipAddr, Integer serviceID, String reductionKey, int count, int severityId, int lastEventID, Date firsteventtime, Date lasteventtime, String description, String logMessage, String operatorInstruction, String troubleTicket, TroubleTicketState troubleTicketState, String mouseOverText, Date suppressedUntil, String suppressedUser, Date suppressedTime, String acknowledgeUser, Date acknowledgeTime, String parms, String nodeLabel, String serviceName)
          Create an alarm that represents a real network alarm with all the parameters.
 
Method Summary
 Date getAcknowledgeTime()
           
 String getAcknowledgeUser()
           
 int getCount()
           
 String getDescription()
           
 String getDpName()
           
 Date getFirstEventTime()
           
 int getId()
           
 String getIpAddress()
           
 int getLastEventID()
           
 Date getLastEventTime()
           
 String getLogMessage()
           
 String getMouseOverText()
           
 int getNodeId()
           
 String getNodeLabel()
           
 String getOperatorInstruction()
           
 String getParms()
           
 String getReductionKey()
           
 int getServiceId()
           
 String getServiceName()
           
 OnmsSeverity getSeverity()
           
 Date getSuppressedTime()
           
 Date getSuppressedUntil()
           
 String getSuppressedUser()
           
 String getTroubleTicket()
           
 TroubleTicketState getTroubleTicketState()
           
 String getUei()
           
 boolean isAcknowledged()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROBLEM_TYPE

public static final int PROBLEM_TYPE
See Also:
Constant Field Values

RESOLUTION_TYPE

public static final int RESOLUTION_TYPE
See Also:
Constant Field Values

id

protected int id
Unique identifier for the alarm, cannot be null


uei

protected String uei
Universal Event Identifer (UEI) for this alarm, cannot be null


dpName

protected String dpName
The dpName of the Dist Poller which received the alarm, cannot be null.


nodeID

protected Integer nodeID
Unique integer identifier for node, can be null


ipAddr

protected String ipAddr
IP Address of node's interface


serviceID

protected Integer serviceID
Unique integer identifier of service/poller package, can be null


reductionKey

protected String reductionKey
Reduction key for this alarm, cannot be null


count

protected int count
Reduction count for the alarm, cannot be null


severity

protected OnmsSeverity severity
Severity the of alarm.
 
   1  = Indeterminate
   2 = Cleared (unimplemented at this time)
   3 = Warning
   4 = Minor
   5 = Major
   6 = Critical
  
 


lastEventID

protected int lastEventID
The last event to be reduced by this alarm


firsteventtime

protected Date firsteventtime
The first time an event was reduced by this alarm


lasteventtime

protected Date lasteventtime
The last time an event was reduced by this alarm


description

protected String description
Free-form textual description of the alarm


logMessage

protected String logMessage
Formatted display text to control how the alarm will appear in the browser. This field may contain variables that are populated by field values of the message.


operatorInstruction

protected String operatorInstruction
Operator instruction for event.


troubleTicket

protected String troubleTicket
Trouble ticket id. This represents the id as returned from a trouble ticketing system or null if not trouble ticket exists.


troubleTicketState

protected TroubleTicketState troubleTicketState
State of the trouble ticket. Trouble ticket on/off boolean 1=on, 0=off. Can be null.


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.


suppressedUntil

protected Date suppressedUntil
The time that suppression will end for this alarm.


suppressedUser

protected String suppressedUser
The name of the user who suppressed this alarm.


suppressedTime

protected Date suppressedTime
The time this alarm was suppressed.


acknowledgeUser

protected String acknowledgeUser
The name of the user who acknowledged this alarm.


acknowledgeTime

protected Date acknowledgeTime
The time this alarm was acknowledged.


parms

protected String parms
The <parms> element for this alarm.


serviceName

protected String serviceName
Human-readable name of the service


nodeLabel

protected String nodeLabel
The human-readable name of the node of this alarm. Can be null.

Constructor Detail

Alarm

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


Alarm

public Alarm(int id,
             String uei,
             String dpName,
             Date lasteventtime,
             Date firsteventtime,
             int count,
             int severityId)
Create an alarm that represents a real network alarm with only the required parameters.


Alarm

public Alarm(int id,
             String uei,
             String dpName,
             Integer nodeID,
             String ipAddr,
             Integer serviceID,
             String reductionKey,
             int count,
             int severity,
             int lastEventID,
             Date firsteventtime,
             Date lasteventtime,
             String description,
             String logMessage,
             String operatorInstruction,
             String troubleTicket,
             TroubleTicketState troubleTicketState,
             String mouseOverText,
             Date suppressedUntil,
             String suppressedUser,
             Date suppressedTime,
             String acknowledgeUser,
             Date acknowledgeTime,
             String parms)
Create an alarm that represents a real network alarm with all the parameters.


Alarm

public Alarm(int id,
             String uei,
             String dpName,
             Integer nodeID,
             String ipAddr,
             Integer serviceID,
             String reductionKey,
             int count,
             int severityId,
             int lastEventID,
             Date firsteventtime,
             Date lasteventtime,
             String description,
             String logMessage,
             String operatorInstruction,
             String troubleTicket,
             TroubleTicketState troubleTicketState,
             String mouseOverText,
             Date suppressedUntil,
             String suppressedUser,
             Date suppressedTime,
             String acknowledgeUser,
             Date acknowledgeTime,
             String parms,
             String nodeLabel,
             String serviceName)
Create an alarm that represents a real network alarm with all the parameters.

Method Detail

getId

public int getId()

getUei

public String getUei()

getDpName

public String getDpName()

getLastEventTime

public Date getLastEventTime()

getFirstEventTime

public Date getFirstEventTime()

getCount

public int getCount()

getSeverity

public OnmsSeverity getSeverity()

getNodeId

public int getNodeId()

getIpAddress

public String getIpAddress()

getServiceId

public int getServiceId()

getReductionKey

public String getReductionKey()

getLastEventID

public int getLastEventID()

getDescription

public String getDescription()

getLogMessage

public String getLogMessage()

getOperatorInstruction

public String getOperatorInstruction()

getTroubleTicket

public String getTroubleTicket()

getTroubleTicketState

public TroubleTicketState getTroubleTicketState()

getMouseOverText

public String getMouseOverText()

getSuppressedUntil

public Date getSuppressedUntil()

getSuppressedUser

public String getSuppressedUser()

getSuppressedTime

public Date getSuppressedTime()

getAcknowledgeUser

public String getAcknowledgeUser()

getAcknowledgeTime

public Date getAcknowledgeTime()

isAcknowledged

public boolean isAcknowledged()

getParms

public String getParms()

getNodeLabel

public String getNodeLabel()

getServiceName

public String getServiceName()


Copyright © 2009. All Rights Reserved.