Class DefaultMessage
java.lang.Object
com.atlassian.confluence.util.message.DefaultMessage
- All Implemented Interfaces:
Message
- Direct Known Subclasses:
WebSudoMessage
A global message (aka. banner) shown at the top of Confluence
-
Constructor Summary
ConstructorsConstructorDescriptionDefault 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
Modifier and TypeMethodDescriptionGets the name of the CSS class associated with this message.getId()
Get the unique ID for this message.getText()
Get the text for this messageboolean
Determines whether the message can be closedboolean
Determines whether the message should be shownvoid
setVisible
(boolean visible)
-
Constructor Details
-
DefaultMessage
public DefaultMessage()Default constructor -
DefaultMessage
- Parameters:
text
- the content of the messagecssClass
- additional CSS classesclosable
- show a close button if truevisible
- true if the message should be visible
-
DefaultMessage
- 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
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
-
DefaultMessage
Message will be shown a closable by default.- Parameters:
text
- the content of the messagecssClass
- additional CSS classes
-
-
Method Details
-
getId
Description copied from interface:Message
Get the unique ID for this message. -
getText
Description copied from interface:Message
Get the text for this message -
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)
-