Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

oracle.javatools.resourcebundle
Class BundleFactory

java.lang.Object
  extended by oracle.javatools.resourcebundle.BundleFactory

public final class BundleFactory
extends java.lang.Object

The BundleFactory provides a simplified approach to getting resource bundles from the run time resource bundle manager.


Constructor Summary
BundleFactory()
           
 
Method Summary
static void flush()
          Clears out any resource bundles cached by the run time resource bundle manager
static java.util.ResourceBundle getBundle(java.util.ResourceBundle resourceBundle, java.util.Locale locale)
          Takes a resource bundle and wraps it with the application-level override bundle
static java.util.ResourceBundle getBundle(java.lang.String bundleId)
          Gets the resource bundle for the given name
static java.util.ResourceBundle getBundle(java.lang.String bundleId, java.util.Locale locale)
          Gets the resource bundle for the given name
static java.util.ResourceBundle getBundle(java.lang.String bundleId, java.util.Locale locale, java.lang.ClassLoader loader)
          Gets the resource bundle for the given name
static java.util.ResourceBundle getBundle(java.lang.String bundleId, java.lang.String extension)
          Deprecated. since 11.0
static java.util.ResourceBundle getBundle(java.lang.String bundleId, java.lang.String extension, java.util.Locale locale)
          Deprecated. since 11.0
static java.util.ResourceBundle getBundle(java.lang.String bundleId, java.lang.String extension, java.util.Locale locale, java.lang.ClassLoader classLoader)
          Deprecated. since 11.0
static java.util.Locale getDefaultLocale()
           
static java.util.Map<java.lang.String,java.lang.String> getMap(java.lang.String bundleId)
          Gets a map of key/values from the specified bundle id and locale
static java.util.Map<java.lang.String,java.lang.String> getMap(java.lang.String bundleId, java.util.Locale locale)
          Gets a map of key/values from the specified bundle id and locale
static java.util.Map<java.lang.String,java.lang.String> getMap(java.lang.String bundleId, java.util.Locale locale, java.lang.ClassLoader loader)
          Gets a map of key/values from the specified bundle id and locale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BundleFactory

public BundleFactory()
Method Detail

flush

public static void flush()
Clears out any resource bundles cached by the run time resource bundle manager


getMap

public static java.util.Map<java.lang.String,java.lang.String> getMap(java.lang.String bundleId)
Gets a map of key/values from the specified bundle id and locale

Parameters:
bundleId - The bundleId to use. This will only be significant if the project is set for one bundle per artifact. The bundle ID is up to the client, however is generally either {PACKAGE_NAME} + {OBJECT_NAME} + "Bundle" or {PACKAGE_NAME} + "Bundle".
Returns:
a map of key value strings

getMap

public static java.util.Map<java.lang.String,java.lang.String> getMap(java.lang.String bundleId,
                                                                      java.util.Locale locale)
Gets a map of key/values from the specified bundle id and locale

Parameters:
bundleId - The bundleId to use. This will only be significant if the project is set for one bundle per artifact. The bundle ID is up to the client, however is generally either {PACKAGE_NAME} + {OBJECT_NAME} + "Bundle" or {PACKAGE_NAME} + "Bundle".
locale - the locale to use when finding the resource bundle
Returns:
a map of key value strings

getMap

public static java.util.Map<java.lang.String,java.lang.String> getMap(java.lang.String bundleId,
                                                                      java.util.Locale locale,
                                                                      java.lang.ClassLoader loader)
Gets a map of key/values from the specified bundle id and locale

Parameters:
bundleId -
locale -
loader -
Returns:

getBundle

public static final java.util.ResourceBundle getBundle(java.lang.String bundleId)
Gets the resource bundle for the given name

Parameters:
bundleId - The bundleId to use. This will only be significant if the project is set for one bundle per artifact. The bundle ID is up to the client, however is generally either {PACKAGE_NAME} + {OBJECT_NAME} + "Bundle" or {PACKAGE_NAME} + "Bundle".
Returns:
the bundle for the bundleId

getBundle

@Deprecated
public static final java.util.ResourceBundle getBundle(java.lang.String bundleId,
                                                                  java.lang.String extension)
Deprecated. since 11.0

Gets the resource bundle for the given name

Parameters:
bundleId - The bundleId to use. This will only be significant if the project is set for one bundle per artifact. The bundle ID is up to the client, however is generally either {PACKAGE_NAME} + {OBJECT_NAME} + "Bundle" or {PACKAGE_NAME} + "Bundle".
extension - the extension of the bundle (no longer used)
Returns:
the bundle for the bundleId

getBundle

@Deprecated
public static final java.util.ResourceBundle getBundle(java.lang.String bundleId,
                                                                  java.lang.String extension,
                                                                  java.util.Locale locale)
Deprecated. since 11.0

Parameters:
bundleId -
extension -
locale -
Returns:

getBundle

@Deprecated
public static final java.util.ResourceBundle getBundle(java.lang.String bundleId,
                                                                  java.lang.String extension,
                                                                  java.util.Locale locale,
                                                                  java.lang.ClassLoader classLoader)
Deprecated. since 11.0

Parameters:
bundleId -
extension -
locale -
classLoader -
Returns:

getBundle

public static final java.util.ResourceBundle getBundle(java.lang.String bundleId,
                                                       java.util.Locale locale)
Gets the resource bundle for the given name

Parameters:
bundleId - The bundleId to use. This will only be significant if the project is set for one bundle per artifact. The bundle ID is up to the client, however is generally either {PACKAGE_NAME} + {OBJECT_NAME} + "Bundle" or {PACKAGE_NAME} + "Bundle".
locale - the locale to look for
Returns:
the bundle for the bundleId

getBundle

public static java.util.ResourceBundle getBundle(java.lang.String bundleId,
                                                 java.util.Locale locale,
                                                 java.lang.ClassLoader loader)
Gets the resource bundle for the given name

Parameters:
bundleId - The bundleId to use. This will only be significant if the project is set for one bundle per artifact. The bundle ID is up to the client, however is generally either {PACKAGE_NAME} + {OBJECT_NAME} + "Bundle" or {PACKAGE_NAME} + "Bundle".
locale - locale the locale to look for
loader - the class loader to use to find the file
Returns:
the bundle for the bundleId

getBundle

public static java.util.ResourceBundle getBundle(java.util.ResourceBundle resourceBundle,
                                                 java.util.Locale locale)
Takes a resource bundle and wraps it with the application-level override bundle

Parameters:
resourceBundle - must not be null
locale - must not be null
Returns:
resource bundle wrapped by the application-level override bundle may return null

getDefaultLocale

public static java.util.Locale getDefaultLocale()

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

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