Class Notification

java.lang.Object
com.nomagic.magicdraw.ui.notification.AbstractNotification
com.nomagic.magicdraw.ui.notification.Notification
All Implemented Interfaces:
Serializable

@OpenApiAll public class Notification extends AbstractNotification implements 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:
  • Constructor Details

    • Notification

      public Notification()
    • Notification

      public Notification(String id, @CheckForNull 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 id
      title - notification title
    • Notification

      public Notification(String id, @CheckForNull String title, @CheckForNull 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 id
      title - notification title
      text - notification text
    • Notification

      public Notification(String id, @CheckForNull String title, @CheckForNull String text, @CheckForNull 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 id
      title - notification title
      text - notification text
      longText - notification long text
    • Notification

      public Notification(String id, @CheckForNull String title, @CheckForNull 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 id
      title - notification title
      text - notification text
      severity - notification severity
    • Notification

      public Notification(String id, @CheckForNull String title, @CheckForNull String text, @CheckForNull 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 id
      title - notification title
      text - notification text
      longText - notification long text
      severity - notification severity
    • Notification

      public Notification(String id, @CheckForNull String title, @CheckForNull 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 id
      title - notification title
      text - notification text
      actions - list of actions user can take
    • Notification

      public Notification(String id, @CheckForNull String title, @CheckForNull String text, @CheckForNull 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 id
      title - notification title
      text - notification text
      longText - notification long text
      actions - list of actions user can take
    • Notification

      public Notification(String id, @CheckForNull String title, @CheckForNull 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 id
      title - notification title
      text - notification text
      actions - list of actions user can take
      severity - notification severity level
    • Notification

      public Notification(String id, @CheckForNull String title, @CheckForNull String text, @CheckForNull 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 id
      title - notification title
      text - notification text
      actions - list of actions user can take
      severity - notification severity level
    • Notification

      public Notification(String id, @CheckForNull String title, @CheckForNull 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 id
      title - notification title
      text - notification text
      actions - list of actions user can take
      severity - notification severity level
      context - notification context
    • Notification

      public Notification(String id, @CheckForNull String title, @CheckForNull String text, @CheckForNull 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 id
      title - notification title
      text - notification text
      longText - notification long text
      actions - list of actions user can take
      severity - notification severity level
      context - notification context
  • Method Details

    • 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 String longText)
      Description copied from class: AbstractNotification
      Sets notification long text
      Overrides:
      setLongText in class AbstractNotification
      Parameters:
      longText - notification long text
    • isLogExpanded

      public boolean isLogExpanded()
    • setLogExpanded

      public void setLogExpanded(boolean logExpanded)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object