|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.2.0) E17493-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.javatools.resourcebundle.ResourceBundleUtils
oracle.ide.resourcebundle.ResourceBundleUtils
public final class ResourceBundleUtils
ResourceBundleUtils
provides utility routines needed by the ResourceBundleManager
and ResourceBundleKeyChooser
. Methods in this class should not be used by others.
Field Summary | |
---|---|
protected static java.lang.String |
RESBUNDLE_DT_EXTENSION_ID |
Fields inherited from class oracle.javatools.resourcebundle.ResourceBundleUtils |
---|
ADF_CONFIG, ADF_CONFIG_CHILD, ADF_NAMESPACE, APP_BUNDLE_NODE, BUNDLE_ID_NODE, BUNDLE_LIST_NODE, EXPIRE_SECONDS, EXPIRE_TIME, INITIAL_SIZE_ATTRIBUTE, LOAD_FACTOR_ATTRIBUTE, MAX_SIZE_ATTRIBUTE, OVERRIDE_ATTRIBUTE, RESOURCE_BUNDLE_CACHE_NODE, XMLNS, XMLNS_RESBUNDLE |
Method Summary | |
---|---|
static boolean |
alwaysPromptForDescription(PropertyStorage propStorage) Gets whether the project is set to always prompt for a description |
static java.lang.String |
buildQualifiedName(PropertyStorage propStorage, java.lang.String baseName) Builds a qualified bundle name by using the default package name for the project and adding that to the base name |
static java.lang.String |
deriveBundleId(PropertyStorage propStorage, java.net.URL bundleURL) Attempts to derive a bundleId for the specified URL based on it being part of the specified project |
static java.lang.String |
deriveBundleId(PropertyStorage propStorage, java.net.URL bundleURL, boolean bProjectOnly) |
static java.lang.String |
deriveBundleIdForJAR(java.net.URL libraryURL, java.net.URL selectedBundleURL) Derives a bundleId for a bundle selected from an ADF Library Package-protected only so that unit tests can access, no other code should use this |
static ResourceBundleWrapper |
findBundleInADFLibrary(PropertyStorage propStorage, java.net.URL libraryURL, java.lang.String bundleId) Finds the ResourceBundleWrapper for the specified bundleId in the specified ADF library |
static java.util.List<java.net.URL> |
findExistingBundles(PropertyStorage propStorage, java.lang.String bundleId) Finds URLS that already exist for the specified bundle id. |
static int |
getBundleCreationPolicy(PropertyStorage propStorage) Gets the bundle creation policy for the specified project |
static java.lang.String |
getBundleId(ResourceBundleWrapper bundle) Gets the bundle id from this bundle. |
static java.util.List<java.lang.String> |
getDefaultBundleNameForProject(PropertyStorage project) Returns the bundle names that may be used for a project. |
static java.util.List<java.lang.String> |
getDefaultBundleNameForWorkspace(PropertyStorage workspace) Returns the default bundle name that may be used for a workspace. |
static ResourceBundleType |
getDefaultResourceBundleType(PropertyStorage propStorage) Gets the default resource bundle type for the specified project |
static java.awt.Dialog |
getParentDialog(java.awt.Component parentComponent) |
static ResourceBundleConstants.BundleTypes |
getTypeFromBundle(ResourceBundleWrapper bundle) Gets the type of the specified ResourceBundleWrapper |
static java.net.URL |
getURL(NodeResourceBundle bundle) Used to determine the URL that stores the resources. |
static java.lang.String |
getUserHomeDir() |
static boolean |
isAutomaticallySynchronized(PropertyStorage propStorage) Gets whether the project is set to automatically synchronize strings into resource bundles |
static boolean |
isBundleReadOnly(NodeResourceBundle bundle) Returns whether the bundle should be treated as read-only. |
static boolean |
isBundleReadOnly(NodeResourceBundle bundle, boolean bCheckout) |
static boolean |
isDefaultBundleForProject(PropertyStorage project, java.lang.String bundleId) |
static boolean |
isRoleSettingBundlesReadOnly() |
protected static boolean |
isSourceControlled(java.net.URL url) |
static java.lang.String |
replaceNewLines(java.lang.String string) Replaces new lines in the string with an escape of the new line |
static java.lang.String |
replaceWhitespace(java.lang.String string) Replaces whitespace in the string with an underline character |
static ResourceBundleKey |
showEditDialog(java.awt.Component owner, NodeResourceBundle bundle, java.lang.String key, PropertyStorage project, java.lang.String bundleDisplayString) Shows a dialog for editing a resource |
static Pair |
splitFileFromPath(java.lang.String bundleId) Takes a bundle id (which is a fully-qualified name of a bundle) and splits it into the file name and the path. |
static boolean |
warnAboutHardcodedNontranslatedStrings(PropertyStorage propStorage) Gets whether the project is set to report nontranslatable strings as violations |
Methods inherited from class oracle.javatools.resourcebundle.ResourceBundleUtils |
---|
addUnicodeEscapes, convertMetadataToDisplayString, convertMetadataToString, convertStringToMetadata, createConfigMap, createNewParentList, getADFConfig, getADFContext, getAppBundleInfo, getAppBundleInfoForLocale, getSystemProperty, getTextString, isMetadataEqual, stripUnicodeEscapes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String RESBUNDLE_DT_EXTENSION_ID
Method Detail |
---|
public static int getBundleCreationPolicy(PropertyStorage propStorage)
propStorage
- The current PropertyStorage's Data that owns this file.public static boolean isAutomaticallySynchronized(PropertyStorage propStorage)
propStorage
- The current PropertyStorage's Data that owns this file.public static boolean warnAboutHardcodedNontranslatedStrings(PropertyStorage propStorage)
propStorage
- The current PropertyStorage's Data that owns this file.public static boolean alwaysPromptForDescription(PropertyStorage propStorage)
propStorage
- The current PropertyStorage's data that owns this filepublic static ResourceBundleType getDefaultResourceBundleType(PropertyStorage propStorage)
propStorage
- The current PropertyStorage's Data that owns this file.public static java.lang.String getBundleId(ResourceBundleWrapper bundle)
bundle
- The bundle to get the id forpublic static Pair splitFileFromPath(java.lang.String bundleId)
package1.package1.fileName
will be split into a file name of fileName
and put into the first element of the Pair, and the path portion will be converted to package1/package2
and put into the second element of the Pair.bundleId
- string representing the fully-qualified name of the bundlepublic static java.util.List<java.net.URL> findExistingBundles(PropertyStorage propStorage, java.lang.String bundleId)
propStorage
- The current PropertyStorage's Data that owns this file.bundleId
- fully-qualified name of the bundlepublic static ResourceBundleWrapper findBundleInADFLibrary(PropertyStorage propStorage, java.net.URL libraryURL, java.lang.String bundleId)
ResourceBundleWrapper
for the specified bundleId in the specified ADF libraryproject
- the projectlibraryURL
- the URL of the ADF LibrarybundleId
- fully-qualifief bundle namepublic static ResourceBundleConstants.BundleTypes getTypeFromBundle(ResourceBundleWrapper bundle)
bundle
- the bundle to determine the type ofpublic static java.net.URL getURL(NodeResourceBundle bundle)
bundle
- the bundle to get the url forpublic static java.lang.String deriveBundleId(PropertyStorage propStorage, java.net.URL bundleURL)
propStorage
- the PropertyStorage that owns the bundlebundleURL
- the URL that stores the bundle datapublic static java.lang.String deriveBundleId(PropertyStorage propStorage, java.net.URL bundleURL, boolean bProjectOnly)
public static boolean isDefaultBundleForProject(PropertyStorage project, java.lang.String bundleId)
public static java.util.List<java.lang.String> getDefaultBundleNameForWorkspace(PropertyStorage workspace)
workspace
-public static java.util.List<java.lang.String> getDefaultBundleNameForProject(PropertyStorage project)
project
-public static java.lang.String buildQualifiedName(PropertyStorage propStorage, java.lang.String baseName)
project
-baseName
-public static boolean isRoleSettingBundlesReadOnly()
public static boolean isBundleReadOnly(NodeResourceBundle bundle)
bundle
-public static boolean isBundleReadOnly(NodeResourceBundle bundle, boolean bCheckout)
protected static boolean isSourceControlled(java.net.URL url)
public static java.lang.String replaceNewLines(java.lang.String string)
string
-public static final ResourceBundleKey showEditDialog(java.awt.Component owner, NodeResourceBundle bundle, java.lang.String key, PropertyStorage project, java.lang.String bundleDisplayString)
owner
- the component that should own the dialogbundle
- the bundle that contains the key (must not be null)key
- the key to be edited (must not be null)project
- the project (must not be null)bundleDisplayString
- a string to display as the bundle that is being edited. This may be null and is only necessary when the dialog is opened from the SelectTextPanel when multiple bundles are being searched.public static java.lang.String replaceWhitespace(java.lang.String string)
string
-public static java.awt.Dialog getParentDialog(java.awt.Component parentComponent)
public static java.lang.String deriveBundleIdForJAR(java.net.URL libraryURL, java.net.URL selectedBundleURL)
libraryURL
- the URL of the libraryselectedBundleURL
- the URL of the bundlepublic static java.lang.String getUserHomeDir()
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.2.0) E17493-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |