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 Summary
Constructors Constructor Description DefaultMessage()Default constructorDefaultMessage(String text, String cssClass)Message will be shown a closable by default.DefaultMessage(String text, String cssClass, boolean closable)Constructor without explicit visible parameter.DefaultMessage(String text, String cssClass, boolean closable, boolean visible)DefaultMessage(String id, String text, String cssClass, boolean closable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCssClass()Gets the name of the CSS class associated with this message.StringgetId()Get the unique ID for this message.StringgetText()Get the text for this messagebooleanisClosable()Determines whether the message can be closedbooleanisVisible()Determines whether the message should be shownvoidsetVisible(boolean visible)
-
-
-
Constructor Detail
-
DefaultMessage
public DefaultMessage()
Default constructor
-
DefaultMessage
public DefaultMessage(String text, String cssClass, boolean closable, boolean visible)
- Parameters:
text- the content of the messagecssClass- additional CSS classesclosable- show a close button if truevisible- 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 elementtext- the content of the messagecssClass- additional CSS classesclosable- 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 messagecssClass- additional CSS classesclosable- show a close button if true
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:MessageGet the unique ID for this message.
-
getText
public String getText()
Description copied from interface:MessageGet the text for this message
-
getCssClass
public String getCssClass()
Description copied from interface:MessageGets the name of the CSS class associated with this message. The class name can be used to style the message- Specified by:
getCssClassin interfaceMessage- Returns:
- String name of the css class
-
isClosable
public boolean isClosable()
Description copied from interface:MessageDetermines whether the message can be closed- Specified by:
isClosablein interfaceMessage- Returns:
- boolean
-
isVisible
public boolean isVisible()
Description copied from interface:MessageDetermines whether the message should be shown
-
setVisible
public void setVisible(boolean visible)
-
-