Class AlertStatus
- All Implemented Interfaces:
Serializable
The levels in descending order are:
- ESCALATED (highest value)
- RAISED
- SUPPRESSED
- RESOLVED
- NA (lowest value)
- Since:
- 8.0
- Author:
- Moran Avigdor
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AlertStatusESCALATED is an alert status indicating that a raised alert has been escalated.static final AlertStatusNA is an alert status indicating that a component for which an alert has been raised is no longer available.static final AlertStatusRAISED is an alert status indicating an alert has been raised.static final AlertStatusRESOLVED is an alert status indicating that a raised alert has been resolved.static final AlertStatusSUPPRESSED is an alert status indicating that a raised alert has been suppressed. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAlertStatus(String name, int value) Create a named alert status with a given integer value. -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompare two objects for value equality.getName()Return the string name of the alert status.intgetValue()Get the integer value for this alert status.inthashCode()Generate a hashcode.booleanbooleanbooleanisRaised()booleanbooleanbooleanstatic AlertStatusparse(int value) Returns an AlertStatus by it's value (seegetValue()).static AlertStatusReturns an AlertStatus by it's value (seegetName()).final StringtoString()
-
Field Details
-
ESCALATED
ESCALATED is an alert status indicating that a raised alert has been escalated.ESCALATED alert status is intended to inform of a situation that is in need of attention, and has gone worse.
This status is initialized to
1000. -
RAISED
RAISED is an alert status indicating an alert has been raised.RAISED alerts are intended to inform of a situation that is in need of attention.
This status is initialized to
900. -
SUPPRESSED
SUPPRESSED is an alert status indicating that a raised alert has been suppressed.SUPPRESSED alert status is intended to inform of a situation that has been attended, but will not be resolved.
This status is initialized to
800. -
RESOLVED
RESOLVED is an alert status indicating that a raised alert has been resolved.RESOLVED alert status is intended to inform of a situation that has been attended and has been resolved.
This status is initialized to
700. -
NA
NA is an alert status indicating that a component for which an alert has been raised is no longer available.NA (NOT AVAILABLE) alert status is intended to inform of a situation that is in need of attention, but it's status can't be currently determined. This alert status can be considered as a 'resolution' depending on the system involved.
This status is initialized to
600.
-
-
Constructor Details
-
AlertStatus
Create a named alert status with a given integer value.Note that this constructor is "protected" to allow subclassing. In general it is sufficient to use one of the constant Level objects such as
RESOLVEDorRAISED. However, if there is a need to add a new alert status, this call may be subclassed and new constants can be defined.- Parameters:
name- the name of the alert status, for example "RAISED".value- an integer value for the status.
-
-
Method Details
-
getName
Return the string name of the alert status.- Returns:
- name of this alert status.
-
getValue
public int getValue()Get the integer value for this alert status. This integer value can be used for efficient ordering comparisons between alert status objects.- Returns:
- the integer value for this alert status.
-
isEscalated
public boolean isEscalated()- Returns:
trueif this is anESCALATEDalert status.
-
isRaised
public boolean isRaised()- Returns:
trueif this is aRAISEDalert status.
-
isSuppressed
public boolean isSuppressed()- Returns:
trueif this is aSUPPRESSEDalert status.
-
isResolved
public boolean isResolved()- Returns:
trueif this is aRESOLVEDalert status.
-
isUnresolved
public boolean isUnresolved()- Returns:
trueif this is *not* aRESOLVEDalert status; e.g.SUPPRESSED,RAISED, orESCALATED- Since:
- 12.0.0
-
isNotAvailable
public boolean isNotAvailable()- Returns:
trueif this is aNAalert status.
-
parse
Returns an AlertStatus by it's value (seegetName()).- Parameters:
name- representing this status- Returns:
- a severity.
- Throws:
IllegalArgumentException- if an unknown status was requested.
-
parse
Returns an AlertStatus by it's value (seegetValue()).- Parameters:
value- representing this status- Returns:
- a severity.
- Throws:
IllegalArgumentException- if an unknown status was requested.
-
equals
Compare two objects for value equality. -
hashCode
public int hashCode()Generate a hashcode. -
toString
-