Package org.netxms.client.events
Class Alarm
- java.lang.Object
-
- org.netxms.client.events.Alarm
-
public class Alarm extends Object
Alarm
-
-
Field Summary
Fields Modifier and Type Field Description static intHELPDESK_STATE_CLOSEDstatic intHELPDESK_STATE_IGNOREDstatic intHELPDESK_STATE_OPENstatic intSTATE_ACKNOWLEDGEDstatic intSTATE_MASKstatic intSTATE_OUTSTANDINGstatic intSTATE_RESOLVEDstatic intSTATE_TERMINATED
-
Constructor Summary
Constructors Constructor Description Alarm(org.netxms.base.NXCPMessage msg)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAcknowledgedByUser()Get id of user that acknowledged this alarm (or 0 if alarm is not acknowledged).intgetAckTime()Get time when alarm was acknowledgedlong[]getCategories()Get list of categories this alarm belongs to.intgetCommentsCount()DategetCreationTime()SeveritygetCurrentSeverity()longgetDciId()StringgetHelpdeskReference()intgetHelpdeskState()longgetId()StringgetKey()DategetLastChangeTime()StringgetMessage()SeveritygetOriginalSeverity()longgetParentId()intgetRepeatCount()intgetResolvedByUser()Get id of user that resolved this alarm (or 0 if alarm is not resolved).intgetSourceEventCode()longgetSourceEventId()longgetSourceObjectId()intgetState()long[]getSubordinateAlarms()Get list of subordinate alarm identifiers.intgetTerminatedByUser()Get id of user that terminated this alarm (or 0 if alarm is not terminated).intgetTimeout()intgetTimeoutEvent()booleanhasSubordinatedAlarms()Check if this alarm has any subordinated alarms.booleanisSticky()voidsetResolved(int userId, Date changeTime)Mark alarm as resolved.StringtoString()
-
-
-
Field Detail
-
STATE_OUTSTANDING
public static final int STATE_OUTSTANDING
- See Also:
- Constant Field Values
-
STATE_ACKNOWLEDGED
public static final int STATE_ACKNOWLEDGED
- See Also:
- Constant Field Values
-
STATE_RESOLVED
public static final int STATE_RESOLVED
- See Also:
- Constant Field Values
-
STATE_TERMINATED
public static final int STATE_TERMINATED
- See Also:
- Constant Field Values
-
STATE_MASK
public static final int STATE_MASK
- See Also:
- Constant Field Values
-
HELPDESK_STATE_IGNORED
public static final int HELPDESK_STATE_IGNORED
- See Also:
- Constant Field Values
-
HELPDESK_STATE_OPEN
public static final int HELPDESK_STATE_OPEN
- See Also:
- Constant Field Values
-
HELPDESK_STATE_CLOSED
public static final int HELPDESK_STATE_CLOSED
- See Also:
- Constant Field Values
-
-
Method Detail
-
setResolved
public void setResolved(int userId, Date changeTime)Mark alarm as resolved. This call only updates local object state and do not change actual alarm state on server. It can be used to update local alarm objects after receiving bulk alarm state change notification.- Parameters:
userId-changeTime-
-
getId
public long getId()
- Returns:
- the id
-
getParentId
public long getParentId()
- Returns:
- the parentId
-
getCurrentSeverity
public Severity getCurrentSeverity()
- Returns:
- the currentSeverity
-
getOriginalSeverity
public Severity getOriginalSeverity()
- Returns:
- the originalSeverity
-
getRepeatCount
public int getRepeatCount()
- Returns:
- the repeatCount
-
getState
public int getState()
- Returns:
- the state
-
getAcknowledgedByUser
public int getAcknowledgedByUser()
Get id of user that acknowledged this alarm (or 0 if alarm is not acknowledged).- Returns:
- id of user that acknowledged this alarm (or 0 if alarm is not acknowledged)
-
getTerminatedByUser
public int getTerminatedByUser()
Get id of user that terminated this alarm (or 0 if alarm is not terminated).- Returns:
- id of user that terminated this alarm (or 0 if alarm is not terminated)
-
getSourceEventId
public long getSourceEventId()
- Returns:
- the sourceEventId
-
getSourceEventCode
public int getSourceEventCode()
- Returns:
- the sourceEventCode
-
getSourceObjectId
public long getSourceObjectId()
- Returns:
- the sourceObjectId
-
getDciId
public long getDciId()
- Returns:
- the dciId
-
getCreationTime
public Date getCreationTime()
- Returns:
- the creationTime
-
getLastChangeTime
public Date getLastChangeTime()
- Returns:
- the lastChangeTime
-
getMessage
public String getMessage()
- Returns:
- the message
-
getKey
public String getKey()
- Returns:
- the key
-
getHelpdeskState
public int getHelpdeskState()
- Returns:
- the helpdeskState
-
getHelpdeskReference
public String getHelpdeskReference()
- Returns:
- the helpdeskReference
-
getTimeout
public int getTimeout()
- Returns:
- the timeout
-
getTimeoutEvent
public int getTimeoutEvent()
- Returns:
- the timeoutEvent
-
getCommentsCount
public int getCommentsCount()
- Returns:
- the commentsCount
-
getResolvedByUser
public int getResolvedByUser()
Get id of user that resolved this alarm (or 0 if alarm is not resolved).- Returns:
- id of user that resolved this alarm (or 0 if alarm is not resolved)
-
isSticky
public boolean isSticky()
- Returns:
- the sticky
-
getAckTime
public int getAckTime()
Get time when alarm was acknowledged- Returns:
- time when alarm was acknowledged
-
getCategories
public long[] getCategories()
Get list of categories this alarm belongs to.- Returns:
- list of categories this alarm belongs to
-
getSubordinateAlarms
public long[] getSubordinateAlarms()
Get list of subordinate alarm identifiers.- Returns:
- list of subordinate alarm identifiers
-
hasSubordinatedAlarms
public boolean hasSubordinatedAlarms()
Check if this alarm has any subordinated alarms.- Returns:
- true if this alarm has any subordinated alarms
-
toString
public String toString()
- Overrides:
toStringin classObject- See Also:
Object.toString()
-
-