|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LocaleBundleFactory
Interface for localization bundle factories.
The resureces for a locale is stored in an Map
.
The key in this map is either [pageName]$[key]
for page specific
resources, or just [key]
for global resources. If a page specific
resource is not found, a global resource with the same key will be used.
Method Summary | |
---|---|
void |
init(java.lang.ClassLoader classLoader,
javax.servlet.ServletContext servletContext)
Initialize this factory. |
java.util.Map<java.lang.String,java.lang.String> |
loadBundle(java.util.Locale locale)
Load a localization bundle for a given locale. |
Method Detail |
---|
void init(java.lang.ClassLoader classLoader, javax.servlet.ServletContext servletContext) throws java.lang.Exception
classLoader
- the ClassLoader
to useservletContext
- the ServletContext
java.lang.Exception
- may throw any Exceptionjava.util.Map<java.lang.String,java.lang.String> loadBundle(java.util.Locale locale) throws java.lang.Exception
The localization bundles are cached, this method is only invoked once for each locale.
This method should not attempt to load a default locale if
the specified locale is not found. The framework will invoke this
method again with null
as argument when nessecary.
locale
- the Locale
,
or null
for default
Map
with localization data,
or null
if none found for the given locale
java.lang.Exception
- may throw any Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |