Class Notification
- java.lang.Object
-
- com.nomagic.magicdraw.ui.notification.AbstractNotification
-
- com.nomagic.magicdraw.ui.notification.Notification
-
- All Implemented Interfaces:
java.io.Serializable
@OpenApiAll public class Notification extends AbstractNotification implements java.io.Serializable
This class contains data used to construct and display MagicDraw notification. Notification can be displayed as separate popup in lower right corner or in designated area of control. NOTE: although HTML tags are supported, the notification title/text should not be wrapped into <html><body></body></html> tags as during the construction of the notification's popup, such wrapping is already done by the notification manager.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Notification.Context
Context enum indicates notification origin.
-
Constructor Summary
Constructors Constructor Description Notification()
Notification(java.lang.String id, java.lang.String title)
Constructs notification with specified id and title.Notification(java.lang.String id, java.lang.String title, java.lang.String text)
Constructs notification with specified id, title and text.Notification(java.lang.String id, java.lang.String title, java.lang.String text, HRefRunnable[] actions)
Constructs notification with specified id, title, text and list of actions user can perform upon notification.Notification(java.lang.String id, java.lang.String title, java.lang.String text, HRefRunnable[] actions, NotificationSeverity severity)
Constructs notification with specified id, title, text, severity and list of actions user can perform upon notification.Notification(java.lang.String id, java.lang.String title, java.lang.String text, HRefRunnable[] actions, NotificationSeverity severity, Notification.Context context)
Constructs notification with specified id, title, text, severity, context and list of actions user can perform upon notification.Notification(java.lang.String id, java.lang.String title, java.lang.String text, NotificationSeverity severity)
Constructs notification with specified id, title, text and severity.Notification(java.lang.String id, java.lang.String title, java.lang.String text, java.lang.String longText)
Constructs notification with specified id, title, short and long text description.Notification(java.lang.String id, java.lang.String title, java.lang.String text, java.lang.String longText, HRefRunnable[] actions)
Constructs notification with specified id, title, short description, long description and list of actions user can perform upon notification.Notification(java.lang.String id, java.lang.String title, java.lang.String text, java.lang.String longText, HRefRunnable[] actions, NotificationSeverity severity)
Constructs notification with specified id, title, short text, long text, severity and list of actions user can perform upon notification.Notification(java.lang.String id, java.lang.String title, java.lang.String text, java.lang.String longText, HRefRunnable[] actions, NotificationSeverity severity, Notification.Context context)
Constructs notification with specified id, title, short text, long text, severity, context and list of actions user can perform upon notification.Notification(java.lang.String id, java.lang.String title, java.lang.String text, java.lang.String longText, NotificationSeverity severity)
Constructs notification with specified id, title, short description, long description and severity.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Notification.Context
getContext()
Returns notification contextNotificationSeverity
getSeverity()
Returns notification severityint
hashCode()
void
setContext(Notification.Context context)
Sets new notification contextvoid
setLongText(java.lang.String longText)
Sets notification long textvoid
setSeverity(NotificationSeverity severity)
Sets notification severity-
Methods inherited from class com.nomagic.magicdraw.ui.notification.AbstractNotification
addHRefAction, getHRefAction, getID, getLongText, getText, getTitle, removeHRefAction, removeHRefAction, setText, setTitle
-
-
-
-
Constructor Detail
-
Notification
public Notification()
-
Notification
public Notification(java.lang.String id, @CheckForNull java.lang.String title)
Constructs notification with specified id and title. Default ENVIRONMENT context and INFO severity is used while creating notification. No actions or text is set for this notification- Parameters:
id
- notification unique idtitle
- notification title
-
Notification
public Notification(java.lang.String id, @CheckForNull java.lang.String title, @CheckForNull java.lang.String text)
Constructs notification with specified id, title and text. Default ENVIRONMENT context and INFO severity is used while creating notification. No actions are set for this notification- Parameters:
id
- notification unique idtitle
- notification titletext
- notification text
-
Notification
public Notification(java.lang.String id, @CheckForNull java.lang.String title, @CheckForNull java.lang.String text, @CheckForNull java.lang.String longText)
Constructs notification with specified id, title, short and long text description. Default ENVIRONMENT context and INFO severity is used while creating notification. No actions are set for this notification- Parameters:
id
- notification unique idtitle
- notification titletext
- notification textlongText
- notification long text
-
Notification
public Notification(java.lang.String id, @CheckForNull java.lang.String title, @CheckForNull java.lang.String text, NotificationSeverity severity)
Constructs notification with specified id, title, text and severity. Default ENVIRONMENT context is used while creating notification. No actions are set for this notification- Parameters:
id
- notification unique idtitle
- notification titletext
- notification textseverity
- notification severity
-
Notification
public Notification(java.lang.String id, @CheckForNull java.lang.String title, @CheckForNull java.lang.String text, @CheckForNull java.lang.String longText, NotificationSeverity severity)
Constructs notification with specified id, title, short description, long description and severity. Default ENVIRONMENT context is used while creating notification. No actions are set for this notification- Parameters:
id
- notification unique idtitle
- notification titletext
- notification textlongText
- notification long textseverity
- notification severity
-
Notification
public Notification(java.lang.String id, @CheckForNull java.lang.String title, @CheckForNull java.lang.String text, @CheckForNull HRefRunnable[] actions)
Constructs notification with specified id, title, text and list of actions user can perform upon notification. Default ENVIRONMENT context and severity INFO is set while creating notification.- Parameters:
id
- notification unique idtitle
- notification titletext
- notification textactions
- list of actions user can take
-
Notification
public Notification(java.lang.String id, @CheckForNull java.lang.String title, @CheckForNull java.lang.String text, @CheckForNull java.lang.String longText, @CheckForNull HRefRunnable[] actions)
Constructs notification with specified id, title, short description, long description and list of actions user can perform upon notification. Default ENVIRONMENT context and severity INFO is set while creating notification.- Parameters:
id
- notification unique idtitle
- notification titletext
- notification textlongText
- notification long textactions
- list of actions user can take
-
Notification
public Notification(java.lang.String id, @CheckForNull java.lang.String title, @CheckForNull java.lang.String text, @CheckForNull HRefRunnable[] actions, NotificationSeverity severity)
Constructs notification with specified id, title, text, severity and list of actions user can perform upon notification. Default ENVIRONMENT context is set while creating notification.- Parameters:
id
- notification unique idtitle
- notification titletext
- notification textactions
- list of actions user can takeseverity
- notification severity level
-
Notification
public Notification(java.lang.String id, @CheckForNull java.lang.String title, @CheckForNull java.lang.String text, @CheckForNull java.lang.String longText, @CheckForNull HRefRunnable[] actions, NotificationSeverity severity)
Constructs notification with specified id, title, short text, long text, severity and list of actions user can perform upon notification. Default ENVIRONMENT context is set while creating notification.- Parameters:
id
- notification unique idtitle
- notification titletext
- notification textactions
- list of actions user can takeseverity
- notification severity level
-
Notification
public Notification(java.lang.String id, @CheckForNull java.lang.String title, @CheckForNull java.lang.String text, @CheckForNull HRefRunnable[] actions, NotificationSeverity severity, Notification.Context context)
Constructs notification with specified id, title, text, severity, context and list of actions user can perform upon notification.- Parameters:
id
- notification unique idtitle
- notification titletext
- notification textactions
- list of actions user can takeseverity
- notification severity levelcontext
- notification context
-
Notification
public Notification(java.lang.String id, @CheckForNull java.lang.String title, @CheckForNull java.lang.String text, @CheckForNull java.lang.String longText, @CheckForNull HRefRunnable[] actions, NotificationSeverity severity, Notification.Context context)
Constructs notification with specified id, title, short text, long text, severity, context and list of actions user can perform upon notification.- Parameters:
id
- notification unique idtitle
- notification titletext
- notification textlongText
- notification long textactions
- list of actions user can takeseverity
- notification severity levelcontext
- notification context
-
-
Method Detail
-
getSeverity
public NotificationSeverity getSeverity()
Returns notification severity- Returns:
- notification severity
-
setSeverity
public void setSeverity(NotificationSeverity severity)
Sets notification severity- Parameters:
severity
- new notification severity
-
getContext
public Notification.Context getContext()
Returns notification context- Returns:
- notification context
-
setContext
public void setContext(Notification.Context context)
Sets new notification context- Parameters:
context
- notification context
-
setLongText
public void setLongText(@CheckForNull java.lang.String longText)
Description copied from class:AbstractNotification
Sets notification long text- Overrides:
setLongText
in classAbstractNotification
- Parameters:
longText
- notification long text
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-