Package com.highdeal.notification
Enum Class NotificationLevel
- All Implemented Interfaces:
Serializable,Comparable<NotificationLevel>,Constable
This
enumeration lists the severity level of a notification: INFORM, SECURITY, ALERT, FAILURE, FATAL, WARN, QUIET.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionLevel for alertsLevel for notification informing about a failure that happened in the sending systemLevel for notification informing about a fatal event that happened in the sending systemLevel for informing notificationsConstant used to configure the sending system so that no notification is generated.Level for notifications related to securityLevel for warning -
Method Summary
Modifier and TypeMethodDescriptionintgetCode()Returns the code of this notification level.static NotificationLevelgetFromCode(int code, NotificationLevel defaultValue) Searches the notification level object from its code.getName()Returns the name of this notification level.static NotificationLevelparse(String name, NotificationLevel defaultValue) Searches the notification level object from its name.static NotificationLevelReturns the enum constant of this class with the specified name.static NotificationLevel[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
QUIET
Constant used to configure the sending system so that no notification is generated. -
INFORM
Level for informing notifications -
SECURITY
Level for notifications related to security -
ALERT
Level for alerts -
WARN
Level for warning -
FAILURE
Level for notification informing about a failure that happened in the sending system -
FATAL
Level for notification informing about a fatal event that happened in the sending system
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
parse
Searches the notification level object from its name.- Parameters:
name- The name of the notification level to be returneddefaultValue- The notification level object to be returned if there is no notification level with the specified name; Is optional and can be null.- Returns:
- The notification level object with the name name if exists, defaultValue otherwise
-
getFromCode
Searches the notification level object from its code.- Parameters:
code- The code of the notification level object to be returneddefaultValue- The notification level object to be returned if there is no notification level with the specified name; Is optional and can be null.- Returns:
- The notification level object with the code code if exists, defaultValue otherwise
-
getCode
public int getCode()Returns the code of this notification level.- Returns:
- The code
-
getName
Returns the name of this notification level.- Returns:
- The name
-