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.

Since:
1.8.1
Version:
$Id: $
Author:
Tarus Balog , OpenNMS , 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
          Constant PROBLEM_TYPE=1
protected  String reductionKey
          Reduction key for this alarm, cannot be null
static int RESOLUTION_TYPE
          Constant RESOLUTION_TYPE=2
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()
          Getter for the field acknowledgeTime.
 String getAcknowledgeUser()
          Getter for the field acknowledgeUser.
 int getCount()
          Getter for the field count.
 String getDescription()
          Getter for the field description.
 String getDpName()
          Getter for the field dpName.
 Date getFirstEventTime()
          getFirstEventTime
 int getId()
          Getter for the field id.
 String getIpAddress()
          getIpAddress
 int getLastEventID()
          Getter for the field lastEventID.
 Date getLastEventTime()
          getLastEventTime
 String getLogMessage()
          Getter for the field logMessage.
 String getMouseOverText()
          Getter for the field mouseOverText.
 int getNodeId()
          getNodeId
 String getNodeLabel()
          Getter for the field nodeLabel.
 String getOperatorInstruction()
          Getter for the field operatorInstruction.
 String getParms()
          Getter for the field parms.
 String getReductionKey()
          Getter for the field reductionKey.
 int getServiceId()
          getServiceId
 String getServiceName()
          Getter for the field serviceName.
 OnmsSeverity getSeverity()
          Getter for the field severity.
 Date getSuppressedTime()
          Getter for the field suppressedTime.
 Date getSuppressedUntil()
          Getter for the field suppressedUntil.
 String getSuppressedUser()
          Getter for the field suppressedUser.
 String getTroubleTicket()
          Getter for the field troubleTicket.
 TroubleTicketState getTroubleTicketState()
          Getter for the field troubleTicketState.
 String getUei()
          Getter for the field uei.
 boolean isAcknowledged()
          isAcknowledged
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROBLEM_TYPE

public static final int PROBLEM_TYPE
Constant PROBLEM_TYPE=1

See Also:
Constant Field Values

RESOLUTION_TYPE

public static final int RESOLUTION_TYPE
Constant RESOLUTION_TYPE=2

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.

Parameters:
id - a int.
uei - a String object.
dpName - a String object.
lasteventtime - a Date object.
firsteventtime - a Date object.
count - a int.
severityId - a int.

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.

Parameters:
id - a int.
uei - a String object.
dpName - a String object.
nodeID - a Integer object.
ipAddr - a String object.
serviceID - a Integer object.
reductionKey - a String object.
count - a int.
severity - a int.
lastEventID - a int.
firsteventtime - a Date object.
lasteventtime - a Date object.
description - a String object.
logMessage - a String object.
operatorInstruction - a String object.
troubleTicket - a String object.
troubleTicketState - a TroubleTicketState object.
mouseOverText - a String object.
suppressedUntil - a Date object.
suppressedUser - a String object.
suppressedTime - a Date object.
acknowledgeUser - a String object.
acknowledgeTime - a Date object.
parms - a String object.

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.

Parameters:
id - a int.
uei - a String object.
dpName - a String object.
nodeID - a Integer object.
ipAddr - a String object.
serviceID - a Integer object.
reductionKey - a String object.
count - a int.
severityId - a int.
lastEventID - a int.
firsteventtime - a Date object.
lasteventtime - a Date object.
description - a String object.
logMessage - a String object.
operatorInstruction - a String object.
troubleTicket - a String object.
troubleTicketState - a TroubleTicketState object.
mouseOverText - a String object.
suppressedUntil - a Date object.
suppressedUser - a String object.
suppressedTime - a Date object.
acknowledgeUser - a String object.
acknowledgeTime - a Date object.
parms - a String object.
nodeLabel - a String object.
serviceName - a String object.
Method Detail

getId

public int getId()

Getter for the field id.

Returns:
a int.

getUei

public String getUei()

Getter for the field uei.

Returns:
a String object.

getDpName

public String getDpName()

Getter for the field dpName.

Returns:
a String object.

getLastEventTime

public Date getLastEventTime()

getLastEventTime

Returns:
a Date object.

getFirstEventTime

public Date getFirstEventTime()

getFirstEventTime

Returns:
a Date object.

getCount

public int getCount()

Getter for the field count.

Returns:
a int.

getSeverity

public OnmsSeverity getSeverity()

Getter for the field severity.

Returns:
a OnmsSeverity object.

getNodeId

public int getNodeId()

getNodeId

Returns:
a int.

getIpAddress

public String getIpAddress()

getIpAddress

Returns:
a String object.

getServiceId

public int getServiceId()

getServiceId

Returns:
a int.

getReductionKey

public String getReductionKey()

Getter for the field reductionKey.

Returns:
a String object.

getLastEventID

public int getLastEventID()

Getter for the field lastEventID.

Returns:
a int.

getDescription

public String getDescription()

Getter for the field description.

Returns:
a String object.

getLogMessage

public String getLogMessage()

Getter for the field logMessage.

Returns:
a String object.

getOperatorInstruction

public String getOperatorInstruction()

Getter for the field operatorInstruction.

Returns:
a String object.

getTroubleTicket

public String getTroubleTicket()

Getter for the field troubleTicket.

Returns:
a String object.

getTroubleTicketState

public TroubleTicketState getTroubleTicketState()

Getter for the field troubleTicketState.

Returns:
a TroubleTicketState object.

getMouseOverText

public String getMouseOverText()

Getter for the field mouseOverText.

Returns:
a String object.

getSuppressedUntil

public Date getSuppressedUntil()

Getter for the field suppressedUntil.

Returns:
a Date object.

getSuppressedUser

public String getSuppressedUser()

Getter for the field suppressedUser.

Returns:
a String object.

getSuppressedTime

public Date getSuppressedTime()

Getter for the field suppressedTime.

Returns:
a Date object.

getAcknowledgeUser

public String getAcknowledgeUser()

Getter for the field acknowledgeUser.

Returns:
a String object.

getAcknowledgeTime

public Date getAcknowledgeTime()

Getter for the field acknowledgeTime.

Returns:
a Date object.

isAcknowledged

public boolean isAcknowledged()

isAcknowledged

Returns:
a boolean.

getParms

public String getParms()

Getter for the field parms.

Returns:
a String object.

getNodeLabel

public String getNodeLabel()

Getter for the field nodeLabel.

Returns:
a String object.

getServiceName

public String getServiceName()

Getter for the field serviceName.

Returns:
a String object.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.