|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.6.0) E13403-07 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.javatools.resourcebundle.ResourceBundleWrapperRT
public abstract class ResourceBundleWrapperRT
The ResourceBundleWrapperRT
provides some of the base
implementation of a ResourceBundleWrapper
for run-time. Any
implementation of a resource bundle wrapper for run-time must extend
this class for proper functioning in the run-time version of the
ResourceBundleManager
Nested Class Summary | |
---|---|
protected static class |
ResourceBundleWrapperRT.SearchType
SearchType (EXACT_MATCH, CONTAINS_MATCH, or METADATA_MATCH) |
Nested classes/interfaces inherited from interface oracle.javatools.resourcebundle.ResourceBundleWrapper |
---|
ResourceBundleWrapper.KeyInfo |
Field Summary | |
---|---|
protected ResourceBundleWrapperRT |
_parent
|
Constructor Summary | |
---|---|
ResourceBundleWrapperRT()
|
Method Summary | |
---|---|
java.lang.String |
addEntry(java.lang.String text,
java.util.Map<java.lang.String,java.lang.String> metadata)
Adds a new entry (value, and optional metadata) into the resource bundle and returns an automatically generated resource bundle key. |
boolean |
addEntry(java.lang.String key,
java.lang.String text,
java.util.Map<java.lang.String,java.lang.String> metadata)
Adds a new entry (key, value, and optional metadata) into the resource bundle. |
ResourceBundleOperationResult |
addEntryNoDialog(java.lang.String key,
java.lang.String text,
java.util.Map<java.lang.String,java.lang.String> metadata)
Adds a new entry (key, value, and optional metadata) into the resource bundle. |
void |
addResourceBundleListener(ResourceBundleListener listener)
Registers a listener to receive ResourceBundleEvent s
when the contents of the resource bundle change. |
boolean |
deleteEntry(java.lang.String key)
Deletes the resource bundle entry identified by key . |
protected java.util.Set<java.lang.String> |
findKeys(ResourceBundleWrapperRT.SearchType searchType,
java.lang.Object searchConstraint)
Returns a set of keys that satisfy the search |
java.lang.String |
getBundleId()
Gets the bundleId associated with this instance of ResourceBundleWrapper |
java.util.Map<java.lang.String,java.lang.String> |
getChainedKeyValueMap()
Gets the key-value map for the bundle chained with any parent bundles For example, if the bundle is for BundleA_en_US the parent chain will include BundleA_en and Bundle |
ResourceBundleKeyGenerator |
getKeyGenerator()
Gets the key generator to use for making an automatic key name |
abstract java.util.Map<java.lang.String,java.lang.String> |
getKeyValueMap()
Gets the map of key-values for this bundle. |
protected java.util.Map<java.lang.String,java.lang.String> |
getMetadataFromParentChain(java.lang.String key)
|
protected ResourceBundleWrapperRT |
getParent()
|
java.util.List<ResourceBundleWrapperRT> |
getParentChain()
|
protected java.util.List<java.lang.String> |
getParentList()
|
java.lang.String |
getString(java.lang.String key)
Gets the translated text (value) identified by key |
protected abstract void |
parse(java.net.URL url)
|
boolean |
refreshBundleIfNeeded(java.lang.Exception ex)
|
void |
removeResourceBundleListener(ResourceBundleListener listener)
Removes a listener that received ResourceBundleEvent s. |
void |
setBundleId(java.lang.String bundleId)
Sets the bundleId associated with this instance of ResourceBundleWrapper |
void |
setKeyGenerator(ResourceBundleKeyGenerator generator)
Sets the key generator to use when using an automatic key name from ResourceBundleWrapper.addEntry(String,Map) . |
void |
setParentList(java.util.List<java.lang.String> parentList)
|
void |
setURL(java.net.URL url)
|
java.lang.String |
toString()
|
boolean |
updateEntry(java.lang.String key,
java.lang.String text,
java.util.Map<java.lang.String,java.lang.String> metadata)
Updates the specified key to have the specified text and metadata. |
ResourceBundleOperationResult |
updateEntryNoDialog(java.lang.String key,
java.lang.String text,
java.util.Map<java.lang.String,java.lang.String> metadata)
Updates the specified key to have the specified text and metadata while not showing any dialog |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface oracle.javatools.resourcebundle.ResourceBundleWrapper |
---|
findKeysByMetaData, findKeysByText, findKeysLikeKey, findKeysLikeText, getMetadata, keySet |
Field Detail |
---|
protected ResourceBundleWrapperRT _parent
Constructor Detail |
---|
public ResourceBundleWrapperRT()
Method Detail |
---|
public void setURL(java.net.URL url)
public void setBundleId(java.lang.String bundleId)
ResourceBundleWrapper
setBundleId
in interface ResourceBundleWrapper
bundleId
- the id of the bundlepublic java.lang.String getBundleId()
ResourceBundleWrapper
getBundleId
in interface ResourceBundleWrapper
protected abstract void parse(java.net.URL url)
public abstract java.util.Map<java.lang.String,java.lang.String> getKeyValueMap()
protected java.util.Set<java.lang.String> findKeys(ResourceBundleWrapperRT.SearchType searchType, java.lang.Object searchConstraint)
searchType
- one of the valid search typessearchConstraint
- a text string or a map of strings if a metadata searchkeyMap
- a map containing keys and the associated values
public void setKeyGenerator(ResourceBundleKeyGenerator generator)
ResourceBundleWrapper
ResourceBundleWrapper.addEntry(String,Map)
.
setKeyGenerator
in interface ResourceBundleWrapper
generator
- The ResourceBundleKeyGenerator
to use.
if generator
is null
, then the default key generator
will be used.public ResourceBundleKeyGenerator getKeyGenerator()
ResourceBundleWrapper
getKeyGenerator
in interface ResourceBundleWrapper
public void setParentList(java.util.List<java.lang.String> parentList)
public java.lang.String getString(java.lang.String key)
ResourceBundleWrapper
key
getString
in interface ResourceBundleWrapper
key
- The key in the resource bundle
protected java.util.Map<java.lang.String,java.lang.String> getMetadataFromParentChain(java.lang.String key)
public java.util.Map<java.lang.String,java.lang.String> getChainedKeyValueMap()
protected ResourceBundleWrapperRT getParent()
public java.util.List<ResourceBundleWrapperRT> getParentChain()
protected java.util.List<java.lang.String> getParentList()
public boolean addEntry(java.lang.String key, java.lang.String text, java.util.Map<java.lang.String,java.lang.String> metadata)
ResourceBundleWrapper
addEntry
in interface ResourceBundleWrapper
key
- The key name to use in the resource bundle.text
- The text to be translated.metadata
- Any associated metadata about the translation string
This parameter may be null
true
on successpublic ResourceBundleOperationResult addEntryNoDialog(java.lang.String key, java.lang.String text, java.util.Map<java.lang.String,java.lang.String> metadata)
ResourceBundleWrapper
addEntryNoDialog
in interface ResourceBundleWrapper
key
- The key name to use in the resource bundle.text
- The text to be translated.metadata
- Any associated metadata about the translation string
This parameter may be null
public java.lang.String addEntry(java.lang.String text, java.util.Map<java.lang.String,java.lang.String> metadata)
ResourceBundleWrapper
addEntry
in interface ResourceBundleWrapper
text
- The text to be translated.metadata
- Any associated metadata about the translation string.
This parameter may be null
public boolean deleteEntry(java.lang.String key)
ResourceBundleWrapper
key
. If
key
does not exist, then a value of false
is returned.
deleteEntry
in interface ResourceBundleWrapper
key
- The key to delete
true
If the key is found and deleted success.public boolean updateEntry(java.lang.String key, java.lang.String text, java.util.Map<java.lang.String,java.lang.String> metadata)
ResourceBundleWrapper
updateEntry
in interface ResourceBundleWrapper
key
- The key to updatetext
- The new text for the given keymetadata
- Any metadata to change. Existing metadata is merged with
the new metadata, unless there is a key with a null value, then the
existing metadata for that key is removed. If metadata
is
null
then the existing metadata will be unchanged.
true
on successpublic ResourceBundleOperationResult updateEntryNoDialog(java.lang.String key, java.lang.String text, java.util.Map<java.lang.String,java.lang.String> metadata)
ResourceBundleWrapper
updateEntryNoDialog
in interface ResourceBundleWrapper
key
- The key to updatetext
- The new text for the given keymetadata
- Any metadata to change. Existing metadata is merged with
the new metadata, unless there is a key with a null value, then the
existing metadata for that key is removed. If metadata
is
null
then the existing metadata will be unchanged.
public void addResourceBundleListener(ResourceBundleListener listener)
ResourceBundleWrapper
listener
to receive ResourceBundleEvent
s
when the contents of the resource bundle change.
addResourceBundleListener
in interface ResourceBundleWrapper
listener
- the ResourceBundleListener
to registerResourceBundleListener
,
ResourceBundleEvent
public void removeResourceBundleListener(ResourceBundleListener listener)
ResourceBundleWrapper
listener
that received ResourceBundleEvent
s.
removeResourceBundleListener
in interface ResourceBundleWrapper
listener
- the ResourceBundleListener
to removeResourceBundleListener
,
ResourceBundleEvent
public java.lang.String toString()
toString
in class java.lang.Object
public boolean refreshBundleIfNeeded(java.lang.Exception ex)
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.6.0) E13403-07 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |