|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.iscreen.impl.ConfiguredResource
public class ConfiguredResource
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.
Constructor Summary | |
---|---|
ConfiguredResource()
Default constructor. |
Method Summary | |
---|---|
void |
addMessage(java.lang.String key,
java.lang.String value)
Adds an individual message as a resource, available via its key. |
void |
addResourceFile(java.lang.String location)
Adds a resource bundle based upon its classpath location. |
void |
addResourceFiles(java.util.Set fileSet)
Adds a Set of resource bundle locations (Set of String objects). |
java.lang.String |
getValue(java.lang.String key,
java.util.Locale locale)
Gets the value of the message key. |
void |
setId(java.lang.String theId)
Sets the id of the resource. |
void |
setRef(ConfiguredResource resource)
Sets a reference to another ConfiguredResource. |
java.lang.String |
toString()
For debug info. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConfiguredResource()
Method Detail |
---|
public void addMessage(java.lang.String key, java.lang.String value)
key
- The key to the message resourcevalue
- The value of the messagepublic void addResourceFile(java.lang.String location)
location
- The classpath location of the resource bundle.public void addResourceFiles(java.util.Set fileSet)
fileSet
- A Set of Strings representing resource bundles.public void setRef(ConfiguredResource resource)
resource
- The "parent" resource.public void setId(java.lang.String theId)
theId
- The id of the resource.public java.lang.String getValue(java.lang.String key, java.util.Locale locale)
getValue
in interface Resource
key
- The message keylocale
- The locale to use in retrieving the value.
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |