Package de.xima.fc.entities
Class SystemMessage
java.lang.Object
de.xima.cmn.dao.model.AEntity<Long>
de.xima.fc.entities.AbstractEntity
de.xima.fc.entities.AbstractLockableEntity
de.xima.fc.entities.SystemMessage
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>,de.xima.cmn.dao.interfaces.ILockableEntity<Long>,IDescriptionProviding,ILockingVersionProviding,INameProviding,ITransferable,ITransferableEntity,ITransferableLockableEntity,IUUIDEntity,Serializable,Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>
@Entity
public class SystemMessage
extends AbstractLockableEntity
implements IUUIDEntity, INameProviding, IDescriptionProviding
Entity for system messages. System messages can be configured arbitrarily by users or administrators and are shown on
the dashboard.
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class de.xima.fc.entities.AbstractLockableEntity
COL_LOCKINGVERSION, lockingVersionFields inherited from class de.xima.fc.entities.AbstractEntity
COL_ID, idFields inherited from interface de.xima.fc.entities.interfaces.IDescriptionProviding
ATTR_BESCHREIBUNG, ATTR_DESCRIPTION, COL_DESCRIPTIONFields inherited from interface de.xima.cmn.dao.interfaces.IEntity
ATTR_IDFields inherited from interface de.xima.cmn.dao.interfaces.ILockableEntity
ATTR_LOCKINGVERSIONFields inherited from interface de.xima.fc.entities.interfaces.INameProviding
ATTR_NAME, COL_NAMEFields inherited from interface de.xima.fc.entities.interfaces.ITransferableEntity
IMPORT_ID, INVALID_IDFields inherited from interface de.xima.fc.entities.interfaces.IUUIDEntity
ATTR_UUID, INVALID_UUID, INVALID_UUID_OBJECT, NULL_SAFE_UUID_TYPE, TYPE_NAME_UUID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetI18nMessage(ELanguage language) getI18nMessage(Locale locale) getI18nName(ELanguage language) getI18nName(Locale locale) getIcon()getId()getName()getUUID()booleanisAvailableFor(ELanguage language) booleanisAvailableFor(Date date) booleanisAvailableFor(Locale locale) booleanbooleanisHasI18nVersion(ELanguage language) booleanisHasI18nVersion(Locale locale) voidsetBeschreibung(String beschreibung) Deprecated.voidsetDateCreated(Date dateCreated) voidsetDateEdited(Date dateEdited) voidsetDateEnd(Date dateEnd) voidsetDateStart(Date start) voidsetDescription(String description) voidsetFlagActive(boolean flagActive) voidsetI18nValues(Map<String, SystemMessageI18n> i18nValues) voidvoidsetIconColor(String iconColor) void!!!voidsetMessage(String message) voidvoidsetUserCreator(IUser userCreator) voidsetUserEditor(IUser userEditor) voidsetUserNameCreator(String userNameCreator) voidsetUserNameEditor(String userNameEditor) voidsetUserRefCreator(String userRefCreator) voidsetUserRefEditor(String userRefEditor) voidvoidsetUUIDObject(UUID uuid) Methods inherited from class de.xima.fc.entities.AbstractLockableEntity
entityHasChanged, getLockingVersion, setLockingVersion, toStringMethods inherited from class de.xima.fc.entities.AbstractEntity
asIntValue, isPersisted, setIdMethods inherited from class de.xima.cmn.dao.model.AEntity
compareTo, equals, getDBTableName, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface de.xima.cmn.dao.interfaces.IEntity
isPersisted
-
Field Details
-
ATTR_DATE_CREATED
- See Also:
-
ATTR_DATE_EDITED
- See Also:
-
ATTR_DATE_END
- See Also:
-
ATTR_DATE_START
- See Also:
-
ATTR_I18N_VALUES
- See Also:
-
ATTR_ICON
- See Also:
-
ATTR_ICON_COLOR
- See Also:
-
ATTR_FLAG_ACTIVE
- See Also:
-
ATTR_MESSAGE
- See Also:
-
ATTR_USER_NAME_CREATOR
- See Also:
-
ATTR_USER_NAME_EDITOR
- See Also:
-
ATTR_USER_REF_CREATOR
- See Also:
-
ATTR_USER_REF_EDITOR
- See Also:
-
COL_UUID
- See Also:
-
-
Constructor Details
-
SystemMessage
public SystemMessage()
-
-
Method Details
-
getId
- Specified by:
getIdin interfacede.xima.cmn.dao.interfaces.IEntity<Long>
-
setId
Description copied from class:AbstractEntity!!!WARNING: Currently values biggerInteger.MAX_VALUEor lower thenInteger.MIN_VALUEwill be altered to null!!!- Specified by:
setIdin interfacede.xima.cmn.dao.interfaces.IEntity<Long>- Overrides:
setIdin classAbstractEntity- Parameters:
id-Longthe database-id to set
-
getBeschreibung
- Specified by:
getBeschreibungin interfaceIDescriptionProviding- Returns:
- An internal description or comment that is shown in the backend.
-
getDateCreated
- Returns:
- The date when this entity was created.
-
getDateEdited
- Returns:
- The date of the most recent edit of this entity.
-
getDateEnd
- Returns:
- The latest date when this message is shown.
-
getDateStart
- Returns:
- The earliest date when this message is shown.
-
getDescription
- Specified by:
getDescriptionin interfaceIDescriptionProviding- Returns:
- A human-readable description for this object.
-
getIcon
- Returns:
- An icon that is shown for this message. This is currently the ID of an icon from the formcycle custom
font, eg.
ico-fc-lan-connect.
-
getIconColor
- Returns:
- The color of the icon. Must be a valid CSS color property value, eg.
#333orrgb(20, 80, 42).
-
getMessage
- Returns:
- The main message that is shown on screen.
-
getName
- Specified by:
getNamein interfaceINameProviding- Returns:
- The title (heading, subject) of this message.
-
getUserCreator
- Returns:
- The user who created this entity.
-
getUserEditor
- Returns:
- The user who made the most recent edit to this entity.
-
getUserNameCreator
- Returns:
- The name of the user that created this entity. If the user changed their username afterwards, this value will not change.
-
getUserNameEditor
- Returns:
- The name of the user that made the last change to this entity. If the user changed their username afterwards, this value will not change.
-
getUserRefCreator
- Returns:
- A reference to the user who created this entity.
-
getUserRefEditor
- Returns:
- A reference to the user who made the last change to this entity.
-
getUUID
- Specified by:
getUUIDin interfaceIUUIDEntity- Returns:
- UUID (Universal Unique Identifier) that identifies this type of entity. Usually is unique within a
context, e.g.
Mandant,Projekt, ...
-
getUUIDObject
- Specified by:
getUUIDObjectin interfaceIUUIDEntity
-
isFlagActive
public boolean isFlagActive()- Returns:
- Whether this message is currently active, ie. shown to users.
-
setBeschreibung
Deprecated. -
setDateCreated
-
setDateEdited
-
setDateEnd
-
setDateStart
-
setDescription
-
setFlagActive
public void setFlagActive(boolean flagActive) -
setIcon
-
setIconColor
-
setMessage
-
setName
-
setUserCreator
-
setUserEditor
-
setUserNameCreator
-
setUserNameEditor
-
setUserRefCreator
-
setUserRefEditor
-
setUUID
- Specified by:
setUUIDin interfaceIUUIDEntity
-
setUUIDObject
-
getI18nValues
-
setI18nValues
-
isAvailableFor
- Parameters:
locale- The language to check.- Returns:
- Whether this message is available (should be displayed) for the given language.
- See Also:
-
isAvailableFor
- Parameters:
language- The language to check.- Returns:
- Whether this message is available (should be displayed) for the given language.
- See Also:
-
isAvailableFor
- Parameters:
date- Date to check. Ifnull, take the current date.- Returns:
- Whether this message is available (should be displayed) at the given date. This means that the message must be set to active, and the given date must be between the start and end date (inclusive). If not start or end date is set, no lower or upper limit is applied, respectively.
-
isHasI18nVersion
- Parameters:
locale- Locale to check.- Returns:
trueiff a #SystemMessageI18nexists for the given language.- See Also:
-
isHasI18nVersion
- Parameters:
language- Language locale to check.- Returns:
trueiff a #SystemMessageI18nexists for the given language.- See Also:
-
getI18n
- Parameters:
locale- The desired language locale.- Returns:
- The #
SystemMessageI18nfor the given language. If none is available, a new #SystemMessageI18nwith the default values.
-
getI18n
- Parameters:
language- The desired language.- Returns:
- The #
SystemMessageI18nfor the given language. If none is available, a new #SystemMessageI18nwith the default values.
-
getI18nName
- Parameters:
locale- The desired language locale.- Returns:
- The
getName()of this message, for the given language. Resolves according to #SystemMessageI18n.getI18nSource(). If no translation could be determined, returns the empty string.
-
getI18nMessage
- Parameters:
locale- The desired language locale.- Returns:
- The
getName()of this message, for the given language. Resolves according to #SystemMessageI18n.getI18nSource(). If no translation could be determined, returns the empty string.
-
getI18nName
- Parameters:
language- The desired language.- Returns:
- The
getName()of this message, for the given language. Resolves according to #SystemMessageI18n.getI18nSource(). If no translation could be determined, returns the empty string.
-
getI18nMessage
- Parameters:
language- The desired language.- Returns:
- The
getName()of this message, for the given language. Resolves according to #SystemMessageI18n.getI18nSource(). If no translation could be determined, returns the empty string.
-
setDescription(String);