public class DefaultNlsTemplateResolver extends AbstractResourceBundleNlsTemplateResolver
NlsTemplateResolver
. It locates all ResourceBundle
s
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
NlsTemplate s for reverse lookup. |
protected void |
initTemplatesForNlsBundles(Map<String,NlsTemplate> map)
This method initializes the
NlsTemplate s for reverse lookup for NlsBundle s. |
protected void |
initTemplatesForResourceBundles(Map<String,NlsTemplate> map)
This method initializes the
NlsTemplate s for reverse lookup for ResourceBundle s. |
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, resolveTemplate
getInitializationState, initialize
private Map<String,NlsTemplate> i18nMsg2TemplateMap
private NlsResourceBundleLocator resourceBundleLocator
private NlsBundleFactory bundleFactory
protected void doInitialize()
AbstractComponent
initialization
. It is called when AbstractComponent.initialize()
is
invoked for the first time. super.
AbstractComponent.doInitialize()
.doInitialize
in class AbstractComponent
private Map<String,NlsTemplate> getI18nMsg2TemplateMap()
protected void initTemplates(Map<String,NlsTemplate> map)
NlsTemplate
s for reverse lookup.map
- the Map
where to register
the NlsTemplate
s by their
i18n message
.protected void initTemplatesForResourceBundles(Map<String,NlsTemplate> map)
NlsTemplate
s for reverse lookup for ResourceBundle
s.map
- the Map
where to register
the NlsTemplate
s by their
i18n message
.protected void initTemplatesForNlsBundles(Map<String,NlsTemplate> map)
NlsTemplate
s for reverse lookup for NlsBundle
s.map
- the Map
where to register
the NlsTemplate
s by their
i18n message
.protected void doInitialized()
AbstractComponent
initialization
. 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 AbstractComponent
public 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)
NlsTemplateResolver
NlsTemplate
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.