Class SystemMessagesBean

All Implemented Interfaces:
Serializable

@Named @ViewScoped public class SystemMessagesBean extends FCContextBean implements Serializable
See Also:
  • Constructor Details

    • SystemMessagesBean

      public SystemMessagesBean()
  • Method Details

    • init

      @PostConstruct public void init()
    • getModel

      public IEntityListModel<SystemMessage> getModel()
    • setModel

      public void setModel(IEntityListModel<SystemMessage> model)
    • updateModel

      public void updateModel()
    • getAvailableIcons

      public Collection<IconItem> getAvailableIcons()
      Returns:
      All available icons that can be selected for a system message, in the form Pair[IconName, IconColor].
    • getAvailableColors

      public Collection<String> getAvailableColors()
    • getAvailableI18nSources

      public Collection<EI18nSource> getAvailableI18nSources()
    • getLocaleBean

      public LocaleBean getLocaleBean()
      Overrides:
      getLocaleBean in class AJSFContext
    • setLocaleBean

      public void setLocaleBean(LocaleBean localeBean)
      Overrides:
      setLocaleBean in class AJSFContext
    • getPreviewLanguage

      public ELanguage getPreviewLanguage()
      Returns:
      The language to be used for displaying a preview of the messages.
    • setPreviewLanguage

      public void setPreviewLanguage(ELanguage previewLanguage)
    • getAvailableLanguages

      public Collection<ELanguage> getAvailableLanguages(SystemMessage msg)
      Parameters:
      msg - Message to check.
      Returns:
      All languages for which a #SystemMessageI18n is set for the given message. May include null for the default. The default may be overridden by language-specific settings.
    • hasSystemMessageI18n

      public boolean hasSystemMessageI18n(SystemMessage msg, ELanguage language)
    • getSystemMessageI18n

      public SystemMessageI18n getSystemMessageI18n(SystemMessage msg, ELanguage language)
    • saveSelected

      public void saveSelected()
      Save the currently selected message that is being edited; and closes the editing window by unselecting the message.
    • copy

      public void copy(SystemMessage message)
      Copies the given message.
    • copy

      public void copy()
      Copies the currently selected message.
    • getPlainSearchData

      public String getPlainSearchData(SystemMessage msg)
      Parameters:
      msg - Target message
      Returns:
      The data to be used for filtering for the given message. This is to be escaped for HTML.
    • getLanguagesForMessage

      public String getLanguagesForMessage(SystemMessage message)
      Parameters:
      message - Message to check
      Returns:
      HTML string with all languages for which the given message is shown at all (default text or custom translation).
    • getMessageTitle

      public String getMessageTitle(SystemMessage message, ELanguage previewLang)
    • getHtmlSearchData

      public String getHtmlSearchData(SystemMessage msg)
      Parameters:
      msg - Target message
      Returns:
      The data to be used for filtering the given message. This is an HTML string (the #SystemMessage.getMessage().