Package de.xima.fc.gui.bean.settings
Class SystemMessagesBean
-
- All Implemented Interfaces:
Serializable
@Named @ViewScoped public class SystemMessagesBean extends FCContextBean implements Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
SystemMessagesBean.EntityListModelImpl
-
Nested classes/interfaces inherited from class de.xima.fc.gui.common.utils.msg.AJSFContext
AJSFContext.RedirectOptions, AJSFContext.RedirectOptionsBuilder
-
-
Field Summary
-
Fields inherited from class de.xima.fc.gui.bean.FCContextBean
systemUC
-
-
Constructor Summary
Constructors Constructor Description SystemMessagesBean()
-
Method Summary
-
Methods inherited from class de.xima.fc.gui.bean.FCContextBean
getNavigationBean, getSessionBean, isSetupUser, redirectToDashboard, setNavigationBean, setSessionBean, switchMainView, switchMainView, switchSubView, switchSubView
-
Methods inherited from class de.xima.fc.gui.bean.ABackendJSFContext
ec, findEntityContext, isDetached, isHasDB
-
Methods inherited from class de.xima.fc.gui.common.utils.msg.AJSFContext
destroySessionBean, encodeURL, findBean, findBean, findBean, findBean, findBean, findBean, findBean, findCurrentView, findUserContext, getBeanName, getBeanName, getContext, getCurrentViewBean, getRequest, getResponse, getSession, getSession, getSessionAttribute, isMasterServerContext, loadLazy, redirect, redirect, redirect, redirect, redirectToDashboard, redirectToDashboard, redirectToDashboard, setSessionAttribute, uc
-
Methods inherited from class de.xima.fc.gui.common.utils.msg.MessageUtils
addErrorMsg, addErrorMsg, addErrorMsg, addErrorMsg, addErrorMsg, addErrorMsg, addErrorMsgFromString, addErrorMsgFromString, addErrorMsgToComponent, addErrorMsgToComponent, addErrorMsgToComponent, addErrorMsgToComponent, addErrorMsgToComponent, addErrorMsgToComponent, addInfoMsg, addInfoMsg, addInfoMsg, addInfoMsg, addInfoMsgFromString, addInfoMsgFromString, addInfoMsgToComponent, addInfoMsgToComponent, addInfoMsgToComponent, addInfoMsgToComponent, addMsg, addMsg, addMsg, addMsg, addMsgs, addMsgs, addMsgToComponent, addMsgToComponent, addWarnMsg, addWarnMsg, addWarnMsg, addWarnMsg, addWarnMsgFromString, addWarnMsgFromString, addWarnMsgToComponent, addWarnMsgToComponent, addWarnMsgToComponent, addWarnMsgToComponent, cleanErrorMsg, errorMsg, errorMsg, getErrorMessage, getNewErrorMsg, getNewErrorMsg, getNewErrorMsg, getNewInfoMsg, getNewInfoMsg, getNewMsg, getNewWarnMsg, getNewWarnMsg, msg
-
-
-
-
Method Detail
-
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 classAJSFContext
-
setLocaleBean
public void setLocaleBean(LocaleBean localeBean)
- Overrides:
setLocaleBean
in classAJSFContext
-
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 includenull
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()
.
-
-