@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)
TranslationOverrideStrategygetLocaleBasedOverride in interface TranslationOverrideStrategypublic LocalePair getLocaleBasedTemplateValue(String templateCacheKey, String property, TranslatedEntity entityType, String entityId, String localeCode, String localeCountryCode, String specificPropertyKey, String generalPropertyKey)
TranslationOverrideStrategygetLocaleBasedTemplateValue in interface TranslationOverrideStrategypublic boolean validateTemplateProcessing(String standardCacheKey, String templateCacheKey)
TranslationOverrideStrategyvalidateTemplateProcessing in interface TranslationOverrideStrategypublic int getOrder()
getOrder in interface org.springframework.core.Orderedprotected void buildSingleItemResponse(LocalePair response, Translation translation)
Copyright © 2019. All rights reserved.