Package de.xima.fc.entities
Class UserPortalTag
- java.lang.Object
-
- de.xima.cmn.dao.model.AEntity<Long>
-
- de.xima.fc.entities.AbstractEntity
-
- de.xima.fc.entities.AbstractLockableEntity
-
- de.xima.fc.entities.UserPortalTag
-
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>
,de.xima.cmn.dao.interfaces.ILockableEntity<Long>
,ILocalizationProviding<UserPortalTag,UserPortalTagLocalization>
,ILockingVersionProviding
,ITransferable
,ITransferableEntity
,ITransferableLockableEntity
,Serializable
,Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>
@Entity public class UserPortalTag extends AbstractLockableEntity implements ILocalizationProviding<UserPortalTag,UserPortalTagLocalization>
Entity model for user portal tags. user portals tags are manged portal-wide and may be assigned to forms.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
ATTR_COLOR_BACKGROUND
JPA attribute name for thegetColorBackground()
field.static String
ATTR_COLOR_TEXT
JPA attribute name for thegetColorText()
field.static String
ATTR_PORTAL
JPA attribute name for thegetPortal()
field.static String
COL_COLOR_BACKGROUND
Database column name for thegetColorBackground()
field.static String
COL_COLOR_TEXT
Database column name for thegetColorText()
field.static String
COL_PORTAL_ID
Database column name for thegetPortal()
field.-
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.i18n.ILocalizationProviding
ATTR_LOCALIZATIONS
-
Fields inherited from interface de.xima.fc.entities.interfaces.ITransferableEntity
IMPORT_ID, INVALID_ID
-
-
Constructor Summary
Constructors Constructor Description UserPortalTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RgbaQuadruplet
getColorBackground()
Gets the background color of this tag, used when the tag is displayed in the UI.RgbaQuadruplet
getColorText()
Gets the text color of this tag, used when the tag is displayed in the UI.String
getDisplayName(Locale locale)
Gets the display name of this tag in the given locale.Locale
getFallbackLocale()
Gets the fallback locale to use when no localization is available for a given locale.Long
getId()
The unique database ID of this tag.List<UserPortalTagLocalization>
getLocalizations()
Gets all localization associated with this tag.UserPortal
getPortal()
Gets the portal to which this tag belongs.Set<ProjectPortalConfig>
getProjectPortalConfigs()
A list offorms
that have this tag assigned to them.void
setColorBackground(RgbaQuadruplet colorBackground)
Sets the background color of this tag, used when the tag is displayed in the UI.void
setColorText(RgbaQuadruplet colorText)
Sets the text color of this tag, used when the tag is displayed in the UI.void
setLocalizations(List<UserPortalTagLocalization> localizations)
Gets all localization associated with this tag.void
setPortal(UserPortal portal)
Sets the portal to which this tag belongs.void
setProjectPortalConfigs(Set<ProjectPortalConfig> projectPortalConfigs)
A list offorms
that have this tag assigned to them.-
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, 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.fc.entities.interfaces.i18n.ILocalizationProviding
getI18nNames, getLocalization, getLocalization, getLocalizationObject, getLocalizationObject, getLocalizationsByI18nName, getLocalizationsByI18nName, getLocalizationsByI18nName, getLocalizationsByI18nName, getLocalizationsByLocale, getLocalizationsByLocale, getLocalizationsForLocale, getLocalizationsForLocale
-
-
-
-
Field Detail
-
ATTR_COLOR_BACKGROUND
public static final String ATTR_COLOR_BACKGROUND
JPA attribute name for thegetColorBackground()
field.- See Also:
- Constant Field Values
-
ATTR_COLOR_TEXT
public static final String ATTR_COLOR_TEXT
JPA attribute name for thegetColorText()
field.- See Also:
- Constant Field Values
-
ATTR_PORTAL
public static final String ATTR_PORTAL
JPA attribute name for thegetPortal()
field.- See Also:
- Constant Field Values
-
COL_COLOR_BACKGROUND
public static final String COL_COLOR_BACKGROUND
Database column name for thegetColorBackground()
field.- See Also:
- Constant Field Values
-
COL_COLOR_TEXT
public static final String COL_COLOR_TEXT
Database column name for thegetColorText()
field.- See Also:
- Constant Field Values
-
COL_PORTAL_ID
public static final String COL_PORTAL_ID
Database column name for thegetPortal()
field.- See Also:
- Constant Field Values
-
-
Method Detail
-
getColorBackground
public RgbaQuadruplet getColorBackground()
Gets the background color of this tag, used when the tag is displayed in the UI.- Returns:
- The color of this tag.
-
setColorBackground
public void setColorBackground(RgbaQuadruplet colorBackground)
Sets the background color of this tag, used when the tag is displayed in the UI.- Parameters:
colorBackground
- The color of this tag.
-
getColorText
public RgbaQuadruplet getColorText()
Gets the text color of this tag, used when the tag is displayed in the UI.- Returns:
- The text color of this tag.
-
setColorText
public void setColorText(RgbaQuadruplet colorText)
Sets the text color of this tag, used when the tag is displayed in the UI.- Parameters:
colorText
- The text color of this tag.
-
getDisplayName
public String getDisplayName(Locale locale)
Gets the display name of this tag in the given locale. Falls back to the default locale when no localization is available for the given locale.- Parameters:
locale
- The locale to get the display name for.- Returns:
- The display name of this tag in the given locale.
-
getFallbackLocale
public Locale getFallbackLocale()
Gets the fallback locale to use when no localization is available for a given locale.- Specified by:
getFallbackLocale
in interfaceILocalizationProviding<UserPortalTag,UserPortalTagLocalization>
- Returns:
- The fallback locale.
-
getId
public Long getId()
The unique database ID of this tag. Used internally, should not be made available to users.- Specified by:
getId
in interfacede.xima.cmn.dao.interfaces.IEntity<Long>
- Returns:
- The unique database ID of this tag.
-
getLocalizations
public List<UserPortalTagLocalization> getLocalizations()
Gets all localization associated with this tag. A tag may contain a localized message for each message key and locale. There are some pre-defined message keys that are used by the system, such as the display name of the tag, but custom message keys may be used as well.- Specified by:
getLocalizations
in interfaceILocalizationProviding<UserPortalTag,UserPortalTagLocalization>
- Returns:
- All localization associated with this tag.
-
setLocalizations
public void setLocalizations(List<UserPortalTagLocalization> localizations)
Gets all localization associated with this tag. A tag may contain a localized message for each message key and locale. There are some pre-defined message keys that are used by the system, such as the display name of the tag, but custom message keys may be used as well.- Specified by:
setLocalizations
in interfaceILocalizationProviding<UserPortalTag,UserPortalTagLocalization>
- Parameters:
localizations
- All localization associated with this tag.
-
getPortal
public UserPortal getPortal()
Gets the portal to which this tag belongs. Each tag belongs to exactly one portal, but a portal may have many tags. A portal's tags should be considered a tag pool. Eachform
may have multiple tags assigned to it, taken from this tag pool.- Returns:
- The portal to which this tag belongs.
-
setPortal
public void setPortal(UserPortal portal)
Sets the portal to which this tag belongs. Each tag belongs to exactly one portal, but a portal may have many tags. A portal's tags should be considered a tag pool. Eachform
may have multiple tags assigned to it, taken from this tag pool.- Parameters:
portal
- The portal to which this tag belongs.
-
getProjectPortalConfigs
public Set<ProjectPortalConfig> getProjectPortalConfigs()
A list offorms
that have this tag assigned to them. Each tag belongs to exactly one portal, but a portal may have many tags. A portal's tags should be considered a tag pool. Eachform
may have multiple tags assigned to it, taken from this tag pool.- Returns:
- A list of forms that have this tag assigned to them.
-
setProjectPortalConfigs
public void setProjectPortalConfigs(Set<ProjectPortalConfig> projectPortalConfigs)
A list offorms
that have this tag assigned to them. Each tag belongs to exactly one portal, but a portal may have many tags. A portal's tags should be considered a tag pool. Eachform
may have multiple tags assigned to it, taken from this tag pool.- Parameters:
projectPortalConfigs
- A list of forms that have this tag assigned to them.
-
-