Interface TranslationSupport
- All Known Implementing Classes:
TranslationServiceImpl
public interface TranslationSupport
TranslationService
functionality, primarily in support of TranslationOverrideStrategy
instances.- Author:
- Jeff Fischer
-
Method Summary
Modifier and TypeMethodDescriptionfindBestTemplateTranslation
(String specificPropertyKey, String generalPropertyKey, Map<String, Map<String, Translation>> propertyTranslationMap, String entityId) Find the most appropriate translation in the map.getCache()
Retrieve the backing Cache instancegetCacheKey
(ResultType resultType, TranslatedEntity entityType) Build a cache keygetCacheKeyListForTemplateSite
(String propertyName) Returns a list of cacheKeys for a template siteint
Retrieve the threshold under which the full list of template catalog translations are cached.int
Retrieve the threshold under which the full list of standard site translation overrides are cached.lookupTranslationFromMap
(String key, Map<String, Map<String, StandardCacheItem>> propertyTranslationMap, String entityId) Retrieve a cached translation from an individual property translation map retrieved from the cache.void
setTemplateThresholdForFullCache
(int templateThresholdForFullCache) void
setThresholdForFullCache
(int thresholdForFullCache)
-
Method Details
-
lookupTranslationFromMap
StandardCacheItem lookupTranslationFromMap(String key, Map<String, Map<String, StandardCacheItem>> propertyTranslationMap, String entityId) Retrieve a cached translation from an individual property translation map retrieved from the cache.- Parameters:
key
-propertyTranslationMap
-entityId
-- Returns:
-
getCache
Retrieve the backing Cache instance- Returns:
-
getCacheKeyListForTemplateSite
Returns a list of cacheKeys for a template site- Parameters:
propertyName
-- Returns:
-
getThresholdForFullCache
int getThresholdForFullCache()Retrieve the threshold under which the full list of standard site translation overrides are cached. SeeTranslationServiceImpl.thresholdForFullCache
for more information on setting the value.- Returns:
-
setThresholdForFullCache
void setThresholdForFullCache(int thresholdForFullCache) -
getTemplateThresholdForFullCache
int getTemplateThresholdForFullCache()Retrieve the threshold under which the full list of template catalog translations are cached. SeeTranslationServiceImpl.templateThresholdForFullCache
for more information on setting the value.- Returns:
-
setTemplateThresholdForFullCache
void setTemplateThresholdForFullCache(int templateThresholdForFullCache) -
findBestTemplateTranslation
Translation findBestTemplateTranslation(String specificPropertyKey, String generalPropertyKey, Map<String, Map<String, Translation>> propertyTranslationMap, String entityId) Find the most appropriate translation in the map. The most specific qualified translation will win.- Parameters:
specificPropertyKey
-generalPropertyKey
-propertyTranslationMap
-entityId
-- Returns:
-
getCacheKey
Build a cache key- Parameters:
resultType
-entityType
-- Returns:
-