Class SystemHelper.SystemAnnouncement
java.lang.Object
org.ametys.runtime.plugins.admin.system.SystemHelper.SystemAnnouncement
- Enclosing class:
- SystemHelper
Class representing the system announcement file
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMessage
(String lang, String message) Add a message to the list of announcementsGet the end date for scheduled announcementGet the messages by languageGet the start date for scheduled announcementgetState()
Get the stateboolean
Is the system announcement available ?void
setEndDate
(ZonedDateTime endDate) Set the end date for scheduled announcementvoid
setStartDate
(ZonedDateTime startDate) Set the start date for scheduled announcementvoid
Set the state of the system announcement
-
Constructor Details
-
SystemAnnouncement
public SystemAnnouncement()Constructor
-
-
Method Details
-
isAvailable
Is the system announcement available ?- Returns:
- true if the system announcement is available, false otherwise
-
getMessages
Get the messages by language- Returns:
- the messages by languaga
-
setState
Set the state of the system announcement- Parameters:
state
- 'on' to set the enable system announcement, 'scheduled' to enable it base on the start and end date disabled otherwise
-
getState
Get the state- Returns:
- "on", "off", "scheduled"
-
setStartDate
Set the start date for scheduled announcement- Parameters:
startDate
- the start date or null
-
getStartDate
Get the start date for scheduled announcement- Returns:
- the start date or null
-
setEndDate
Set the end date for scheduled announcement- Parameters:
endDate
- the end date or null
-
getEndDate
Get the end date for scheduled announcement- Returns:
- the end date or null
-
addMessage
Add a message to the list of announcements- Parameters:
lang
- the language of the messagemessage
- the message itself
-