public class ResourceBundleManagerRT extends ResourceBundleManager
ResourceBundleManagerRT provides some of the base implementation of a ResourceBundleManager for run time._bundleMap, _bundleTypesList, _chainedBundleFactory, _keyGenerator, NULL_VALUE_RESOURCE_ID, SYSTEM_BUNDLE_ID| Constructor and Description |
|---|
ResourceBundleManagerRT() |
| Modifier and Type | Method and Description |
|---|---|
void |
addGlobalBundle(ResourceBundleWrapperRT bundle, java.lang.String bundleId)
Adds the specified bundle to the list of global resource bundles
|
boolean |
deleteBundle(ResourceBundleWrapper bundle)
Deletes the given bundle.
|
void |
flush()
Clears the cached resource bundles
|
ResourceBundleWrapper |
getBundle(java.lang.String bundleId, boolean createBundle)
Deprecated.
use getBundle(String bundleId, Locale locale) instead
|
ResourceBundleWrapper |
getBundle(java.lang.String bundleId, java.util.Locale locale)
Gets the resource bundle for the specified bundleId and locale
|
ResourceBundleWrapper |
getBundle(java.lang.String bundleId, java.util.Locale locale, java.lang.ClassLoader classLoader)
Gets the resource bundle for the specified bundleId and locale using the specified class loader
|
ResourceBundleWrapper |
getBundle(java.lang.String bundleId, java.lang.String extension, boolean createBundle)
Deprecated.
use getBundle(String bundleId, boolean createBundle)
|
ResourceBundleWrapper |
getBundle(java.lang.String bundleId, java.lang.String extension, java.util.Locale locale)
Deprecated.
use getBundle(String bundleId, Locale locale)
|
java.util.List<ResourceBundleWrapperRT> |
getGlobalBundles()
Gets the list of global bundles
|
java.util.List<java.lang.String> |
getRegisteredBundles()
Gets the resource bundles that have been registered at design-time.
|
boolean |
mergeBundles(ResourceBundleWrapper newBundle, ResourceBundleWrapper oldBundle)
Merges the contents of
oldBundle into newBundle |
boolean |
releaseBundle(ResourceBundleWrapper bundle)
Releases the ResourceBundleWrapper and all associated resources, once released the old resource bundle should not be used anymore, or it will throw an
IllegalStateException. |
void |
removeGlobalBundle(java.lang.String bundleId)
Removes the bundle associated with the bundle id from the global bundle list
|
boolean |
splitBundle(ResourceBundleWrapper newBundle, ResourceBundleWrapper oldBundle, java.util.Set<java.lang.String> keysToMove)
Splits a ResourceBundleWrapper into two.
|
getAppBundleInfoFactory, getChainedBundleFactory, getDefaultResourceKeyGenerator, getResourceBundleManager, getResourceBundleTypes, registerResourceBundleType, setAppBundleInfoFactory, setChainedBundleFactory, setDefaultResourceKeyGenerator, setResourceBundleManagerpublic void addGlobalBundle(ResourceBundleWrapperRT bundle, java.lang.String bundleId)
bundle - the bundle to add to the global listbundleId - the id to use for the bundlepublic void removeGlobalBundle(java.lang.String bundleId)
bundleId - the id associated with the bundle to remove from the global bundle listpublic java.util.List<ResourceBundleWrapperRT> getGlobalBundles()
@Deprecated public ResourceBundleWrapper getBundle(java.lang.String bundleId, boolean createBundle)
@Deprecated public ResourceBundleWrapper getBundle(java.lang.String bundleId, java.lang.String extension, boolean createBundle)
bundleId -extension -createBundle -public boolean releaseBundle(ResourceBundleWrapper bundle)
ResourceBundleManagerIllegalStateException.releaseBundle in class ResourceBundleManagerbundle - The resource bundle to release.true on success.public boolean deleteBundle(ResourceBundleWrapper bundle)
ResourceBundleManagerdeleteBundle in class ResourceBundleManagerbundle - Deletes the given resource bundle.true on success.public boolean mergeBundles(ResourceBundleWrapper newBundle, ResourceBundleWrapper oldBundle)
ResourceBundleManageroldBundle into newBundlemergeBundles in class ResourceBundleManagernewBundle - The new resource bundle.oldBundle - The old resource bundle, whose contents are merged into the new bundle.true on success.public boolean splitBundle(ResourceBundleWrapper newBundle, ResourceBundleWrapper oldBundle, java.util.Set<java.lang.String> keysToMove)
ResourceBundleManagerkeysToMove will be removed from oldBundle and added to newBundlesplitBundle in class ResourceBundleManagernewBundle - The new bundle contains the keys in keysTomoveoldBundle - The original (old) resource bundlekeysToMove - The set of keys to movetrue on success.public void flush()
public ResourceBundleWrapper getBundle(java.lang.String bundleId, java.util.Locale locale)
bundleId - the id of the bundle to findlocale - the locale of the bundle to locate (may be null)public ResourceBundleWrapper getBundle(java.lang.String bundleId, java.util.Locale locale, java.lang.ClassLoader classLoader)
bundleId - the id of the bundle to findlocale - the locale of the bundle to find (may be null)classLoader - the class loader to use to find the bundle (may be null)@Deprecated public ResourceBundleWrapper getBundle(java.lang.String bundleId, java.lang.String extension, java.util.Locale locale)
bundleId -extension -locale -public java.util.List<java.lang.String> getRegisteredBundles()