org.nuiton.i18n.init
Class DefaultI18nInitializer
java.lang.Object
org.nuiton.i18n.init.I18nInitializer
org.nuiton.i18n.init.DefaultI18nInitializer
- Direct Known Subclasses:
- UserI18nInitializer
public class DefaultI18nInitializer
- extends I18nInitializer
Default implementation of a I18nInitializer using the default i18n
implementation (one unique bundle with a definition properties file).
- Since:
- 1.1
- Author:
- tchemit
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UNIQUE_BUNDLE_DEF
public static String UNIQUE_BUNDLE_DEF
UNIQUE_BUNDLE_ENTRY
public static String UNIQUE_BUNDLE_ENTRY
BUNDLE_DEF_LOCALES
public static String BUNDLE_DEF_LOCALES
BUNDLE_DEF_VERSION
public static String BUNDLE_DEF_VERSION
BUNDLES_FOR_LOCALE
public static String BUNDLES_FOR_LOCALE
bundleName
protected final String bundleName
- the name of the bundle
loader
protected ClassLoader loader
- class loader to use (optional)
i18nPath
protected String i18nPath
- i18n path where to seek for resources (optional)
definition
protected Properties definition
definitionURL
protected URL definitionURL
DEFAULT_I18N_PATH
public static final String DEFAULT_I18N_PATH
- See Also:
- Constant Field Values
DefaultI18nInitializer
public DefaultI18nInitializer(String bundleName)
throws NullPointerException
- Throws:
NullPointerException
DefaultI18nInitializer
public DefaultI18nInitializer(String bundleName,
ClassLoader loader)
throws NullPointerException
- Throws:
NullPointerException
DefaultI18nInitializer
public DefaultI18nInitializer(String bundleName,
ClassLoader loader,
String i18nPath)
throws NullPointerException
- Throws:
NullPointerException
getBundleName
public String getBundleName()
getLoader
public ClassLoader getLoader()
getI18nPath
public String getI18nPath()
setLoader
protected void setLoader(ClassLoader loader)
setI18nPath
protected void setI18nPath(String i18nPath)
getResourceURL
protected URL getResourceURL(String resource)
resolvDefinition
public String resolvDefinition(Properties p)
throws Exception
- Throws:
Exception
getDefinitionURL
public URL getDefinitionURL()
throws NullPointerException
- Throws:
NullPointerException
resolvURLs
public URL[] resolvURLs(String prefixURL,
Properties definition)
throws Exception
- Throws:
Exception
resolvBundles
public I18nBundle[] resolvBundles()
throws Exception
- Description copied from class:
I18nInitializer
- Resolv the bundles.
- Specified by:
resolvBundles in class I18nInitializer
- Returns:
- the bundles detected
- Throws:
Exception - if any pb while getting bundles
Copyright © 2004-2010 CodeLutin. All Rights Reserved.