public class ExternalSystemNotificationManager extends java.lang.Object implements Disposable
ExternalSystemNotificationManager
provides creation and managements of user-friendly notifications for external system integration-specific events.
One example use-case is a situation when an error occurs during external project refresh. We need to
show corresponding message to the end-user.
Thread-safe.Disposable.Parent
Constructor and Description |
---|
ExternalSystemNotificationManager(Project project) |
Modifier and Type | Method and Description |
---|---|
void |
clearNotifications(NotificationSource notificationSource,
ProjectSystemId externalSystemId)
Deprecated.
|
void |
clearNotifications(java.lang.String groupName,
NotificationSource notificationSource,
ProjectSystemId externalSystemId)
Deprecated.
|
NotificationData |
createNotification(java.lang.String title,
java.lang.Throwable error,
ProjectSystemId externalSystemId,
Project project,
DataProvider dataProvider)
Create
NotificationData for error happened during the external system invocation which can be shown to the end user. |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
static java.lang.String |
getContentDisplayName(NotificationSource notificationSource,
ProjectSystemId externalSystemId)
Deprecated.
|
static ExternalSystemNotificationManager |
getInstance(Project project) |
boolean |
isNotificationActive(Key<java.lang.String> notificationKey) |
NewErrorTreeViewPanel |
prepareMessagesView(ProjectSystemId externalSystemId,
NotificationSource notificationSource,
boolean activateView)
Deprecated.
|
void |
showNotification(ProjectSystemId externalSystemId,
NotificationData notificationData) |
void |
showNotification(ProjectSystemId externalSystemId,
NotificationData notificationData,
Key<java.lang.String> notificationKey) |
public ExternalSystemNotificationManager(Project project)
public static ExternalSystemNotificationManager getInstance(Project project)
public NotificationData createNotification(java.lang.String title, java.lang.Throwable error, ProjectSystemId externalSystemId, Project project, DataProvider dataProvider)
NotificationData
for error happened during the external system invocation which can be shown to the end user.NotificationData
or null for not user-friendly errors.public boolean isNotificationActive(Key<java.lang.String> notificationKey)
public void showNotification(ProjectSystemId externalSystemId, NotificationData notificationData)
public void showNotification(ProjectSystemId externalSystemId, NotificationData notificationData, Key<java.lang.String> notificationKey)
@Deprecated public void clearNotifications(NotificationSource notificationSource, ProjectSystemId externalSystemId)
@Deprecated public void clearNotifications(java.lang.String groupName, NotificationSource notificationSource, ProjectSystemId externalSystemId)
@Deprecated public NewErrorTreeViewPanel prepareMessagesView(ProjectSystemId externalSystemId, NotificationSource notificationSource, boolean activateView)
@Deprecated public static java.lang.String getContentDisplayName(NotificationSource notificationSource, ProjectSystemId externalSystemId)
public void dispose()
Disposable
dispose
in interface Disposable