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

E13403-05

oracle.ide.resourcebundle
Class ResourceBundleManagerDT

java.lang.Object
  extended by oracle.javatools.resourcebundle.ResourceBundleManager
      extended by oracle.ide.resourcebundle.ResourceBundleManagerDT

public abstract class ResourceBundleManagerDT
extends ResourceBundleManager

ResourceBundleManagerDT provides a base for a ResourceBundleManager implementation for design-time.


Field Summary
 
Fields inherited from class oracle.javatools.resourcebundle.ResourceBundleManager
_bundleMap, _bundleTypesList, _chainedBundleFactory, _keyGenerator, NULL_VALUE_RESOURCE_ID, SYSTEM_BUNDLE_ID
 
Constructor Summary
ResourceBundleManagerDT()
           
 
Method Summary
abstract  void addGlobalBundle(NodeResourceBundle bundle, java.lang.String bundleId)
          Adds the specified bundle as a global bundle and associates it with the specified bundle id
abstract  void addGlobalBundle(java.lang.String bundleClass, java.lang.String bundleId, boolean alwaysShow)
          Adds the specified bundle as a global bundle and associates it with the specified bundle id.
 void addRegisteredBundle(Workspace workspace, java.lang.String bundleId, boolean override)
           
abstract  ResourceBundleWrapper findBundle(PropertyStorage project, java.lang.String bundleId)
          Finds the bundle with the specified bundleId.
 boolean generateELStyleAccess()
          Returns a boolean indicating whether clients should generate EL_style access to resource bundles.
abstract  ResourceBundleWrapper getBundle(PropertyStorage project, java.lang.String bundleId, boolean createBundle)
          Gets (or creates) the Design Time Resource Bundle instance for the given project and bundleId
abstract  void getBundle(PropertyStorage project, java.lang.String bundleId, boolean createBundle, ResourceBundleCallback callback)
          Gets (or creates) the Design Time Resource Bundle instance for the given project and bundleId
abstract  ResourceBundleWrapper getBundle(java.net.URL bundleURL, java.lang.String bundleId)
          Gets the resource bundle for a specified URL and associates it with the specified bundleId **Note** this method should only be used by the ResourceBundleKeyChooser and may change without notice.
abstract  java.util.List<GlobalBundleInfo> getGlobalBundleInfos()
          Gets the list of global bundle infos
abstract  java.util.List<NodeResourceBundle> getGlobalBundles()
          Gets the list of global bundles
static boolean isRoleSettingBundlesReadOnly()
          Returns whether the role has set the shaping for resource bundle preferences to make resource bundles read-only
abstract  void removeGlobalBundle(java.lang.String bundleId)
          Removes the bundle associates with the specified bundle id form the list of global bundles
protected static void setRoleSettingBundlesReadOnly(boolean readOnly)
          This method is really only meant to enable unit-testing.
 
Methods inherited from class oracle.javatools.resourcebundle.ResourceBundleManager
deleteBundle, getAppBundleInfoFactory, getChainedBundleFactory, getDefaultResourceKeyGenerator, getResourceBundleManager, getResourceBundleTypes, mergeBundles, registerResourceBundleType, releaseBundle, setAppBundleInfoFactory, setChainedBundleFactory, setDefaultResourceKeyGenerator, setResourceBundleManager, splitBundle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceBundleManagerDT

public ResourceBundleManagerDT()
Method Detail

findBundle

public abstract ResourceBundleWrapper findBundle(PropertyStorage project,
                                                 java.lang.String bundleId)
Finds the bundle with the specified bundleId. Will not attempt to create the bundle if it does not already exist and will not fall back to use a project default bundle

Parameters:
project - he current Project's Data that owns this file.
bundleId - The bundleId to use. The bundle ID is up to the client, however is generally either {PACKAGE_NAME} + {OBJECT_NAME} + "Bundle" or {PACKAGE_NAME} + "Bundle".
Returns:
The ResourceBundleWrapper or null if the resource bundle does not exist

getBundle

