@ThreadSafe public class EnumTextResolverWithPropertiesOverrideAndFallback extends AbstractEnumTextResolverWithOverrideAndFallback
DefaultTextResolver static class.| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_USE_RESOURCE_BUNDLE_CACHE
By default the resource bundle cache is used
|
static String |
PREFIX_FALLBACK
Default classpath prefix for fallback resources
|
static String |
PREFIX_OVERRIDE
Default classpath prefix for override resources
|
DEFAULT_CHECK_FOR_FALLBACK, DEFAULT_CHECK_FOR_OVERRIDE| Constructor and Description |
|---|
EnumTextResolverWithPropertiesOverrideAndFallback() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCache() |
Set<String> |
getAllUsedFallbackBundleNames() |
Set<String> |
getAllUsedOverrideBundleNames() |
protected String |
internalGetFallbackString(String sID,
Locale aContentLocale)
This method must return the fallback string for the passed parameters.
|
protected String |
internalGetOverrideString(String sID,
Locale aContentLocale)
This method must return the override string for the passed parameters.
|
boolean |
isUseResourceBundleCache() |
void |
setUseResourceBundleCache(boolean bUseResourceBundleCache)
Change whether the internal resource bundle cache should be used.
|
getText, getTextWithArgs, getTextWithArgs, internalGetText, isCheckForFallback, isCheckForOverride, setCheckForFallback, setCheckForOverridepublic static final String PREFIX_OVERRIDE
public static final String PREFIX_FALLBACK
public static final boolean DEFAULT_USE_RESOURCE_BUNDLE_CACHE
public EnumTextResolverWithPropertiesOverrideAndFallback()
public void setUseResourceBundleCache(boolean bUseResourceBundleCache)
bUseResourceBundleCache - The new value. Pass true to enable it.public boolean isUseResourceBundleCache()
true if the internal ResourceBundle cache
should be used. The default value is
DEFAULT_USE_RESOURCE_BUNDLE_CACHE.@Nullable protected String internalGetOverrideString(@Nonnull @PropertyKey String sID, @Nonnull Locale aContentLocale)
AbstractEnumTextResolverWithOverrideAndFallbackAbstractEnumTextResolverWithOverrideAndFallback.isCheckForOverride() is true
.internalGetOverrideString in class AbstractEnumTextResolverWithOverrideAndFallbacksID - Unique string IDaContentLocale - locale to use.null.@Nullable protected String internalGetFallbackString(@Nonnull @PropertyKey String sID, @Nonnull Locale aContentLocale)
AbstractEnumTextResolverWithOverrideAndFallbackAbstractEnumTextResolverWithOverrideAndFallback.isCheckForFallback() is true
.internalGetFallbackString in class AbstractEnumTextResolverWithOverrideAndFallbacksID - Unique string IDaContentLocale - locale to use.null.@Nonnull @ReturnsMutableCopy public Set<String> getAllUsedOverrideBundleNames()
null.@Nonnull @ReturnsMutableCopy public Set<String> getAllUsedFallbackBundleNames()
null.public void clearCache()
Copyright © 2014–2016 Philip Helger. All rights reserved.