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 String
getCssClass()
Gets the name of the CSS class associated with this message.String
getId()
Get the unique ID for this message.String
getText()
Get the text for this messageboolean
isClosable()
Determines whether the message can be closedboolean
isVisible()
Determines whether the message should be shownvoid
setVisible(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:Message
Get the unique ID for this message.
-
getText
public String getText()
Description copied from interface:Message
Get the text for this message
-
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 interfaceMessage
- 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 interfaceMessage
- Returns:
- boolean
-
isVisible
public boolean isVisible()
Description copied from interface:Message
Determines whether the message should be shown
-
setVisible
public void setVisible(boolean visible)
-
-