Enum JohnsonEventLevel
- java.lang.Object
-
- java.lang.Enum<JohnsonEventLevel>
-
- com.atlassian.confluence.internal.health.JohnsonEventLevel
-
- All Implemented Interfaces:
Serializable
,Comparable<JohnsonEventLevel>
@ParametersAreNonnullByDefault public enum JohnsonEventLevel extends Enum<JohnsonEventLevel>
The Johnson event levels defined by this product. Motivation: enum values are more typesafe than strings.TestJohnsonEventLevel
ensures that this file remains in sync withjohnson-config.xml
.- Since:
- 6.5.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isAtLeast(JohnsonEventLevel minimumLevel)
Indicates whether this event level is at least as severe as the given level.@NonNull com.atlassian.johnson.event.EventLevel
level()
Returns the Johnson-typed event level for this enum value.@NonNull String
levelName()
Returns the name of the event level for this enum value.static JohnsonEventLevel
valueOf(String name)
Returns the enum constant of this type with the specified name.static JohnsonEventLevel[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.static JohnsonEventLevel
withName(String levelName)
Returns the enum value with the given level name.
-
-
-
Enum Constant Detail
-
FATAL
public static final JohnsonEventLevel FATAL
-
ERROR
public static final JohnsonEventLevel ERROR
-
WARNING
public static final JohnsonEventLevel WARNING
-
-
Method Detail
-
values
public static JohnsonEventLevel[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (JohnsonEventLevel c : JohnsonEventLevel.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JohnsonEventLevel valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
withName
public static JohnsonEventLevel withName(String levelName)
Returns the enum value with the given level name.- Parameters:
levelName
- the name to match upon (case-insensitively)- Returns:
- see above
- Throws:
IllegalArgumentException
- if the name is unknown
-
isAtLeast
public boolean isAtLeast(JohnsonEventLevel minimumLevel)
Indicates whether this event level is at least as severe as the given level.- Parameters:
minimumLevel
- the minimum level to check against- Returns:
- see above
-
levelName
public @NonNull String levelName()
Returns the name of the event level for this enum value.- Returns:
- see above
-
level
public @NonNull com.atlassian.johnson.event.EventLevel level()
Returns the Johnson-typed event level for this enum value.- Returns:
- see above
-
-