public abstract ResourceBundleWrapper getBundle(PropertyStorage project,
                                                java.lang.String bundleId,
                                                boolean createBundle)
Gets (or creates) the Design Time Resource Bundle instance for the given project and bundleId

Parameters:
project - The current Project's Data that owns this file.
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".
createBundle - true if a new bundle should be created if one of the given bundleId does not exist.
Returns:
The ResourceBundleWrapper or null if the resource bundle does not exist and createBundle is false
Throws:
java.lang.NullPointerException - if project or bundleId is null Note: this method may take some time to execute and thus should never be called on the event-dispatch thread

getBundle

public abstract void getBundle(PropertyStorage project,
                               java.lang.String bundleId,
                               boolean createBundle,
                               ResourceBundleCallback callback)
Gets (or creates) the Design Time Resource Bundle instance for the given project and bundleId

Parameters:
project - The current Project's Data that owns this file.
bundleId - 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".
createBundle - true if a new bundle should be created if one of the given bundleId does not exist.
callback - the object to call when the bundle has been found, may be called back with null if no bundle found

getBundle

public abstract ResourceBundleWrapper getBundle(java.net.URL bundleURL,
                                                java.lang.String bundleId)
Gets the resource bundle for a specified URL and associates it with the specified bundleId **Note** this method should only be used by the ResourceBundleKeyChooser and may change without notice.

Parameters:
bundleURL - the URL to use to create a resource bundle
bundleId - the fully-qualified name to associate with the resource bundle
Returns:
the resource bundle Note: this method may take some time to execute and thus should never be called on the event-dispatch thread

addGlobalBundle

public abstract void addGlobalBundle(NodeResourceBundle bundle,
                                     java.lang.String bundleId)
Adds the specified bundle as a global bundle and associates it with the specified bundle id

Parameters:
bundle - the bundle to add to the list of global bundles
bundleId - the id to associate with the bundle instead

addGlobalBundle

public abstract void addGlobalBundle(java.lang.String bundleClass,
                                     java.lang.String bundleId,
                                     boolean alwaysShow)
Adds the specified bundle as a global bundle and associates it with the specified bundle id.

Parameters:
bundleClass - the fully-qualified class name of the bundle
bundleId - the id to associate with the bundle. This id will be stored in generated code to reference the bundle so typically it would also be the fully-qualified class name
alwaysShow - true if the bundle should always be added to the SelectTextPanel's dropdown list of bundles; false otherwise

removeGlobalBundle

public abstract void removeGlobalBundle(java.lang.String bundleId)
Removes the bundle associates with the specified bundle id form the list of global bundles

Parameters:
bundleId - the id associated with the bundle to remove

getGlobalBundles

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

Returns:
the list of global bundles. Returns null if there are no global bundles

getGlobalBundleInfos

public abstract java.util.List<GlobalBundleInfo> getGlobalBundleInfos()
Gets the list of global bundle infos

Returns:
the list of global bundle infos, returns null if there are no global bundles

isRoleSettingBundlesReadOnly

public static boolean isRoleSettingBundlesReadOnly()
Returns whether the role has set the shaping for resource bundle preferences to make resource bundles read-only

Returns:
true if bundles are to be treated as read-only; false otherwise

setRoleSettingBundlesReadOnly

protected static void setRoleSettingBundlesReadOnly(boolean readOnly)
This method is really only meant to enable unit-testing.

Parameters:
readOnly -

generateELStyleAccess

public boolean generateELStyleAccess()
Returns a boolean indicating whether clients should generate EL_style access to resource bundles. Whenever Xliff resource bundles are available EL-style access should be generated to ensure that resolution of the resource bundle and key will go through the resource bundle framework. This ensures that features specific to the Ide's resource bundle manager implementation will work (bundle fallback ordering specified in adf-config.xml and bundle override feature)

Returns:
true if clients should generate EL style access; false otherwise

addRegisteredBundle

public void addRegisteredBundle(Workspace workspace,
                                java.lang.String bundleId,
                                boolean override)

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

E13403-05

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