| java.lang.Object org.iscreen.impl.ConfiguredResource
ConfiguredResource | public class ConfiguredResource implements Resource(Code) | | Represents a Resource that includes its configuration. The Resource
handles resource bundle names and is able to load them dynamically
for different locales. In addition, it can have a "parent" reference to
another ConfiguredResource so that instances can be chained together.
When an instance refers to another "parent" resource, it overrides
any resources defined in the reference resource.
author: Shellman, Dan |
Method Summary | |
public void | addMessage(String key, String value) Adds an individual message as a resource, available via its
key. | public void | addResourceFile(String location) Adds a resource bundle based upon its classpath location. | public void | addResourceFiles(Set fileSet) Adds a Set of resource bundle locations (Set of String objects). | public String | getValue(String key, Locale locale) Gets the value of the message key.
Parameters: key - The message key Parameters: locale - The locale to use in retrieving the value. | public void | setId(String theId) Sets the id of the resource. | public void | setRef(ConfiguredResource resource) Sets a reference to another ConfiguredResource. | public String | toString() For debug info. |
ConfiguredResource | public ConfiguredResource()(Code) | | Default constructor.
|
addMessage | public void addMessage(String key, String value)(Code) | | Adds an individual message as a resource, available via its
key.
Parameters: key - The key to the message resource Parameters: value - The value of the message |
addResourceFile | public void addResourceFile(String location)(Code) | | Adds a resource bundle based upon its classpath location.
Parameters: location - The classpath location of the resource bundle. |
addResourceFiles | public void addResourceFiles(Set fileSet)(Code) | | Adds a Set of resource bundle locations (Set of String objects).
Parameters: fileSet - A Set of Strings representing resource bundles. |
getValue | public String getValue(String key, Locale locale)(Code) | | Gets the value of the message key.
Parameters: key - The message key Parameters: locale - The locale to use in retrieving the value. Returns the value of the message key. |
setId | public void setId(String theId)(Code) | | Sets the id of the resource.
Parameters: theId - The id of the resource. |
setRef | public void setRef(ConfiguredResource resource)(Code) | | Sets a reference to another ConfiguredResource. If a key value
isn't found in this resource, the referenced one will be checked.
Parameters: resource - The "parent" resource. |
toString | public String toString()(Code) | | For debug info.
Returns debug info. |
|
|