Deprecated
since 6.0.
as of 6.0 in favor of using CSS, without direct replacement
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.
setBasenamePrefix, java.util.ResourceBundle , org.springframework.context.support.ResourceBundleMessageSource
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private ClassLoader | |
| private String | |
| private Boolean | |
| protected final Log | |
| private ThemeSource | parentThemeSource
Deprecated
as a consequence of
ThemeSource being deprecated.
|
| private final Map | themeCache
Map from theme name to Theme instance. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected MessageSource | Returns: the MessageSourcethe basename to create a MessageSource for basename)Create a MessageSource for the given basename, to be used as MessageSource for the corresponding theme. |
| public ThemeSource | getParentThemeSource()
Implements org.
Deprecated
as a consequence of
Return the parent of this ThemeSource, or ThemeSource being deprecated.
null if none.
|
| public Theme | getTheme(String
the name of the theme themeName)Implements org.
Deprecated
as a consequence of
This implementation returns a SimpleTheme instance, holding a
ResourceBundle-based MessageSource whose basename corresponds to
the given theme name (prefixed by the configured "basenamePrefix").
Theme being deprecated.
|
| protected void | initParent(Theme
the Theme to (re-)initialize theme)
Deprecated
as a consequence of
Initialize the MessageSource of the given theme with the
one from the corresponding parent of this ThemeSource.
Theme being deprecated.
|
| public void | setBasenamePrefix(String basenamePrefix)
Set the prefix that gets applied to the ResourceBundle basenames, i.e. the theme names. |
| public void | setBeanClassLoader(ClassLoader
the owning class loader beanClassLoader)Implements org. class loader to
a bean instance.
|
| public void | setDefaultEncoding(String defaultEncoding)
Set the default charset to use for parsing resource bundle files. |
| public void | setFallbackToSystemLocale(boolean fallbackToSystemLocale)
Set whether to fall back to the system Locale if no files for a specific Locale have been found. |
| public void | setParentThemeSource(ThemeSource
the parent ThemeSource that will be used to
resolve messages that this object can't resolve.
May be parent)null, in which case no further resolution is possible.Implements org.
Deprecated
as a consequence of
Set the parent that will be used to try to resolve theme messages
that this object can't resolve.
ThemeSource being deprecated.
|
| basenamePrefix | back to summary |
|---|---|
| private String basenamePrefix | |
| beanClassLoader | back to summary |
|---|---|
| private ClassLoader beanClassLoader
| |
| defaultEncoding | back to summary |
|---|---|
| private String defaultEncoding
| |
| fallbackToSystemLocale | back to summary |
|---|---|
| private Boolean fallbackToSystemLocale
| |
| logger | back to summary |
|---|---|
| protected final Log logger | |
| parentThemeSource | back to summary |
|---|---|
| private ThemeSource parentThemeSource
Deprecated as a consequence of | |
| themeCache | back to summary |
|---|---|
| private final Map<String, Theme> themeCache Map from theme name to Theme instance. | |
| ResourceBundleThemeSource | back to summary |
|---|---|
| public ResourceBundleThemeSource() | |
| createMessageSource | back to summary |
|---|---|
| protected MessageSource createMessageSource(String basename) Create a MessageSource for the given basename, to be used as MessageSource for the corresponding theme. Default implementation creates a ResourceBundleMessageSource. for the given basename. A subclass could create a specifically configured ReloadableResourceBundleMessageSource, for example.
| |
| getParentThemeSource | back to summary |
|---|---|
| public ThemeSource getParentThemeSource() Implements org. Doc from org. Deprecated as a consequence of Return the parent of this ThemeSource, or | |
| getTheme | back to summary |
|---|---|
| public Theme getTheme(String themeName) Implements org. Deprecated as a consequence of 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.
| |
| initParent | back to summary |
|---|---|
| protected void initParent(Theme theme)
Deprecated as a consequence of Initialize the MessageSource of the given theme with the one from the corresponding parent of this ThemeSource.
| |
| setBasenamePrefix | back to summary |
|---|---|
| public void setBasenamePrefix(String basenamePrefix) 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 | |
| setBeanClassLoader | back to summary |
|---|---|
| public void setBeanClassLoader(ClassLoader beanClassLoader) Implements org. Doc from org. Callback that supplies the bean Invoked after the population of normal bean properties but
before an initialization callback such as
| |
| setDefaultEncoding | back to summary |
|---|---|
| public void setDefaultEncoding(String defaultEncoding) Set the default charset to use for parsing resource bundle files.
| |
| setFallbackToSystemLocale | back to summary |
|---|---|
| public void setFallbackToSystemLocale(boolean fallbackToSystemLocale) Set whether to fall back to the system Locale if no files for a specific Locale have been found.
| |
| setParentThemeSource | back to summary |
|---|---|
| public void setParentThemeSource(ThemeSource parent) Implements org. Doc from org. Deprecated as a consequence of Set the parent that will be used to try to resolve theme messages that this object can't resolve.
| |