Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.5)

E22562-01

oracle.apps.fnd.applcore.flex.runtime.util
Class ResourceBundleUISupport

java.lang.Object
  extended by oracle.apps.fnd.applcore.flex.runtime.util.ResourceBundleUISupport

public class ResourceBundleUISupport
extends java.lang.Object

A helper class for creating resource bundles for UI.


Constructor Summary
ResourceBundleUISupport(java.lang.Long appId, java.lang.String ownerModelPackage)
          Constructs a helper class.
ResourceBundleUISupport(java.lang.String appIdentStr, java.lang.String ownerModelPackage)
          Constructs a helper class.
ResourceBundleUISupport(java.lang.String cnnIdentStr, java.lang.String appIdentStr, java.lang.String ownerModelPackage)
          Constructs a helper class with a particular connection.
 
Method Summary
static java.util.Map<java.lang.String,java.lang.String> getTranslations(oracle.jbo.Row viewRow, java.lang.String viewAttrName)
          Gets the translations of a column of a view attribute.
 java.lang.String put(java.lang.String bundleIdentifier, java.lang.String key, java.lang.String defaultValue, java.util.Map<java.lang.String,java.lang.String> values)
          Puts an entry to a resource bundle.
 void saveBundles()
          Saves the bundles to the repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceBundleUISupport

public ResourceBundleUISupport(java.lang.String appIdentStr,
                               java.lang.String ownerModelPackage)
Constructs a helper class.

Parameters:
appIdentStr - the application identifier String
ownerModelPackage - the model package such as "oracle.x.y.z.view" for the bundle subdirectories and files. Note that this is the package of the owner that owns the resource bundles. The actual bundles will be created under a subdirectory named "bundle".
See Also:
ApplicationIdentifier

ResourceBundleUISupport

public ResourceBundleUISupport(java.lang.Long appId,
                               java.lang.String ownerModelPackage)
Constructs a helper class.

Parameters:
appIdentStr - the application id
ownerModelPackage - the model package such as "oracle.x.y.z.view" for the bundle subdirectories and files. Note that this is the package of the owner that owns the resource bundles. The actual bundles will be created under a subdirectory named "bundle".
See Also:
ApplicationIdentifier

ResourceBundleUISupport

public ResourceBundleUISupport(java.lang.String cnnIdentStr,
                               java.lang.String appIdentStr,
                               java.lang.String ownerModelPackage)
Constructs a helper class with a particular connection.

Parameters:
cnnIdentStr - the connection identifier String
appIdentStr - the application identifier String
ownerModelPackage - the model package such as "oracle.x.y.z.view" for the bundle subdirectories and files. Note that this is the package of the owner that owns the resource bundles. The actual bundles will be created under a subdirectory named "bundle".
See Also:
ConnectionIdentifier, ApplicationIdentifier
Method Detail

put

public java.lang.String put(java.lang.String bundleIdentifier,
                            java.lang.String key,
                            java.lang.String defaultValue,
                            java.util.Map<java.lang.String,java.lang.String> values)
Puts an entry to a resource bundle.

Parameters:
bundleIdentifier - the String that identifies a bundle. The identifier must be a legal file name.
key - the key of the entry
defaultValue - the default value of the entry if the base language is not set, or the value in the base language is not found in the given value map
values - the values for different languages; null if no other values is available. The keys of this map are the language codes.
Returns:
the EL expression to access this entry
Throws:
java.lang.IllegalArgumentException - if the key or any of the values in the given map is null, or if the given base value is null but the base value cannot be determined based on the base language and the given value map.

saveBundles

public void saveBundles()
Saves the bundles to the repository.


getTranslations

public static java.util.Map<java.lang.String,java.lang.String> getTranslations(oracle.jbo.Row viewRow,
                                                                               java.lang.String viewAttrName)
Gets the translations of a column of a view attribute. The view attribute must be associated with an entity and the entity must have a row iterator named OA_TL_ENTITIES. It is assumed that the corresponding entity attribute name is the same as the given view attribute name. The translation entity must have an attribute named "Language" that provides the language code.

Parameters:
viewRow - the view row
viewAttrName - the view attribute name
Returns:
the translations. The keys are language codes and the values are translations. An empty map is returned if no translations are found.

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.5)

E22562-01

Copyright © 2011 Oracle. All Rights Reserved.