Skip navigation links

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

E67661-01


oracle.javatools.resourcebundle
Class ResourceBundleUtils

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

Direct Known Subclasses:
ResourceBundleUtils

public class ResourceBundleUtils
extends java.lang.Object

Field Summary
static java.lang.String ADF_CONFIG
           
static java.lang.String ADF_CONFIG_CHILD
           
static java.lang.String ADF_NAMESPACE
           
static java.lang.String ADF_SETTINGS_CHILD
           
static java.lang.String APP_BUNDLE_NODE
           
static java.lang.String BUNDLE_ID_NODE
           
static java.lang.String BUNDLE_LIST_NODE
           
static java.lang.String BUNDLEID_METADATASTORE_USAGE
           
static java.lang.String BUNDLEID_SOURCE_ATTRIBUTE
           
static java.lang.String COMP_BUNDLE_OVERRIDE_DIRECTORY_SEPARATOR
           
static java.lang.String CUSTHINT_VALUE_SEPARATOR
           
static java.lang.String EXPIRE_SECONDS
           
static java.lang.String EXPIRE_TIME
           
static java.lang.String INITIAL_SIZE_ATTRIBUTE
           
static java.lang.String LOAD_FACTOR_ATTRIBUTE
           
static java.lang.String LOAD_XLIFF_NOTE_ELEMENT_ATTRIBUTE
           
static java.lang.String LOAD_XLIFF_NOTE_ELEMENT_NODE
           
static java.lang.String MAX_SIZE_ATTRIBUTE
           
static java.lang.String OVERRIDE_ATTRIBUTE
           
static java.lang.String RESOURCE_BUNDLE_CACHE_NODE
           
static java.lang.String XMLNS
           
static java.lang.String XMLNS_RESBUNDLE
           
static java.lang.String XMLNS_RESBUNDLE_CTX_KEY
           
static java.lang.String XMLNS_RESBUNDLE_SETTINGS
           

 

Constructor Summary
protected ResourceBundleUtils()
           

 

Method Summary
static java.lang.String addUnicodeEscapes(java.lang.String theString, boolean escapeSpace)
           
static java.lang.String convertMetadataToDisplayString(java.util.Map<java.lang.String,java.lang.String> map)
           
static java.lang.String convertMetadataToString(java.util.Map<java.lang.String,java.lang.String> metadata)
           
static java.util.Map<java.lang.String,java.lang.String> convertStringToMetadata(java.lang.String metadataString)
           
static java.util.Map createConfigMap(org.w3c.dom.Element el)
          Used to create a map from the ADFConfig data for resource bundles.
protected static oracle.mds.core.MetadataObject createMetadataObject(oracle.mds.core.MDSSession mdsSession, java.lang.String fileName, java.util.Locale locale)
           
static oracle.mds.core.MOReference createMOReference(java.lang.String appOverrideFile)
           
static java.util.List<java.lang.String> createNewParentList(java.util.List<java.lang.String> fileNames, java.lang.String currentFile)
           
static oracle.adf.share.ADFConfig getADFConfig()
          Gets the ADFConfig
static oracle.adf.share.ADFContext getADFContext()
          Gets the ADFContext
static AppBundleInfo getAppBundleInfo()
           
static AppBundleInfo getAppBundleInfoForLocale(java.util.Locale locale)
           
static AppBundleInfo getAppBundleInfoForLocale(java.util.Locale locale, java.lang.String bundleId)
          Creates the AppBundleInfoRT instance per locale and bundleid.
protected static AppBundleInfoRT getAppBundleInfoRTFromMDSMO(java.lang.String fileName, oracle.adf.share.LocaleApplicationKey localeAppkey)
           
static java.lang.String getAppBundleName()
           
static oracle.mds.core.MetadataObject getBaseBundleURLFromMDS(ResourceBundleType bundleType, java.lang.String bundleId)
           
static java.lang.String getBundleNameFromADFConfig(java.util.Locale locale, oracle.adf.share.ADFContext adfContext, oracle.adf.share.LocaleApplicationKey localeAppKey)
           
static java.lang.String getCompanionBundleOverrideDir()
          Returns the companion bundle override directory path read from adf-config.xml In case no override directory is specified,get the existing applicationBundleName directory path and add 'override' path to it for generating the companion override bundles.
static java.lang.String getCompBundleOverrideFileNameFromBundleId(java.lang.String bundleId)
          Returns the companion bundle override filename.
protected static java.lang.String getFileName(java.lang.String appBundleName)
           
protected static oracle.mds.core.MDSSession getMDSSession()
           
protected static oracle.mds.core.MetadataObject getMetadataObject(oracle.mds.core.MDSSession mdsSession, java.lang.String fileName, boolean writable)
           
static java.util.Map<java.lang.String,BundleRegistrationInfo> getResourceBundleOverrideListMap()
          This method will load and parse all reoursebundle override entry from either adf-config.xml or adf-settings.xml, save them as Map<String, BundleRegistrationInfo> object in ADFContext application scope, the map key used to retrieve is ResourceBundleUtils.XMLNS_RESBUNDLE_CTX_KEY
static java.lang.String getSystemProperty(java.lang.String propName)
           
static java.lang.String getTextString(org.w3c.dom.Node node)
          Gets the text from a dom node
static java.util.List<java.lang.String> getTrimmedCCLayerNames(oracle.mds.core.MDSSession mdsSession)
           
static boolean isBundleOverridden(java.lang.String bundleId)
           
static boolean isBundleToBeReadFromMDS(java.lang.String bundleId)
           
static boolean isCustomizationMode()
          Checks if customization mode is true/false.
static boolean isLoadXliffNoteAtStartup()
           
static boolean isMetadataEqual(java.util.Map<java.lang.String,java.lang.String> newMetadata, java.util.Map<java.lang.String,java.lang.String> oldMetadata)
          Compares metadata to determine if they are equal
static boolean isOverrideDocExistsInMDS(java.lang.String overrideFileName)
          Check for the existence of the doc in MDS using MDS P-Layer API.This uses the MDS DocumentCache and by-passes core level lookup thereby improving response time in determining existence of the doc in MDS.
protected static void putAppBundleInfoRTIntoMDSClientCache(oracle.adf.share.LocaleApplicationKey localeAppKey, AppBundleInfoRT appBundleInfo, java.lang.String fileName, java.util.Locale locale)
           
static ResourceBundleCacheConfig readAdfConfigCacheAttributes()
          Returns the ResourceBundleCacheConfig instance to be used to store cache related metadata from adf-config.xml.
static java.lang.String stripUnicodeEscapes(java.lang.String inString)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

ADF_CONFIG_CHILD

public static final java.lang.String ADF_CONFIG_CHILD
See Also:
Constant Field Values

ADF_SETTINGS_CHILD

public static final java.lang.String ADF_SETTINGS_CHILD
See Also:
Constant Field Values

ADF_NAMESPACE

public static final java.lang.String ADF_NAMESPACE
See Also:
Constant Field Values

ADF_CONFIG

public static final java.lang.String ADF_CONFIG
See Also:
Constant Field Values

XMLNS

public static final java.lang.String XMLNS
See Also:
Constant Field Values

XMLNS_RESBUNDLE

public static final java.lang.String XMLNS_RESBUNDLE
See Also:
Constant Field Values

XMLNS_RESBUNDLE_CTX_KEY

public static final java.lang.String XMLNS_RESBUNDLE_CTX_KEY
See Also:
Constant Field Values

XMLNS_RESBUNDLE_SETTINGS

public static final java.lang.String XMLNS_RESBUNDLE_SETTINGS
See Also:
Constant Field Values

APP_BUNDLE_NODE

public static final java.lang.String APP_BUNDLE_NODE
See Also:
Constant Field Values

BUNDLE_LIST_NODE

public static final java.lang.String BUNDLE_LIST_NODE
See Also:
Constant Field Values

BUNDLE_ID_NODE

public static final java.lang.String BUNDLE_ID_NODE
See Also:
Constant Field Values

OVERRIDE_ATTRIBUTE

public static final java.lang.String OVERRIDE_ATTRIBUTE
See Also:
Constant Field Values

BUNDLEID_SOURCE_ATTRIBUTE

public static final java.lang.String BUNDLEID_SOURCE_ATTRIBUTE
See Also:
Constant Field Values

BUNDLEID_METADATASTORE_USAGE

public static final java.lang.String BUNDLEID_METADATASTORE_USAGE
See Also:
Constant Field Values

RESOURCE_BUNDLE_CACHE_NODE

public static final java.lang.String RESOURCE_BUNDLE_CACHE_NODE
See Also:
Constant Field Values

INITIAL_SIZE_ATTRIBUTE

public static final java.lang.String INITIAL_SIZE_ATTRIBUTE
See Also:
Constant Field Values

MAX_SIZE_ATTRIBUTE

public static final java.lang.String MAX_SIZE_ATTRIBUTE
See Also:
Constant Field Values

LOAD_FACTOR_ATTRIBUTE

public static final java.lang.String LOAD_FACTOR_ATTRIBUTE
See Also:
Constant Field Values

EXPIRE_SECONDS

public static final java.lang.String EXPIRE_SECONDS
See Also:
Constant Field Values

EXPIRE_TIME

public static final java.lang.String EXPIRE_TIME
See Also:
Constant Field Values

LOAD_XLIFF_NOTE_ELEMENT_NODE

public static final java.lang.String LOAD_XLIFF_NOTE_ELEMENT_NODE
See Also:
Constant Field Values

LOAD_XLIFF_NOTE_ELEMENT_ATTRIBUTE

public static final java.lang.String LOAD_XLIFF_NOTE_ELEMENT_ATTRIBUTE
See Also:
Constant Field Values

COMP_BUNDLE_OVERRIDE_DIRECTORY_SEPARATOR

public static final java.lang.String COMP_BUNDLE_OVERRIDE_DIRECTORY_SEPARATOR
See Also:
Constant Field Values

CUSTHINT_VALUE_SEPARATOR

public static final java.lang.String CUSTHINT_VALUE_SEPARATOR
See Also:
Constant Field Values

Constructor Detail

ResourceBundleUtils

protected ResourceBundleUtils()

Method Detail

isMetadataEqual

public static boolean isMetadataEqual(java.util.Map<java.lang.String,java.lang.String> newMetadata,
                                      java.util.Map<java.lang.String,java.lang.String> oldMetadata)
Compares metadata to determine if they are equal
Parameters:
newMetadata - new metadata
oldMetadata - old metadata
Returns:
true if they are the same; false otherwise

convertMetadataToString

public static java.lang.String convertMetadataToString(java.util.Map<java.lang.String,java.lang.String> metadata)

convertMetadataToDisplayString

public static java.lang.String convertMetadataToDisplayString(java.util.Map<java.lang.String,java.lang.String> map)

convertStringToMetadata

public static java.util.Map<java.lang.String,java.lang.String> convertStringToMetadata(java.lang.String metadataString)

createConfigMap

public static java.util.Map createConfigMap(org.w3c.dom.Element el)
Used to create a map from the ADFConfig data for resource bundles.
Parameters:
el - Should either be the element that represents the root of the resource bundle data or the document element

isLoadXliffNoteAtStartup

public static boolean isLoadXliffNoteAtStartup()

getTextString

public static java.lang.String getTextString(org.w3c.dom.Node node)
Gets the text from a dom node
Parameters:
node - the node to get the text from
Returns:
the text in the node

getAppBundleInfo

public static AppBundleInfo getAppBundleInfo()

getAppBundleInfoForLocale

public static AppBundleInfo getAppBundleInfoForLocale(java.util.Locale locale)

getAppBundleInfoForLocale

public static AppBundleInfo getAppBundleInfoForLocale(java.util.Locale locale,
                                                      java.lang.String bundleId)
Creates the AppBundleInfoRT instance per locale and bundleid. This is required for the companion bundle approach where each base bundleid will need to be associated with an AppBundleInfoRT object as a pointer to the override bundle chain specific to the base bundle.
Parameters:
locale -
bundleId -
Returns:
AppBundleInfoRT instance associated with this bundleid

getADFContext

public static oracle.adf.share.ADFContext getADFContext()
Gets the ADFContext
Returns:
the current ADFContext or null

getADFConfig

public static oracle.adf.share.ADFConfig getADFConfig()
Gets the ADFConfig
Returns:
the ADFConfig or null

getResourceBundleOverrideListMap

public static final java.util.Map<java.lang.String,BundleRegistrationInfo> getResourceBundleOverrideListMap()
This method will load and parse all reoursebundle override entry from either adf-config.xml or adf-settings.xml, save them as Map<String, BundleRegistrationInfo> object in ADFContext application scope, the map key used to retrieve is ResourceBundleUtils.XMLNS_RESBUNDLE_CTX_KEY
Returns:
Map<String, BundleRegistrationInfo> representing a map of BundleRegistrationInfo where bundleId is unique key in the map

isBundleOverridden

public static boolean isBundleOverridden(java.lang.String bundleId)

isBundleToBeReadFromMDS

public static boolean isBundleToBeReadFromMDS(java.lang.String bundleId)

getBaseBundleURLFromMDS

public static oracle.mds.core.MetadataObject getBaseBundleURLFromMDS(ResourceBundleType bundleType,
                                                                     java.lang.String bundleId)

getSystemProperty

public static final java.lang.String getSystemProperty(java.lang.String propName)

createNewParentList

public static java.util.List<java.lang.String> createNewParentList(java.util.List<java.lang.String> fileNames,
                                                                   java.lang.String currentFile)

getAppBundleName

public static java.lang.String getAppBundleName()

getBundleNameFromADFConfig

public static java.lang.String getBundleNameFromADFConfig(java.util.Locale locale,
                                                          oracle.adf.share.ADFContext adfContext,
                                                          oracle.adf.share.LocaleApplicationKey localeAppKey)

getMDSSession

protected static oracle.mds.core.MDSSession getMDSSession()

getFileName

protected static java.lang.String getFileName(java.lang.String appBundleName)

getAppBundleInfoRTFromMDSMO

protected static AppBundleInfoRT getAppBundleInfoRTFromMDSMO(java.lang.String fileName,
                                                             oracle.adf.share.LocaleApplicationKey localeAppkey)

putAppBundleInfoRTIntoMDSClientCache

protected static void putAppBundleInfoRTIntoMDSClientCache(oracle.adf.share.LocaleApplicationKey localeAppKey,
                                                           AppBundleInfoRT appBundleInfo,
                                                           java.lang.String fileName,
                                                           java.util.Locale locale)

getMetadataObject

protected static oracle.mds.core.MetadataObject getMetadataObject(oracle.mds.core.MDSSession mdsSession,
                                                                  java.lang.String fileName,
                                                                  boolean writable)

createMetadataObject

protected static oracle.mds.core.MetadataObject createMetadataObject(oracle.mds.core.MDSSession mdsSession,
                                                                     java.lang.String fileName,
                                                                     java.util.Locale locale)

createMOReference

public static oracle.mds.core.MOReference createMOReference(java.lang.String appOverrideFile)

isCustomizationMode

public static boolean isCustomizationMode()
Checks if customization mode is true/false. oracle.adf.share.resourcebundle.isCustomizationMode is defined in META-INF/adf-settings.xml of resourcebundle.jar and the default is set to false. ApplCore ProfileConfigPropertyProviderImpl can dynamically override the default value of the above profile option.It can be changed via FND UI as well. Resourcebundle will use properties fwk to read the value of oracle.adf.share.resourcebundle.isCustomizationMode.
Returns:
true/false . Default is false. TODO : To see if we can cache this in app scope using CachedConfigPropertyManager.

isOverrideDocExistsInMDS

public static boolean isOverrideDocExistsInMDS(java.lang.String overrideFileName)
Check for the existence of the doc in MDS using MDS P-Layer API.This uses the MDS DocumentCache and by-passes core level lookup thereby improving response time in determining existence of the doc in MDS.
Parameters:
overrideFileName - Override file to check existence in MDS
Returns:
true if the overridebundle can be found in MDS or current mds session has pending changes. false if the overridebundle doesn't exist in MDS and if there are no pending changes in the current mdssession (equivalent of calling mdsSession.hasChanges())

getCompBundleOverrideFileNameFromBundleId

public static java.lang.String getCompBundleOverrideFileNameFromBundleId(java.lang.String bundleId)
Returns the companion bundle override filename. Companion bundle override file name will be as below: CompanionBundleOverrideDir+bundleId
Parameters:
bundleId -
Returns:
companion bundle override filename

getCompanionBundleOverrideDir

public static java.lang.String getCompanionBundleOverrideDir()
Returns the companion bundle override directory path read from adf-config.xml In case no override directory is specified,get the existing applicationBundleName directory path and add 'override' path to it for generating the companion override bundles.
Returns:
companion bundle override directory path

readAdfConfigCacheAttributes

public static ResourceBundleCacheConfig readAdfConfigCacheAttributes()
Returns the ResourceBundleCacheConfig instance to be used to store cache related metadata from adf-config.xml.
Returns:
ResourceBundleCacheConfig

getTrimmedCCLayerNames

public static java.util.List<java.lang.String> getTrimmedCCLayerNames(oracle.mds.core.MDSSession mdsSession)

addUnicodeEscapes

public static java.lang.String addUnicodeEscapes(java.lang.String theString,
                                                 boolean escapeSpace)

stripUnicodeEscapes

public static java.lang.String stripUnicodeEscapes(java.lang.String inString)

Skip navigation links

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

E67661-01


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