open class ResourceBundleThemeSource : HierarchicalThemeSource, BeanClassLoaderAware
ThemeSource implementation that looks up an individual java.util.ResourceBundle per theme. The theme name gets interpreted as ResourceBundle basename, supporting a common basename prefix for all themes.
Author
Jean-Pierre Pawlak
Author
Juergen Hoeller
See Also
#setBasenamePrefixjava.util.ResourceBundleorg.springframework.context.support.ResourceBundleMessageSource
ResourceBundleThemeSource()
ThemeSource implementation that looks up an individual java.util.ResourceBundle per theme. The theme name gets interpreted as ResourceBundle basename, supporting a common basename prefix for all themes. |
open fun getParentThemeSource(): ThemeSource |
|
open fun getTheme(themeName: String): Theme
This implementation returns a SimpleTheme instance, holding a ResourceBundle-based MessageSource whose basename corresponds to the given theme name (prefixed by the configured "basenamePrefix"). SimpleTheme instances are cached per theme name. Use a reloadable MessageSource if themes should reflect changes to the underlying files. |
|
open fun setBasenamePrefix(basenamePrefix: String): Unit
Set the prefix that gets applied to the ResourceBundle basenames, i.e. the theme names. E.g.: basenamePrefix="test.", themeName="theme" -> basename="test.theme". Note that ResourceBundle names are effectively classpath locations: As a consequence, the JDK's standard ResourceBundle treats dots as package separators. This means that "test.theme" is effectively equivalent to "test/theme", just like it is for programmatic |
|
open fun setBeanClassLoader(beanClassLoader: ClassLoader): Unit |
|
open fun setDefaultEncoding(defaultEncoding: String): Unit
Set the default charset to use for parsing resource bundle files. ResourceBundleMessageSource's default is the |
|
open fun setFallbackToSystemLocale(fallbackToSystemLocale: Boolean): Unit
Set whether to fall back to the system Locale if no files for a specific Locale have been found. ResourceBundleMessageSource's default is "true". |
|
open fun setParentThemeSource(parent: ThemeSource): Unit |