|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttwaver.alarm.AlarmSeverity
public class AlarmSeverity
告警级别,反映告警的紧急程度,默认有六种告警级别
Field Summary | |
---|---|
static AlarmSeverity |
CLEARED
清除级别 |
protected int |
color
告警级别颜色 |
static int |
COLOR_CLEARED
|
static int |
COLOR_CRITICAL
|
static int |
COLOR_INDETERMINATE
|
static int |
COLOR_MAJOR
|
static int |
COLOR_MINOR
|
static int |
COLOR_WARNING
|
static AlarmSeverity |
CRITICAL
严重 |
protected java.lang.String |
displayName
告警级别显示名称 |
static AlarmSeverity |
INDETERMINATE
不确定级别 |
static AlarmSeverity |
MAJOR
重要的 |
static AlarmSeverity |
MINOR
次要的 |
protected java.lang.String |
name
告警级别名称 |
static java.lang.String |
NAME_CLEARED
|
static java.lang.String |
NAME_CRITICAL
|
static java.lang.String |
NAME_INDETERMINATE
|
static java.lang.String |
NAME_MAJOR
|
static java.lang.String |
NAME_MINOR
|
static java.lang.String |
NAME_WARNING
|
protected java.lang.String |
nickName
告警级别昵称 |
static java.lang.String |
NICKNAME_CLEARED
|
static java.lang.String |
NICKNAME_CRITICAL
|
static java.lang.String |
NICKNAME_INDETERMINATE
|
static java.lang.String |
NICKNAME_MAJOR
|
static java.lang.String |
NICKNAME_MINOR
|
static java.lang.String |
NICKNAME_WARNING
|
protected int |
value
告警级别数值,默认按数值越大,级别越高 |
static int |
VALUE_CLEARED
|
static int |
VALUE_CRITICAL
|
static int |
VALUE_INDETERMINATE
|
static int |
VALUE_MAJOR
|
static int |
VALUE_MINOR
|
static int |
VALUE_WARNING
|
static AlarmSeverity |
WARNING
警告 |
Method Summary | |
---|---|
static void |
addAlarmSeverityChangeListener(AlarmSeverityChangeListener l)
Add a severity change listener. |
static void |
clearAlarmSeverity()
clear all registered alarm severity, may be used when the user want to define their a new suit of alarm severity |
int |
compareTo(AlarmSeverity o)
|
boolean |
equals(java.lang.Object object)
By default, only object is an AlarmSeverity object and
has the equal value with this alarm severity, this method will return true. |
static java.util.List<AlarmSeverity> |
getAllNonClearedSeverities()
|
static java.util.List<AlarmSeverity> |
getAllSeverities()
Get all defined alarm severities. |
static AlarmSeverity |
getByName(java.lang.String name)
Get the alarm severity via name. |
static AlarmSeverity |
getByValue(int value)
Get the alarm severity via severity value. |
static AlarmSeverity |
getClearedAlarmSeverity()
Gets the cleared alarm severity. |
int |
getColor()
Get the color of this alarm severity. |
java.lang.String |
getDisplayName()
Get the display name of this alarm severity. |
java.lang.String |
getName()
Get the name of this alarm severity. |
java.lang.String |
getNickName()
Get the nickname of this alarm severity. |
static AlarmSeverity |
getNonClearedRandomSeverity()
Get a random alarm severity, not include AlarmSeverity.CLEARED . |
static AlarmSeverity |
getRandomSeverity()
Generate a random alarm severity. |
static java.util.Comparator<AlarmSeverity> |
getSeverityComparator()
Get the alarm severity comparator object |
int |
getValue()
Get the severe value of this alarm severity. |
int |
hashCode()
|
static AlarmSeverity |
higher(AlarmSeverity a1,
AlarmSeverity a2)
|
static boolean |
isNonClearedSeverity(AlarmSeverity severity)
Checks whether the given alarm severity is not a cleared alarm severity. |
static java.util.Iterator<AlarmSeverity> |
iterator()
Gets a iterator object over all defined alarm severities. |
static AlarmSeverity |
registerAlarmSeverity(java.lang.String name,
java.lang.String nickName,
int value,
int color,
java.lang.String displayName)
Register a new alarm severity. |
static void |
setClearedAlarmSeverity(AlarmSeverity severity)
Sets the appointed alarm severity as cleared alarm severity. |
void |
setColor(int color)
Change the color of this alarm severity. |
void |
setDisplayName(java.lang.String displayName)
Change the new display name of this alarm severity. |
void |
setNickName(java.lang.String nickName)
Change the new nickname of this severity. |
static void |
setSeverityComparator(java.util.Comparator<AlarmSeverity> severityComparator)
Set the alarm severity comparator object. |
static int |
size()
Gets the count of defined alarm severities. |
java.lang.String |
toString()
Returns the name of this alarm severity. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NAME_CRITICAL
public static final java.lang.String NAME_MAJOR
public static final java.lang.String NAME_MINOR
public static final java.lang.String NAME_WARNING
public static final java.lang.String NAME_INDETERMINATE
public static final java.lang.String NAME_CLEARED
public static final java.lang.String NICKNAME_INDETERMINATE
public static final java.lang.String NICKNAME_CRITICAL
public static final java.lang.String NICKNAME_MAJOR
public static final java.lang.String NICKNAME_MINOR
public static final java.lang.String NICKNAME_WARNING
public static final java.lang.String NICKNAME_CLEARED
public static final int VALUE_CRITICAL
public static final int VALUE_MAJOR
public static final int VALUE_MINOR
public static final int VALUE_WARNING
public static final int VALUE_INDETERMINATE
public static final int VALUE_CLEARED
public static final int COLOR_CRITICAL
public static final int COLOR_MAJOR
public static final int COLOR_MINOR
public static final int COLOR_WARNING
public static final int COLOR_INDETERMINATE
public static final int COLOR_CLEARED
public static AlarmSeverity INDETERMINATE
public static AlarmSeverity CRITICAL
public static AlarmSeverity MAJOR
public static AlarmSeverity MINOR
public static AlarmSeverity WARNING
public static AlarmSeverity CLEARED
protected final int value
protected final java.lang.String name
protected int color
protected java.lang.String nickName
protected java.lang.String displayName
Method Detail |
---|
public static void addAlarmSeverityChangeListener(AlarmSeverityChangeListener l)
l
- AlarmSeverityChangeListener the listenerpublic static void setClearedAlarmSeverity(AlarmSeverity severity)
CLEARED
is cleared alarm severity.
severity
- the appointed alarm severity.public static AlarmSeverity getClearedAlarmSeverity()
setClearedAlarmSeverity(AlarmSeverity)
public static AlarmSeverity getRandomSeverity()
public static AlarmSeverity getNonClearedRandomSeverity()
AlarmSeverity.CLEARED
.
public static boolean isNonClearedSeverity(AlarmSeverity severity)
severity
- the alarm severity to be checked.
public static AlarmSeverity registerAlarmSeverity(java.lang.String name, java.lang.String nickName, int value, int color, java.lang.String displayName)
name
- alarm severity's namenickName
- alarm severity's nicknamevalue
- alarm severity's valuecolor
- alarm severity's render color
public static void clearAlarmSeverity()
public static java.util.List<AlarmSeverity> getAllSeverities()
public static java.util.List<AlarmSeverity> getAllNonClearedSeverities()
public static java.util.Iterator<AlarmSeverity> iterator()
public static int size()
public static AlarmSeverity getByName(java.lang.String name)
name
- String the severity name
public static AlarmSeverity getByValue(int value)
value
- int the alarm severity value.
public int getColor()
public java.lang.String getName()
public java.lang.String getNickName()
public int getValue()
public void setColor(int color)
color
- int the new severity colorpublic void setDisplayName(java.lang.String displayName)
displayName
- String the new display namepublic void setNickName(java.lang.String nickName)
nickName
- String the new nickname of this severity.public boolean equals(java.lang.Object object)
object
is an AlarmSeverity
object and
has the equal value with this alarm severity, this method will return true.
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getDisplayName()
public int compareTo(AlarmSeverity o)
compareTo
in interface java.lang.Comparable<AlarmSeverity>
public static AlarmSeverity higher(AlarmSeverity a1, AlarmSeverity a2)
public static java.util.Comparator<AlarmSeverity> getSeverityComparator()
public static void setSeverityComparator(java.util.Comparator<AlarmSeverity> severityComparator)
severityComparator
- Comparator the new alarm severity comparatorAlarmSeverityComparator.ASCENDING
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |