@ParametersAreNonnullByDefault public class JohnsonUtils extends Object
| Constructor and Description |
|---|
JohnsonUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
allEventsDismissible()
Indicates whether all johnson events have dismissible attribute equal to true.
|
static void |
dismissEvents()
Removes warnings from the currently initialised Johnson container.
|
static boolean |
eventExists(com.atlassian.johnson.JohnsonEventContainer container,
Predicate<com.atlassian.johnson.event.Event> predicate)
Indicates whether the given container contains any events matching the given predicate.
|
static boolean |
eventExists(Predicate<com.atlassian.johnson.event.Event> predicate)
Indicates whether the currently initialised container contains any events matching the given predicate.
|
static Optional<JohnsonEventLevel> |
findHighestEventLevel()
Returns the highest event level within the initialised Johnson container, if any.
|
static Optional<JohnsonEventLevel> |
findHighestEventLevel(com.atlassian.johnson.JohnsonEventContainer eventContainer)
Returns the highest event level within the given event container, if any.
|
static com.atlassian.johnson.event.Event |
raiseJohnsonEvent(JohnsonEventType eventType,
String eventDescription,
String exception,
JohnsonEventLevel eventLevel)
Raises an
Event with the given properties in the currently initialised Johnson container. |
static com.atlassian.johnson.event.Event |
raiseJohnsonEventRequiringTranslation(JohnsonEventType eventType,
String i18nKey,
String exception,
JohnsonEventLevel eventLevel)
Raises an
Event whose description requires translation in the currently initialised Johnson container. |
static void |
removeEvent(com.atlassian.johnson.event.Event johnsonEvent)
Removes the given event from the currently initialised Johnson container.
|
public static com.atlassian.johnson.event.Event raiseJohnsonEvent(JohnsonEventType eventType, String eventDescription, @Nullable String exception, JohnsonEventLevel eventLevel)
Event with the given properties in the currently initialised Johnson container.eventType - the type of Johnson event to raiseeventDescription - the description of the eventexception - further details of the cause of the Johnson event, if availableeventLevel - the level of the Johnson event to raiseEvent created.public static com.atlassian.johnson.event.Event raiseJohnsonEventRequiringTranslation(JohnsonEventType eventType, String i18nKey, @Nullable String exception, JohnsonEventLevel eventLevel)
Event whose description requires translation in the currently initialised Johnson container.eventType - the type of Johnson event to raisei18nKey - the key which should be used to look up the description translationexception - further details of the cause of the Johnson event, if availableeventLevel - the level of the Johnson event to raiseEvent created.public static void removeEvent(com.atlassian.johnson.event.Event johnsonEvent)
public static Optional<JohnsonEventLevel> findHighestEventLevel()
public static Optional<JohnsonEventLevel> findHighestEventLevel(com.atlassian.johnson.JohnsonEventContainer eventContainer)
eventContainer - the container to inspectpublic static boolean eventExists(Predicate<com.atlassian.johnson.event.Event> predicate)
predicate - the predicate to applypublic static boolean eventExists(com.atlassian.johnson.JohnsonEventContainer container,
Predicate<com.atlassian.johnson.event.Event> predicate)
JohnsonEventContainer contain this method.container - the container to checkpredicate - the predicate to applypublic static void dismissEvents()
public static boolean allEventsDismissible()
Copyright © 2003–2021 Atlassian. All rights reserved.