|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ResourceFinder
An interface to localized resource finders. A resource finder searches first for localized property files from the resource folders and the classpath in the following order:
'lang'_'country'_'variant' _'counry'_'variant' 'lang'__'variant' __'variant' 'lang'_'country' _'country' 'lang'If no resources are found, it applies the search mechanism of java.util.ResourceBundle.
| Method Summary | |
|---|---|
long |
getCacheCleared()
Gets the timestamp of the last cache clearing or expiration. |
String |
getDefaultBaseName()
Gets the default base name to be applied when an explicit one is not specified. |
String |
getDefaultEncoding()
Gets the encoding to use for property files. |
Locale |
getDefaultLocale()
Gets the default locale of resources. |
String |
getPlugInBaseName(String key)
Gets the base name of the resource bundle class associated with the specified plug-in key. |
String |
getPlugInKey()
Gets the default key for pluggable resource bundles of this resource finder. |
String |
getPlugInKey(Class baseClass)
Gets the most specific key for pluggable resource bundles of this resource finder. |
String |
getPlugInKey(String baseName)
Gets the class specific key for pluggable resource bundles of this resource finder. |
LookupResourceBundle |
getResourceBundle()
Gets the default resource bundle for the default base name. |
LookupResourceBundle |
getResourceBundle(Locale locale)
Gets the default resource bundle for the default base name and the specified locale. |
LookupResourceBundle |
getResourceBundle(String baseName)
Gets the appropriate resource bundle for the given base name. |
LookupResourceBundle |
getResourceBundle(String baseName,
Locale locale)
Gets the appropriate resource bundle for the given base name and specified locale. |
LookupResourceBundle |
getResourceBundle(String baseName,
Locale locale,
ClassLoader loader)
Gets the appropriate resource bundle for the given base name, specified locale and class loader. |
LookupResourceBundle |
getResourceBundle(String baseName,
Locale locale,
String variant)
Gets the appropriate resource bundle for the given base name, specified locale and optional variant. |
LookupResourceBundle |
getResourceBundle(String baseName,
Locale locale,
String variant,
ClassLoader loader)
Gets the appropriate resource bundle for the given base name, specified locale, optional variant and class loader. |
long |
getResourceCheckInterval()
Gets the default interval for checking validity of cached resource bundles of this resource finder. |
long |
getResourceCheckInterval(Class baseClass)
Gets the most specific interval for checking validity of cached resource bundles of this resource finder. |
long |
getResourceCheckInterval(String className)
Gets the class specific interval for checking validity of cached resource bundles of this resource finder. |
String |
getResourceKey()
Gets the path finder key for resolving resource paths. |
void |
setDefaultBaseName(String baseName)
Sets the default base name to be applied when an explicit one is not specified. |
void |
setDefaultEncoding(String encoding)
Sets the encoding to use for property files. |
void |
setDefaultLocale(Locale locale)
Sets the default locale of resources. |
void |
setPlugInKey(String key)
Sets the default key for pluggable resource bundles of this resource finder. |
void |
setPlugInKey(String baseName,
String key)
Sets the default key for pluggable resource bundles of this resource finder. |
void |
setResourceCheckInterval(long msecs)
Sets the default interval for checking validity of cached resource bundles of this resource finder. |
void |
setResourceCheckInterval(String className,
long msecs)
Sets the class specific interval of checking validity of cached resource bundles of this resource finder. |
void |
setResourceKey(String key)
Sets the path finder key for resolving resource paths. |
| Methods inherited from interface org.norther.tammi.core.cache.CacheClient |
|---|
clearCached, expireCached, expireFraction, getCache, isCachingDisabled, removeCache, setCachingDisabled |
| Methods inherited from interface org.norther.tammi.core.base.Refreshable |
|---|
getRefreshed, refresh |
| Method Detail |
|---|
String getDefaultBaseName()
void setDefaultBaseName(String baseName)
baseName - the default base name.Locale getDefaultLocale()
void setDefaultLocale(Locale locale)
locale - the default locale.String getDefaultEncoding()
void setDefaultEncoding(String encoding)
encoding - the encoding for property files.String getResourceKey()
void setResourceKey(String key)
key - the path finder key.String getPlugInKey()
void setPlugInKey(String key)
key - the plug-in key.String getPlugInKey(String baseName)
baseName - the base name of the resource bundle class.
void setPlugInKey(String baseName,
String key)
baseName - the base name of the resource bundle class.key - the plug-in key.String getPlugInKey(Class baseClass)
baseClass - the base class of the resource bundle.
String getPlugInBaseName(String key)
Note that if there are several base names associated with the same key, an arbitrary one of the alternatives is returned.
key - the plug-in key.
long getResourceCheckInterval()
void setResourceCheckInterval(long msecs)
msecs - the check interval in milliseconds (-1 = only once).long getResourceCheckInterval(String className)
className - the base name of the resource bundle class.
long getResourceCheckInterval(Class baseClass)
baseClass - the base class of the resource bundle.
void setResourceCheckInterval(String className,
long msecs)
className - the base name of the resource bundle class.msecs - the check interval in milliseconds (-1 = only once).LookupResourceBundle getResourceBundle()
LookupResourceBundle getResourceBundle(Locale locale)
locale - the locale to apply.
LookupResourceBundle getResourceBundle(String baseName)
baseName - the base name of the resource bundle.
LookupResourceBundle getResourceBundle(String baseName,
Locale locale)
baseName - the base name of the resource bundle.locale - the locale to apply.
LookupResourceBundle getResourceBundle(String baseName,
Locale locale,
String variant)
baseName - the base name of the resource bundle.locale - the locale to apply.variant - an optional variant.
LookupResourceBundle getResourceBundle(String baseName,
Locale locale,
ClassLoader loader)
baseName - the base name of the resource bundle.locale - the locale to apply.loader - the class loader to load the resource from.
LookupResourceBundle getResourceBundle(String baseName,
Locale locale,
String variant,
ClassLoader loader)
baseName - the base name of the resource bundle.locale - the locale to apply.variant - an optional variant.loader - the class loader to load the resource from.
long getCacheCleared()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||