public interface LocalizedTextSet
LocalizedTextSet is a collection of LocalizedText instances scoped to a particular group. It is a special structure to be used for:
A LocalizedTextSet is hooked to a LocalizedTextService that should provide the actual implementation of the LocalizedText backend. Things like creating default values, saving in database, etc.
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists(String label) |
String |
getApplication() |
String |
getGroup() |
Collection<LocalizedText> |
getItems() |
String |
getText(String label,
Language language)
Returns the value for a specific language of a text item.
|
String |
getText(String label,
Language language,
String defaultValue)
Returns the value for a specific language of a text item.
|
String |
getText(String label,
Language language,
String defaultValue,
boolean storeDefault)
Returns the value for a specific language of a text item.
|
void |
reload()
Reloads all items in this set from the backing data store.
|
int |
size() |
String getApplication()
String getGroup()
Collection<LocalizedText> getItems()
String getText(String label, Language language)
LocalizedText), this method will trigger a
flagAsUsed call on the LocalizedTextService provided.label - Label of the text item.language - Language for which we want the value.String getText(String label, Language language, String defaultValue)
LocalizedText), this method will trigger a
flagAsUsed call on the LocalizedTextService provided.label - Label of the text item.language - Language for which we want the value.defaultValue - Value to return in case the text item does not yet exist.String getText(String label, Language language, String defaultValue, boolean storeDefault)
LocalizedText), this method will trigger a
flagAsUsed call on the LocalizedTextService provided.label - Label of the text item.language - Language for which we want the value.defaultValue - Value to return in case the text item does not yet exist.storeDefault - Whether the default value should be stored when not foundboolean exists(String label)
label - Label of the item to search for.int size()
void reload()
Copyright © 2017. All rights reserved.