Class DefaultMessage

java.lang.Object
com.atlassian.confluence.util.message.DefaultMessage
All Implemented Interfaces:
Message
Direct Known Subclasses:
WebSudoMessage

public class DefaultMessage extends Object implements Message
A global message (aka. banner) shown at the top of Confluence
  • Constructor Details

    • DefaultMessage

      public DefaultMessage()
      Default constructor
    • DefaultMessage

      public DefaultMessage(String text, String cssClass, boolean closable, boolean visible)
      Parameters:
      text - the content of the message
      cssClass - additional CSS classes
      closable - show a close button if true
      visible - true if the message should be visible
    • DefaultMessage

      public DefaultMessage(String id, String text, String cssClass, boolean closable)
      Parameters:
      id - the ID of the HTML element
      text - the content of the message
      cssClass - additional CSS classes
      closable - show a close button if true
      Since:
      6.10.0
    • DefaultMessage

      public DefaultMessage(String text, String cssClass, boolean closable)
      Constructor without explicit visible parameter. Show will be set to true by default.
      Parameters:
      text - the content of the message
      cssClass - additional CSS classes
      closable - show a close button if true
    • DefaultMessage

      public DefaultMessage(String text, String cssClass)
      Message will be shown a closable by default.
      Parameters:
      text - the content of the message
      cssClass - additional CSS classes
  • Method Details

    • getId

      public String getId()
      Description copied from interface: Message
      Get the unique ID for this message.
      Specified by:
      getId in interface Message
      Returns:
      message id
    • getText

      public String getText()
      Description copied from interface: Message
      Get the text for this message
      Specified by:
      getText in interface Message
      Returns:
      message text
    • getCssClass

      public String getCssClass()
      Description copied from interface: Message
      Gets the name of the CSS class associated with this message. The class name can be used to style the message
      Specified by:
      getCssClass in interface Message
      Returns:
      String name of the css class
    • isClosable

      public boolean isClosable()
      Description copied from interface: Message
      Determines whether the message can be closed
      Specified by:
      isClosable in interface Message
      Returns:
      boolean
    • isVisible

      public boolean isVisible()
      Description copied from interface: Message
      Determines whether the message should be shown
      Specified by:
      isVisible in interface Message
      Returns:
      boolean
    • setVisible

      public void setVisible(boolean visible)