Class SystemHelper.SystemAnnouncement

java.lang.Object
org.ametys.runtime.plugins.admin.system.SystemHelper.SystemAnnouncement
Enclosing class:
SystemHelper

public static class SystemHelper.SystemAnnouncement extends Object
Class representing the system announcement file
  • Constructor Details

  • Method Details

    • isAvailable

      public boolean 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

      public void setState(String state)
      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

      public String getState()
      Get the state
      Returns:
      "on", "off", "scheduled"
    • setStartDate

      public void setStartDate(ZonedDateTime startDate)
      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

      public void setEndDate(ZonedDateTime endDate)
      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

      public void addMessage(String lang, String message)
      Add a message to the list of announcements
      Parameters:
      lang - the language of the message
      message - the message itself