Enum Class NotificationLevel

java.lang.Object
java.lang.Enum<NotificationLevel>
com.highdeal.notification.NotificationLevel
All Implemented Interfaces:
Serializable, Comparable<NotificationLevel>, Constable

public enum NotificationLevel extends Enum<NotificationLevel>
This enumeration lists the severity level of a notification: INFORM, SECURITY, ALERT, FAILURE, FATAL, WARN, QUIET.
See Also:
  • Enum Constant Details

    • QUIET

      public static final NotificationLevel QUIET
      Constant used to configure the sending system so that no notification is generated.
    • INFORM

      public static final NotificationLevel INFORM
      Level for informing notifications
    • SECURITY

      public static final NotificationLevel SECURITY
      Level for notifications related to security
    • ALERT

      public static final NotificationLevel ALERT
      Level for alerts
    • WARN

      public static final NotificationLevel WARN
      Level for warning
    • FAILURE

      public static final NotificationLevel FAILURE
      Level for notification informing about a failure that happened in the sending system
    • FATAL

      public static final NotificationLevel FATAL
      Level for notification informing about a fatal event that happened in the sending system
  • Method Details

    • values

      public static NotificationLevel[] 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

      public static NotificationLevel valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • parse

      public static NotificationLevel parse(String name, NotificationLevel defaultValue)
      Searches the notification level object from its name.
      Parameters:
      name - The name of the notification level to be returned
      defaultValue - 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

      public static NotificationLevel getFromCode(int code, NotificationLevel defaultValue)
      Searches the notification level object from its code.
      Parameters:
      code - The code of the notification level object to be returned
      defaultValue - 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

      public String getName()
      Returns the name of this notification level.
      Returns:
      The name