public interface LocalizedTextService
| Modifier and Type | Method and Description |
|---|---|
void |
deleteLocalizedText(LocalizedText text)
Deletes a LocalizedText item from the backing datastore.
|
void |
flagAsUsed(LocalizedText text)
Flags a text item as used, this will also call a method on the DAO to flag the item in the data store.
|
List<String> |
getApplications() |
List<String> |
getGroups(String application) |
Map<String,String> |
getLanguageMap(LocalizedTextSet localizedTextSet,
Language language)
Converts all LocalizedTexts in the provided language to a Map.
|
LocalizedText |
getLocalizedText(String application,
String group,
String label)
Gets a single LocalizedText item from the datastore.
|
List<LocalizedText> |
getLocalizedTextItems(String application,
String group)
Gets a list of all LocalizedText items for a given group.
|
LocalizedTextSet |
getLocalizedTextSet(String application,
String group)
Gets a
LocalizedTextSetImpl for a group of items. |
LocalizedText |
saveDefaultText(String application,
String group,
String label,
String defaultValue)
Creates a new text item with default values.
|
void |
saveLocalizedText(LocalizedText text)
Saves a LocalizedText item in the backing datastore.
|
List<LocalizedText> |
searchLocalizedTextItemsForText(String textToSearchFor)
Gets a list of all LocalizedText items containing a string.
|
LocalizedTextSet getLocalizedTextSet(String application, String group)
LocalizedTextSetImpl for a group of items.application - Application to get the group of items from.group - Name of the group.List<LocalizedText> getLocalizedTextItems(String application, String group)
application - Application to get the group of items from.group - Name of the group.List<LocalizedText> searchLocalizedTextItemsForText(String textToSearchFor)
textToSearchFor - String with the text to search for.void flagAsUsed(LocalizedText text)
text - Text item that should be flagged as used.LocalizedText saveDefaultText(String application, String group, String label, String defaultValue)
Creates a new text item with default values. This will also execute an insert call on the DAO. Note that no exceptions are being thrown in case saving fails.
application - Application in which to create the text item.group - Group the text item should belong to.label - Label of the text item.defaultValue - Default value to be set for the text.LocalizedText getLocalizedText(String application, String group, String label)
application - Application in which to find the text item.group - Group the text item belongs to.label - Label of the text item.void saveLocalizedText(LocalizedText text)
text - Text item to save.void deleteLocalizedText(LocalizedText text)
text - Text item to delete.List<String> getGroups(String application)
application - Name of an application.Map<String,String> getLanguageMap(LocalizedTextSet localizedTextSet, Language language)
Converts all LocalizedTexts in the provided language to a Map. The LocalizedTexts to be converted can be found in the given LocalizedTextSet.
localizedTextSet - The LocalizedTextSet to convert.language - The language specifying which LocalizedTexts should be converted.Copyright © 2017. All rights reserved.