Class SystemMessage

    • Constructor Detail

      • SystemMessage

        public SystemMessage()
    • Method Detail

      • getId

        public Long getId()
        Specified by:
        getId in interface de.xima.cmn.dao.interfaces.IEntity<Long>
      • getDateCreated

        public Date getDateCreated()
        Returns:
        The date when this entity was created.
      • getDateEdited

        public Date getDateEdited()
        Returns:
        The date of the most recent edit of this entity.
      • getDateEnd

        public Date getDateEnd()
        Returns:
        The latest date when this message is shown.
      • getDateStart

        public Date getDateStart()
        Returns:
        The earliest date when this message is shown.
      • getIcon

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

        public String getIconColor()
        Returns:
        The color of the icon. Must be a valid CSS color property value, eg. #333 or rgb(20, 80, 42).
      • getMessage

        public String getMessage()
        Returns:
        The main message that is shown on screen.
      • getName

        public String getName()
        Specified by:
        getName in interface INameProviding
        Returns:
        The title (heading, subject) of this message.
      • getUserCreator

        public IUser getUserCreator()
        Returns:
        The user who created this entity.
      • getUserEditor

        public IUser getUserEditor()
        Returns:
        The user who made the most recent edit to this entity.
      • getUserNameCreator

        public String getUserNameCreator()
        Returns:
        The name of the user that created this entity. If the user changed their username afterwards, this value will not change.
      • getUserNameEditor

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

        public String getUserRefCreator()
        Returns:
        A reference to the user who created this entity.
      • getUserRefEditor

        public String getUserRefEditor()
        Returns:
        A reference to the user who made the last change to this entity.
      • getUUID

        public String getUUID()
        Specified by:
        getUUID in interface IUUIDEntity
        Returns:
        UUID (Universal Unique Identifier) that identifies this type of entity. Usually is unique within a context, e.g. Mandant, Projekt, ...
      • isFlagActive

        public boolean isFlagActive()
        Returns:
        Whether this message is currently active, ie. shown to users.
      • setDateCreated

        public void setDateCreated​(Date dateCreated)
      • setDateEdited

        public void setDateEdited​(Date dateEdited)
      • setDateEnd

        public void setDateEnd​(Date dateEnd)
      • setDateStart

        public void setDateStart​(Date start)
      • setDescription

        public void setDescription​(String description)
      • setFlagActive

        public void setFlagActive​(boolean flagActive)
      • setIcon

        public void setIcon​(String icon)
      • setIconColor

        public void setIconColor​(String iconColor)
      • setMessage

        public void setMessage​(String message)
      • setName

        public void setName​(String title)
      • setUserCreator

        public void setUserCreator​(IUser userCreator)
      • setUserEditor

        public void setUserEditor​(IUser userEditor)
      • setUserNameCreator

        public void setUserNameCreator​(String userNameCreator)
      • setUserNameEditor

        public void setUserNameEditor​(String userNameEditor)
      • setUserRefCreator

        public void setUserRefCreator​(String userRefCreator)
      • setUserRefEditor

        public void setUserRefEditor​(String userRefEditor)
      • setUUIDObject

        public void setUUIDObject​(UUID uuid)
      • isAvailableFor

        public boolean isAvailableFor​(Locale locale)
        Parameters:
        locale - The language to check.
        Returns:
        Whether this message is available (should be displayed) for the given language.
        See Also:
        isHasI18nVersion(Locale)
      • isAvailableFor

        public boolean isAvailableFor​(ELanguage language)
        Parameters:
        language - The language to check.
        Returns:
        Whether this message is available (should be displayed) for the given language.
        See Also:
        isHasI18nVersion(ELanguage)
      • isAvailableFor

        public boolean isAvailableFor​(Date date)
        Parameters:
        date - Date to check. If null, 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.
      • getI18nName

        public String getI18nName​(Locale locale)
        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

        public String getI18nMessage​(Locale locale)
        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

        public String getI18nName​(ELanguage language)
        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

        public String getI18nMessage​(ELanguage language)
        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.