public class TranslationServiceImpl extends CommonEngineServiceImpl<PlatformEngineConfiguration> implements TranslationService
commandExecutor
configuration
Constructor and Description |
---|
TranslationServiceImpl(PlatformEngineConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
TranslationQuery |
createTranslationQuery() |
void |
deleteByScopeIdAndScopeType(String scopeId,
String scopeType)
Delete translation values for the given scope id and scope type.
|
List<Translation> |
findByScopeIdAndScopeType(String scopeId,
String scopeType)
Find all translations for the given scope id and scope type.
|
Translation |
save(String scopeId,
String scopeType,
String key,
String locale,
String value)
Create or update a translation for the given scoped object.
|
Translation |
updateValue(String translationId,
String value)
Update the translation with the given value
|
getCommandExecutor, setCommandExecutor
getConfiguration
public TranslationServiceImpl(PlatformEngineConfiguration configuration)
public TranslationQuery createTranslationQuery()
createTranslationQuery
in interface TranslationService
public Translation save(String scopeId, String scopeType, String key, String locale, String value)
TranslationService
save
in interface TranslationService
scopeId
- the id of the scoped object for the translationscopeType
- the type of the scoped object for the translationkey
- the key of the translationlocale
- the locale of the translationvalue
- the translation valuepublic Translation updateValue(String translationId, String value)
TranslationService
updateValue
in interface TranslationService
translationId
- the id of the translation that should be updatedvalue
- the new value of the translationpublic List<Translation> findByScopeIdAndScopeType(String scopeId, String scopeType)
TranslationService
findByScopeIdAndScopeType
in interface TranslationService
scopeId
- the scope id for which to find translationsscopeType
- the scope type for which to find translationspublic void deleteByScopeIdAndScopeType(String scopeId, String scopeType)
TranslationService
deleteByScopeIdAndScopeType
in interface TranslationService
scopeId
- the scope id for which to find translationsscopeType
- the scope type for which to find translations