|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
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 |
---|
Fields inherited from class oracle.javatools.resourcebundle.ResourceBundleUtils |
---|
ADF_CONFIG, ADF_CONFIG_CHILD, ADF_NAMESPACE, ADF_SETTINGS_CHILD, APP_BUNDLE_NODE, BUNDLE_ID_NODE, BUNDLE_LIST_NODE, EXPIRE_SECONDS, EXPIRE_TIME, INITIAL_SIZE_ATTRIBUTE, LOAD_FACTOR_ATTRIBUTE, LOAD_XLIFF_NOTE_ELEMENT_ATTRIBUTE, LOAD_XLIFF_NOTE_ELEMENT_NODE, MAX_SIZE_ATTRIBUTE, OVERRIDE_ATTRIBUTE, RESOURCE_BUNDLE_CACHE_NODE, XMLNS, XMLNS_RESBUNDLE, XMLNS_RESBUNDLE_CTX_KEY, XMLNS_RESBUNDLE_SETTINGS |
Method Summary | |
---|---|
static boolean |
alwaysPromptForDescription(PropertyStorage project) Gets whether the project is set to always prompt for a description |
static java.lang.String |
buildQualifiedName(PropertyStorage project, 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 project, 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 |
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(Project project, 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 project, java.lang.String bundleId) Finds URLS that already exist for the specified bundle id. |
static int |
getBundleCreationPolicy(PropertyStorage project) 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 ResourceBundleType |
getDefaultResourceBundleType(PropertyStorage project) Gets the default resource bundle type for the specified project |
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 boolean |
isAutomaticallySynchronized(PropertyStorage project) 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 void |
setADFRestricted(PropertyStorage project, boolean adfRestricted) Sets the ADFRestricted property of the ResourceBundleOptions for the specified project |
static ResourceBundleKey |
showEditDialog(java.awt.Component owner, NodeResourceBundle bundle, java.lang.String key, Project 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 project) Gets whether the project is set to report nontranslatable strings as violations |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int getBundleCreationPolicy(PropertyStorage project)
project
- The current Project's Data that owns this file.public static boolean isAutomaticallySynchronized(PropertyStorage project)
project
- The current Project's Data that owns this file.public static boolean warnAboutHardcodedNontranslatedStrings(PropertyStorage project)
project
- The current Project's Data that owns this file.public static boolean alwaysPromptForDescription(PropertyStorage project)
project
- the current project's data that owns this filepublic static ResourceBundleType getDefaultResourceBundleType(PropertyStorage project)
project
- The current Project'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 project, java.lang.String bundleId)
project
- The current Project's Data that owns this file.bundleId
- fully-qualified name of the bundlepublic static ResourceBundleWrapper findBundleInADFLibrary(Project project, 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 project, java.net.URL bundleURL)
project
- the project that owns the bundlebundleURL
- the URL that stores the bundle datapublic static void setADFRestricted(PropertyStorage project, boolean adfRestricted)
ResourceBundleOptions
for the specified projectproject
- The current Project's Data that owns this file.adfRestricted
- true if the project should is an ADF project; false otherwisepublic static boolean isDefaultBundleForProject(PropertyStorage project, java.lang.String bundleId)
public static java.util.List<java.lang.String> getDefaultBundleNameForProject(PropertyStorage project)
project
-public static java.lang.String buildQualifiedName(PropertyStorage project, 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, Project 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.lang.String deriveBundleIdForJAR(java.net.URL libraryURL, java.net.URL selectedBundleURL)
libraryURL
- the URL of the libraryselectedBundleURL
- the URL of the bundle
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |