Package org.netxms.client.events
Class Incident
java.lang.Object
org.netxms.client.events.Incident
Incident - operational record for tracking and managing multiple alarms
-
Constructor Summary
ConstructorsConstructorDescriptionIncident(NXCPMessage msg) Create incident object from NXCP message (details response) -
Method Summary
Modifier and TypeMethodDescriptionintGet assigned user IDintGet ID of user who closed this incidentGet close timeGet commentsintGet comments countintGet ID of user who created this incidentGet creation timelonggetId()Get incident IDGet last change timelong[]Get list of linked alarm IDsintGet ID of user who resolved this incidentGet resolve timelongGet source alarm IDlongGet source object IDgetState()Get incident stategetTitle()Get incident titlebooleanCheck if this incident has linked alarmsbooleanisClosed()Check if incident is in terminal state (Closed)booleanCheck if incident is resolvedtoString()
-
Constructor Details
-
Incident
Create incident object from NXCP message (details response)- Parameters:
msg- Source NXCP message
-
-
Method Details
-
getId
public long getId()Get incident ID- Returns:
- incident ID
-
getCreationTime
Get creation time- Returns:
- creation time
-
getLastChangeTime
Get last change time- Returns:
- last change time
-
getState
Get incident state- Returns:
- incident state
-
getAssignedUserId
public int getAssignedUserId()Get assigned user ID- Returns:
- assigned user ID or 0 if not assigned
-
getTitle
Get incident title- Returns:
- incident title
-
getSourceAlarmId
public long getSourceAlarmId()Get source alarm ID- Returns:
- source alarm ID or 0 if not created from alarm
-
getSourceObjectId
public long getSourceObjectId()Get source object ID- Returns:
- source object ID
-
getCreatedByUser
public int getCreatedByUser()Get ID of user who created this incident- Returns:
- creator user ID or 0 if auto-created
-
getResolvedByUser
public int getResolvedByUser()Get ID of user who resolved this incident- Returns:
- user ID or 0 if not resolved
-
getClosedByUser
public int getClosedByUser()Get ID of user who closed this incident- Returns:
- user ID or 0 if not closed
-
getResolveTime
Get resolve time- Returns:
- resolve time or null if not resolved
-
getCloseTime
Get close time- Returns:
- close time or null if not closed
-
getLinkedAlarmIds
public long[] getLinkedAlarmIds()Get list of linked alarm IDs- Returns:
- array of linked alarm IDs
-
hasLinkedAlarms
public boolean hasLinkedAlarms()Check if this incident has linked alarms- Returns:
- true if incident has linked alarms
-
getCommentsCount
public int getCommentsCount()Get comments count- Returns:
- comments count
-
getComments
Get comments- Returns:
- list of comments
-
isClosed
public boolean isClosed()Check if incident is in terminal state (Closed)- Returns:
- true if incident is closed
-
isResolved
public boolean isResolved()Check if incident is resolved- Returns:
- true if incident is resolved or closed
-
toString
-