public class DefaultNlsTemplateResolver extends AbstractResourceBundleNlsTemplateResolver
NlsTemplateResolver. It locates all ResourceBundles
declared in the bundle-declaration-files.AbstractResourceBundleNlsTemplateResolver| Modifier and Type | Field and Description |
|---|---|
private NlsBundleFactory |
bundleFactory |
private Map<String,NlsTemplate> |
i18nMsg2TemplateMap |
private NlsResourceBundleLocator |
resourceBundleLocator |
CLASSPATH_NLS_BUNDLE| Constructor and Description |
|---|
DefaultNlsTemplateResolver()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInitialize()
This method performs the actual
initialization. |
protected void |
doInitialized()
This method is invoked at the end of the actual
initialization. |
private Map<String,NlsTemplate> |
getI18nMsg2TemplateMap() |
NlsResourceBundleLocator |
getResourceBundleFinder()
This method gets the
NlsResourceBundleLocator. |
protected void |
initTemplates(Map<String,NlsTemplate> map)
This method initializes the
NlsTemplates for reverse lookup. |
protected void |
initTemplatesForNlsBundles(Map<String,NlsTemplate> map)
This method initializes the
NlsTemplates for reverse lookup for NlsBundles. |
protected void |
initTemplatesForResourceBundles(Map<String,NlsTemplate> map)
This method initializes the
NlsTemplates for reverse lookup for ResourceBundles. |
NlsTemplate |
resolveTemplate(String internationalizedMessage)
This method is used to create the
NlsTemplate from information that is found by the given
internationalizedMessage. |
void |
setBundleFactory(NlsBundleFactory bundleFactory) |
void |
setResourceBundleLocator(NlsResourceBundleLocator resourceBundleLocator) |
resolveTemplate, resolveTemplategetInitializationState, initializeprivate Map<String,NlsTemplate> i18nMsg2TemplateMap
private NlsResourceBundleLocator resourceBundleLocator
private NlsBundleFactory bundleFactory
protected void doInitialize()
AbstractComponentinitialization. It is called when AbstractComponent.initialize() is
invoked for the first time. super.AbstractComponent.doInitialize().doInitialize in class AbstractComponentprivate Map<String,NlsTemplate> getI18nMsg2TemplateMap()
protected void initTemplates(Map<String,NlsTemplate> map)
NlsTemplates for reverse lookup.map - the Map where to register the NlsTemplates by their
i18n message.protected void initTemplatesForResourceBundles(Map<String,NlsTemplate> map)
NlsTemplates for reverse lookup for ResourceBundles.map - the Map where to register the NlsTemplates by their
i18n message.protected void initTemplatesForNlsBundles(Map<String,NlsTemplate> map)
NlsTemplates for reverse lookup for NlsBundles.map - the Map where to register the NlsTemplates by their
i18n message.protected void doInitialized()
AbstractComponentinitialization. It is called when
AbstractComponent.initialize() is invoked for the first time after AbstractComponent.doInitialize() is completed and
initialization-state has changed to initialized. super.AbstractComponent.doInitialized().doInitialized in class AbstractComponentpublic NlsResourceBundleLocator getResourceBundleFinder()
NlsResourceBundleLocator.NlsResourceBundleLocator.@Inject public void setResourceBundleLocator(NlsResourceBundleLocator resourceBundleLocator)
resourceBundleLocator - the NlsResourceBundleLocator to Inject@Inject public void setBundleFactory(NlsBundleFactory bundleFactory)
bundleFactory - the NlsBundleFactory to Inject.public NlsTemplate resolveTemplate(String internationalizedMessage)
NlsTemplateResolverNlsTemplate from information that is found by the given
internationalizedMessage. AbstractResourceBundle(s).internationalizedMessage - is the internationalized
message.NlsTemplate or null if this implementation failed to resolve the
according template.Copyright © 2001–2016 mmm-Team. All rights reserved.