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 String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from class de.xima.fc.entities.AbstractLockableEntity
COL_LOCKINGVERSION, lockingVersion
Fields inherited from class de.xima.fc.entities.AbstractEntity
COL_ID, id
Fields inherited from interface de.xima.fc.entities.interfaces.IDescriptionProviding
ATTR_BESCHREIBUNG, ATTR_DESCRIPTION, COL_DESCRIPTION
Fields inherited from interface de.xima.cmn.dao.interfaces.IEntity
ATTR_ID
Fields inherited from interface de.xima.cmn.dao.interfaces.ILockableEntity
ATTR_LOCKINGVERSION
Fields inherited from interface de.xima.fc.entities.interfaces.INameProviding
ATTR_NAME, COL_NAME
Fields inherited from interface de.xima.fc.entities.interfaces.ITransferableEntity
IMPORT_ID, INVALID_ID
Fields 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()
boolean
isAvailableFor
(ELanguage language) boolean
isAvailableFor
(Date date) boolean
isAvailableFor
(Locale locale) boolean
boolean
isHasI18nVersion
(ELanguage language) boolean
isHasI18nVersion
(Locale locale) void
setBeschreibung
(String beschreibung) Deprecated.void
setDateCreated
(Date dateCreated) void
setDateEdited
(Date dateEdited) void
setDateEnd
(Date dateEnd) void
setDateStart
(Date start) void
setDescription
(String description) void
setFlagActive
(boolean flagActive) void
setI18nValues
(Map<String, SystemMessageI18n> i18nValues) void
void
setIconColor
(String iconColor) void
!!!void
setMessage
(String message) void
void
setUserCreator
(IUser userCreator) void
setUserEditor
(IUser userEditor) void
setUserNameCreator
(String userNameCreator) void
setUserNameEditor
(String userNameEditor) void
setUserRefCreator
(String userRefCreator) void
setUserRefEditor
(String userRefEditor) void
void
setUUIDObject
(UUID uuid) Methods inherited from class de.xima.fc.entities.AbstractLockableEntity
entityHasChanged, getLockingVersion, setLockingVersion, toString
Methods inherited from class de.xima.fc.entities.AbstractEntity
asIntValue, isPersisted, setId
Methods inherited from class de.xima.cmn.dao.model.AEntity
compareTo, equals, getDBTableName, hashCode
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods 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:
getId
in interfacede.xima.cmn.dao.interfaces.IEntity<Long>
-
setId
Description copied from class:AbstractEntity
!!!WARNING: Currently values biggerInteger.MAX_VALUE
or lower thenInteger.MIN_VALUE
will be altered to null!!!- Specified by:
setId
in interfacede.xima.cmn.dao.interfaces.IEntity<Long>
- Overrides:
setId
in classAbstractEntity
- Parameters:
id
-Long
the database-id to set
-
getBeschreibung
- Specified by:
getBeschreibung
in 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:
getDescription
in 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.
#333
orrgb(20, 80, 42)
.
-
getMessage
- Returns:
- The main message that is shown on screen.
-
getName
- Specified by:
getName
in 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:
getUUID
in 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:
getUUIDObject
in 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:
setUUID
in 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:
true
iff a #SystemMessageI18n
exists for the given language.- See Also:
-
isHasI18nVersion
- Parameters:
language
- Language locale to check.- Returns:
true
iff a #SystemMessageI18n
exists for the given language.- See Also:
-
getI18n
- Parameters:
locale
- The desired language locale.- Returns:
- The #
SystemMessageI18n
for the given language. If none is available, a new #SystemMessageI18n
with the default values.
-
getI18n
- Parameters:
language
- The desired language.- Returns:
- The #
SystemMessageI18n
for the given language. If none is available, a new #SystemMessageI18n
with 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)
;