@Component(value="blThresholdCacheTranslationOverrideStrategy") @Lazy public class ThresholdCacheTranslationOverrideStrategy extends Object implements TranslationOverrideStrategy
TranslationOverrideStrategy
. Should run last and will always return a result. Primarily supports multitenant
scenarios with the following characteristics:
TranslationSupport.getThresholdForFullCache()
and TranslationSupport.getTemplateThresholdForFullCache()
for more information on these properties and how to set their values.SparseTranslationOverrideStrategy
Modifier and Type | Field and Description |
---|---|
protected TranslationDao |
dao |
protected StatisticsService |
statisticsService |
protected TranslationSupport |
translationSupport |
Constructor and Description |
---|
ThresholdCacheTranslationOverrideStrategy() |
Modifier and Type | Method and Description |
---|---|
protected void |
buildSingleItemResponse(LocalePair response,
Translation translation) |
LocalePair |
getLocaleBasedOverride(String property,
TranslatedEntity entityType,
String entityId,
String localeCode,
String localeCountryCode,
String basicCacheKey)
Retrieve the standard site override translation, if applicable
|
LocalePair |
getLocaleBasedTemplateValue(String templateCacheKey,
String property,
TranslatedEntity entityType,
String entityId,
String localeCode,
String localeCountryCode,
String specificPropertyKey,
String generalPropertyKey)
Retrieve the template level translation, if applicable
|
int |
getOrder() |
boolean |
validateTemplateProcessing(String standardCacheKey,
String templateCacheKey)
Whether or not a template version should be searched for.
|
protected StatisticsService statisticsService
protected TranslationDao dao
@Autowired protected TranslationSupport translationSupport
public ThresholdCacheTranslationOverrideStrategy()
public LocalePair getLocaleBasedOverride(String property, TranslatedEntity entityType, String entityId, String localeCode, String localeCountryCode, String basicCacheKey)
TranslationOverrideStrategy
getLocaleBasedOverride
in interface TranslationOverrideStrategy
public LocalePair getLocaleBasedTemplateValue(String templateCacheKey, String property, TranslatedEntity entityType, String entityId, String localeCode, String localeCountryCode, String specificPropertyKey, String generalPropertyKey)
TranslationOverrideStrategy
getLocaleBasedTemplateValue
in interface TranslationOverrideStrategy
public boolean validateTemplateProcessing(String standardCacheKey, String templateCacheKey)
TranslationOverrideStrategy
validateTemplateProcessing
in interface TranslationOverrideStrategy
public int getOrder()
getOrder
in interface org.springframework.core.Ordered
protected void buildSingleItemResponse(LocalePair response, Translation translation)
Copyright © 2022. All rights reserved.