public interface TranslationService
| Modifier and Type | Method and Description |
|---|---|
void |
deleteTranslationById(Long translationId)
Deletes the given translations
|
Translation |
findTranslationById(Long id) |
String |
getTranslatedValue(Object entity,
String property,
Locale locale)
Returns the translated value of the property for the given entity.
|
Translation |
getTranslation(TranslatedEntity entity,
String entityId,
String fieldName,
String localeCode)
Attempts to find the translation object for the given parameters
|
List<Translation> |
getTranslations(String ceilingEntityClassname,
String entityId,
String property)
Finds all current translations for the specified field
|
Translation |
save(String entityType,
String entityId,
String fieldName,
String localeCode,
String translatedValue)
Creates a new translation object for the requested parameters, saves it, and returns the saved instance.
|
Translation |
save(Translation translation)
Persists the given translation
|
Translation |
update(Long translationId,
String localeCode,
String translatedValue)
Updates the given translation id with the new locale code and translated value
|
Translation save(Translation translation)
translation - Translation save(String entityType, String entityId, String fieldName, String localeCode, String translatedValue)
entityType - entityId - fieldName - localeCode - translatedValue - Translation update(Long translationId, String localeCode, String translatedValue)
translationId - localeCode - translatedValue - void deleteTranslationById(Long translationId)
translationId - List<Translation> getTranslations(String ceilingEntityClassname, String entityId, String property)
ceilingEntityClassname - entityId - property - Translation getTranslation(TranslatedEntity entity, String entityId, String fieldName, String localeCode)
entity - entityId - fieldName - localeCode - String getTranslatedValue(Object entity, String property, Locale locale)
entity - property - locale - Translation findTranslationById(Long id)
Copyright © 2014. All rights reserved.