Package de.xima.fc.entities
Class ProjectPortalTag
- java.lang.Object
-
- de.xima.cmn.dao.model.AEntity<Long>
-
- de.xima.fc.entities.AbstractEntity
-
- de.xima.fc.entities.AbstractLockableEntity
-
- de.xima.fc.entities.ProjectPortalTag
-
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>
,de.xima.cmn.dao.interfaces.ILockableEntity<Long>
,ILocalizationProviding<ProjectPortalTag,ProjectPortalTagLocalization>
,ILockingVersionProviding
,ITransferable
,ITransferableEntity
,ITransferableLockableEntity
,IUUIDEntity
,Serializable
,Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>
@Entity public class ProjectPortalTag extends AbstractLockableEntity implements IUUIDEntity, ILocalizationProviding<ProjectPortalTag,ProjectPortalTagLocalization>
Entity model for end user 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_DEFAULT_LOCALE
JPA attribute name for thedefaultLocale
field.static String
ATTR_LOCALIZATIONS
JPA attribute name for thelocalizations
field.static String
ATTR_PROJECT_CONFIGS
JPA attribute name for theprojectConfigs
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_DEFAULT_LOCALE
Database column name for thegetDefaultLocale()
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.ITransferableEntity
IMPORT_ID, INVALID_ID
-
Fields inherited from interface de.xima.fc.entities.interfaces.IUUIDEntity
ATTR_UUID, COL_UUID, INVALID_UUID, INVALID_UUID_OBJECT, NULL_SAFE_UUID_TYPE, NULLABLE_UUID_TYPE, TYPE_NAME_UUID
-
-
Constructor Summary
Constructors Constructor Description ProjectPortalTag()
-
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.Locale
getDefaultLocale()
String
getDescription(Locale locale)
Gets the description of this tag in the given locale.String
getDisplayName(Locale locale)
Gets the display name of this tag in the given locale.Long
getId()
The unique database ID of this tag.List<ProjectPortalTagLocalization>
getLocalizations()
Gets all localization associated with this tag.Locale
getLocalizationsDefaultLocale()
Gets the default locale for this providing object.@NotEmpty Set<ProjectPortalConfig>
getProjectConfigs()
Gets the portalConfigs this tag is associated with.String
getUUID()
Gets the UUID (universal unique identifier) that uniquely identifies this type of entity.UUID
getUUIDObject()
Gets the UUID (universal unique identifier) that uniquely identifies this type of entity.ProjectPortalTagLocalization
newLocalization()
Creates a new localization object.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
setDefaultLocale(Locale defaultLocale)
void
setLocalizations(List<ProjectPortalTagLocalization> localizations)
Gets all localization associated with this tag.void
setProjectConfigs(@NotEmpty Set<ProjectPortalConfig> projectConfigs)
Sets the projects this tag is associated with.void
setUUID(String uuid)
Sets the UUID (universal unique identifier) that uniquely identifies this type of entity.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, 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
getKeys, getLocales, getLocalization, getLocalizationData, setLocalization
-
-
-
-
Field Detail
-
ATTR_PROJECT_CONFIGS
public static final String ATTR_PROJECT_CONFIGS
JPA attribute name for theprojectConfigs
field.- See Also:
- Constant Field Values
-
ATTR_LOCALIZATIONS
public static final String ATTR_LOCALIZATIONS
JPA attribute name for thelocalizations
field.- See Also:
- Constant Field Values
-
ATTR_DEFAULT_LOCALE
public static final String ATTR_DEFAULT_LOCALE
JPA attribute name for thedefaultLocale
field.- See Also:
- Constant Field Values
-
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
-
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_DEFAULT_LOCALE
public static final String COL_DEFAULT_LOCALE
Database column name for thegetDefaultLocale()
field.- See Also:
- Constant Field Values
-
-
Method Detail
-
getUUID
public String getUUID()
Description copied from interface:IUUIDEntity
Gets the UUID (universal unique identifier) that uniquely identifies this type of entity. Whether the UUID must be globally unique or only with within a context depends on the type of entity. Common contexts are for exampleclient scopes
orproject scope
.- Specified by:
getUUID
in interfaceIUUIDEntity
- Returns:
- The UUID of the entity.
-
setUUID
public void setUUID(String uuid)
Description copied from interface:IUUIDEntity
Sets the UUID (universal unique identifier) that uniquely identifies this type of entity. Whether the UUID must be globally unique or only with within a context depends on the type of entity. Common contexts are for exampleclient scopes
orproject scope
.- Specified by:
setUUID
in interfaceIUUIDEntity
- Parameters:
uuid
- The UUID of the entity.
-
getUUIDObject
public UUID getUUIDObject()
Description copied from interface:IUUIDEntity
Gets the UUID (universal unique identifier) that uniquely identifies this type of entity. Whether the UUID must be globally unique or only with within a context depends on the type of entity. Common contexts are for exampleclient scopes
orproject scope
.- Specified by:
getUUIDObject
in interfaceIUUIDEntity
- Returns:
- The UUID of the entity.
-
setUUIDObject
public void setUUIDObject(UUID uuid)
-
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.
-
getDefaultLocale
public Locale getDefaultLocale()
-
setDefaultLocale
public void setDefaultLocale(Locale defaultLocale)
-
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<ProjectPortalTagLocalization> 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<ProjectPortalTag,ProjectPortalTagLocalization>
- Returns:
- All localization associated with this tag.
-
setLocalizations
public void setLocalizations(List<ProjectPortalTagLocalization> 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.- Parameters:
localizations
- All localization associated with this tag.
-
getLocalizationsDefaultLocale
public Locale getLocalizationsDefaultLocale()
Description copied from interface:ILocalizationProviding
Gets the default locale for this providing object.- Specified by:
getLocalizationsDefaultLocale
in interfaceILocalizationProviding<ProjectPortalTag,ProjectPortalTagLocalization>
- Returns:
- the default locale for this providing object
-
getProjectConfigs
@NotEmpty public @NotEmpty Set<ProjectPortalConfig> getProjectConfigs()
Gets the portalConfigs this tag is associated with.- Returns:
- The portalConfigs this tag is associated with.
-
setProjectConfigs
public void setProjectConfigs(@NotEmpty @NotEmpty Set<ProjectPortalConfig> projectConfigs)
Sets the projects this tag is associated with.- Parameters:
projectConfigs
- The projects this tag is associated with.
-
getDescription
public String getDescription(Locale locale)
Gets the description 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 description for.- Returns:
- The description of this tag in the given locale.
-
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.
-
newLocalization
public ProjectPortalTagLocalization newLocalization()
Description copied from interface:ILocalizationProviding
Creates a new localization object.- Specified by:
newLocalization
in interfaceILocalizationProviding<ProjectPortalTag,ProjectPortalTagLocalization>
- Returns:
- a new localization object
-
-