Class TranslationServiceImpl
java.lang.Object
org.flowable.common.engine.impl.service.CommonServiceImpl<PlatformEngineConfiguration>
org.flowable.common.engine.impl.service.CommonEngineServiceImpl<PlatformEngineConfiguration>
com.flowable.platform.engine.impl.translation.TranslationServiceImpl
- All Implemented Interfaces:
TranslationService
public class TranslationServiceImpl
extends org.flowable.common.engine.impl.service.CommonEngineServiceImpl<PlatformEngineConfiguration>
implements TranslationService
- Author:
- Filip Hrisafov
-
Field Summary
Fields inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl
commandExecutorFields inherited from class org.flowable.common.engine.impl.service.CommonServiceImpl
configuration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a new translation for the given scoped object.voidcreateTranslations(List<TranslationCreateRequest> requests) Batch-create new translations.voiddeleteByScopeIdAndScopeType(String scopeId, String scopeType) Delete translation values for the given scope id and scope type.voiddeleteByScopeIdsAndScopeType(Collection<String> scopeIds, String scopeType) Delete translation values for the given scope ids and scope type.findByScopeIdAndScopeType(String scopeId, String scopeType) Find all translations for the given scope id and scope type.Create or update a translation for the given scoped object.updateValue(String translationId, String value) Update the translation with the given valueMethods inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl
getCommandExecutor, setCommandExecutorMethods inherited from class org.flowable.common.engine.impl.service.CommonServiceImpl
getConfiguration
-
Constructor Details
-
TranslationServiceImpl
-
-
Method Details
-
createTranslationQuery
- Specified by:
createTranslationQueryin interfaceTranslationService
-
save
Description copied from interface:TranslationServiceCreate or update a translation for the given scoped object.- Specified by:
savein interfaceTranslationService- Parameters:
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 value- Returns:
- the created or updated translation
-
updateValue
Description copied from interface:TranslationServiceUpdate the translation with the given value- Specified by:
updateValuein interfaceTranslationService- Parameters:
translationId- the id of the translation that should be updatedvalue- the new value of the translation- Returns:
- The updated translation
-
findByScopeIdAndScopeType
Description copied from interface:TranslationServiceFind all translations for the given scope id and scope type.- Specified by:
findByScopeIdAndScopeTypein interfaceTranslationService- Parameters:
scopeId- the scope id for which to find translationsscopeType- the scope type for which to find translations- Returns:
- the translations for the given scope
-
deleteByScopeIdAndScopeType
Description copied from interface:TranslationServiceDelete translation values for the given scope id and scope type.- Specified by:
deleteByScopeIdAndScopeTypein interfaceTranslationService- Parameters:
scopeId- the scope id for which to find translationsscopeType- the scope type for which to find translations
-
deleteByScopeIdsAndScopeType
Description copied from interface:TranslationServiceDelete translation values for the given scope ids and scope type.- Specified by:
deleteByScopeIdsAndScopeTypein interfaceTranslationService- Parameters:
scopeIds- the scope ids for which to delete translationsscopeType- the scope type for which to delete translations
-
createTranslation
public Translation createTranslation(String scopeId, String scopeType, String key, String locale, String value) Description copied from interface:TranslationServiceCreate a new translation for the given scoped object. UnlikeTranslationService.save(String, String, String, String, String), this method does not check for existing translations and always creates a new entry. Use this when you know the translation does not exist yet.- Specified by:
createTranslationin interfaceTranslationService- Parameters:
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 value- Returns:
- the created translation
-
createTranslations
Description copied from interface:TranslationServiceBatch-create new translations. UnlikeTranslationService.save(String, String, String, String, String), this method does not check for existing translations and always creates new entries. All translations are processed in a single command for optimal performance.- Specified by:
createTranslationsin interfaceTranslationService- Parameters:
requests- the list of translations to create
-