public interface AlmResource
The AlmResource
is the interface defining API for accessing TPC connector specific resource. TPC connector specific resources are defined in xml-formated resource file. In general, those TPC connector specific resources are defined and used declaratively, please refer to the TPC connector development guideline for more details.
At the same time, TPC connector can progmatically access connector specific resource in the code, as shown in following example:
More examples may be available in the Sample connector.RepositoryDef repoDef = workitemDef.getRepositoryDef(); AlmResource res = repoDef.getResource(); String resObj = (String) res.getResource(Locale.getDefault(), "BUG_PRIORITY");
Modifier and Type | Method and Description |
---|---|
void |
addResourceFile(java.lang.String resFileName) |
java.lang.Object |
getResource(java.util.Locale locale, java.lang.Object key)
Gets an object for the given key and locale from this resource bundle.
|
java.lang.Object |
getResource(java.util.Locale locale, java.lang.Object key, java.lang.String[] params)
Gets an object for the given key and locale, with the passed parameters from the resource bundle.
|
java.lang.Object getResource(java.util.Locale locale, java.lang.Object key)
Gets an object for the given key and locale from this resource bundle.
locale
- the locale for which a resource bundle is desired. Current supported locales are Locale.ENGLISH and Locale.JAPANESE.key
- the key for the desired objectjava.lang.Object getResource(java.util.Locale locale, java.lang.Object key, java.lang.String[] params)
locale
- the locale for which a resource bundle is desired. Current supported locales are Locale.ENGLISH and Locale.JAPANESE.key
- the key for the desired objectparams
- a String array representing passed values.void addResourceFile(java.lang.String resFileName)