Package eu.c6.gibraltar.api.common
Interface ILabels
- All Superinterfaces:
Cloneable,ICObject,Serializable
- All Known Implementing Classes:
Labels
The Interface ILabels to manage localized labels.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe Constant FIELD_LABEL.static final StringThe Constant FIELD_LOCALE.static final StringThe Constant FIELD_VALUES.Fields inherited from interface eu.c6.gibraltar.api.common.ICObject
CHARSET, FIELD_SEPARATOR_DOT, FIELD_SEPARATOR_PATH -
Method Summary
Modifier and TypeMethodDescriptiongetLabelAsString(Locale locale) Gets the label as string representation.Gets the label locales.Gets the localized map values to have all localized labelsgetLocalizedMapValues(String defaultValue, Locale fallbackLocale) Gets the localized map values to have all localized labelsgetLocalizedValue(Locale locale) Gets the localized value for a locale.getLocalizedValue(Locale locale, String defValue) Gets the localized value for a locale.getLocalizedValue(Locale locale, String defValue, Locale fallbackLocale) Gets the localized value for a locale.booleanChecks for no label value.booleanhasNoLabelValue(Locale locale) Checks for no label value for a locale.voidremoveLabel(Locale locale) Removes the label for a locale.voidSets the label for a locale.voidsetLocalizedMapValue(Map<Locale, String> values) Sets the localized map values.Methods inherited from interface eu.c6.gibraltar.api.common.ICObject
addIntoList, addValueIntoList, clearList, clone, clone, clone, contains, containsField, equals, get, getBoolean, getBoolean, getDate, getDate, getDouble, getDouble, getFieldNames, getFieldNamesFlattenList, getFieldNamesList, getInputStream, getInt, getInt, getList, getListNestedObject, getListNestedObject, getListNestedObject, getListNestedObjectByAttribute, getListNestedObjectByAttribute, getListSize, getListString, getLocalDateTime, getLocalDateTime, getLong, getLong, getNestedObject, getNestedObject, getNestedObject, getNestedObjectNamesList, getOutputStream, getReader, getString, getString, insertIntoList, isBoolean, isDate, isDateList, isDouble, isEmpty, isFieldEmpty, isInt, isList, isNestedObject, isNestedObjectList, isString, load, load, merge, mergeDeep, remove, removeFromList, removeValueFromList, replaceIntoList, resetField, set, set, set, set, set, set, set, set, set, setList, setNull, textValue, toFlattenMapValues, toJson, toMap, toString, toString
-
Field Details
-
FIELD_VALUES
The Constant FIELD_VALUES.- See Also:
-
FIELD_LABEL
The Constant FIELD_LABEL.- See Also:
-
FIELD_LOCALE
The Constant FIELD_LOCALE.- See Also:
-
-
Method Details
-
getLocales
Gets the label locales.- Returns:
- the locales
-
getLocalizedMapValues
Gets the localized map values to have all localized labels- Returns:
- the localized map of label values
-
getLocalizedMapValues
Gets the localized map values to have all localized labels- Parameters:
defaultValue- the default value if label is NULL or emptyfallbackLocale- the fallback locale to use if label is empty or NULL- Returns:
- the localized map values
-
getLocalizedValue
Gets the localized value for a locale.- Parameters:
locale- the locale- Returns:
- the localized value
-
getLocalizedValue
Gets the localized value for a locale.- Parameters:
locale- the localedefValue- the default value if locale is not managed- Returns:
- the localized value
-
getLocalizedValue
Gets the localized value for a locale.- Parameters:
locale- the localedefValue- the default value if locale is not managed and default locale has not valuefallbackLocale- the fallback locale if locale is not managed- Returns:
- the localized value
-
setLocalizedMapValue
Sets the localized map values.- Parameters:
values- the values
-
setLabel
Sets the label for a locale.- Parameters:
locale- the localelabel- the label
-
getLabelAsString
Gets the label as string representation.- Parameters:
locale- the locale- Returns:
- the label as string
-
hasNoLabelValue
boolean hasNoLabelValue()Checks for no label value.- Returns:
- true, if one of the label is NULL or empty
-
hasNoLabelValue
Checks for no label value for a locale.- Parameters:
locale- the locale- Returns:
- true, if label of the locale is NULL or empty
-
removeLabel
Removes the label for a locale.- Parameters:
locale- the locale
-