Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

oracle.javatools.resourcebundle
Class ResourceBundleManagerRT

java.lang.Object
  extended by oracle.javatools.resourcebundle.ResourceBundleManager
      extended by oracle.javatools.resourcebundle.ResourceBundleManagerRT

public class ResourceBundleManagerRT
extends ResourceBundleManager

The ResourceBundleManagerRT provides some of the base implementation of a ResourceBundleManager for run time.


Field Summary
 
Fields inherited from class oracle.javatools.resourcebundle.ResourceBundleManager
_bundleMap, _bundleTypesList, _chainedBundleFactory, _keyGenerator, NULL_VALUE_RESOURCE_ID, SYSTEM_BUNDLE_ID
 
Constructor Summary
ResourceBundleManagerRT()
           
 
Method Summary
 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.
 
Methods inherited from class oracle.javatools.resourcebundle.ResourceBundleManager
getAppBundleInfoFactory, getChainedBundleFactory, getDefaultResourceKeyGenerator, getResourceBundleManager, getResourceBundleTypes, registerResourceBundleType, setAppBundleInfoFactory, setChainedBundleFactory, setDefaultResourceKeyGenerator, setResourceBundleManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceBundleManagerRT

public ResourceBundleManagerRT()
Method Detail

addGlobalBundle

public void addGlobalBundle(ResourceBundleWrapperRT bundle,
                            java.lang.String bundleId)
Adds the specified bundle to the list of global resource bundles

Parameters:
bundle - the bundle to add to the global list
bundleId - the id to use for the bundle

removeGlobalBundle

public void removeGlobalBundle(java.lang.String bundleId)
Removes the bundle associated with the bundle id from the global bundle list

Parameters:
bundleId - the id associated with the bundle to remove from the global bundle list

getGlobalBundles

public java.util.List<ResourceBundleWrapperRT> getGlobalBundles()
Gets the list of global bundles

Returns:
the list of global bundles; may return null

getBundle

public ResourceBundleWrapper getBundle(java.lang.String bundleId,
                                       boolean createBundle)
Deprecated. use getBundle(String bundleId, Locale locale) instead


getBundle

public ResourceBundleWrapper getBundle(java.lang.String bundleId,
                                       java.lang.String extension,
                                       boolean createBundle)
Deprecated. use getBundle(String bundleId, boolean createBundle)

Parameters:
bundleId -
extension -
createBundle -
Returns:

releaseBundle

public boolean releaseBundle(ResourceBundleWrapper bundle)
Description copied from class: ResourceBundleManager
Releases the ResourceBundleWrapper and all associated resources, once released the old resource bundle should not be used anymore, or it will throw an IllegalStateException.

Specified by:
releaseBundle in class ResourceBundleManager
Parameters:
bundle - The resource bundle to release.
Returns:
true on success.

deleteBundle

public boolean deleteBundle(ResourceBundleWrapper bundle)
Description copied from class: ResourceBundleManager
Deletes the given bundle.

Specified by:
deleteBundle in class ResourceBundleManager
Parameters:
bundle - Deletes the given resource bundle.
Returns:
true on success.

mergeBundles

public boolean mergeBundles(ResourceBundleWrapper newBundle,
                            ResourceBundleWrapper oldBundle)
Description copied from class: ResourceBundleManager
Merges the contents of oldBundle into newBundle

Specified by:
mergeBundles in class ResourceBundleManager
Parameters:
newBundle - The new resource bundle.
oldBundle - The old resource bundle, whose contents are merged into the new bundle.
Returns:
true on success.

splitBundle

public boolean splitBundle(ResourceBundleWrapper newBundle,
                           ResourceBundleWrapper oldBundle,
                           java.util.Set<java.lang.String> keysToMove)
Description copied from class: ResourceBundleManager
Splits a ResourceBundleWrapper into two. The keys contained in keysToMove will be removed from oldBundle and added to newBundle

Specified by:
splitBundle in class ResourceBundleManager
Parameters:
newBundle - The new bundle contains the keys in keysTomove
oldBundle - The original (old) resource bundle
keysToMove - The set of keys to move
Returns:
true on success.

flush

public void flush()
Clears the cached resource bundles


getBundle

public ResourceBundleWrapper getBundle(java.lang.String bundleId,
                                       java.util.Locale locale)
Gets the resource bundle for the specified bundleId and locale

Parameters:
bundleId - the id of the bundle to find
locale - the locale of the bundle to locate (may be null)
Returns:
the bundle or a MissingResourceException

getBundle

public 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

Parameters:
bundleId - the id of the bundle to find
locale - the locale of the bundle to find (may be null)
classLoader - the class loader to use to find the bundle (may be null)
Returns:
the bundle or a MissingResourceException

getBundle

public ResourceBundleWrapper getBundle(java.lang.String bundleId,
                                       java.lang.String extension,
                                       java.util.Locale locale)
Deprecated. use getBundle(String bundleId, Locale locale)

Gets the resource bundle for the specified bundleId, extension and locale

Parameters:
bundleId -
extension -
locale -
Returns:

getRegisteredBundles

public java.util.List<java.lang.String> getRegisteredBundles()
Gets the resource bundles that have been registered at design-time. These are either bundles that have overrides or are just registered so they can be retrieved via this method at runtime

Returns:
a list of the registered bundles or Collections.EMPTY_LIST if no bundles are registered.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

Copyright © 1997, 2011, Oracle. All rights reserved.