Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Team Productivity Center
11g Release 1 (11.1.1)
E14128-01


oracle.alm.common
Interface AlmResource


public interface AlmResource

The AlmResource provides an interface for a connector writer to access any localized string stored in connector's resource bundle. Such string can be retrieved by providing appropriate key to the resource bundle programmatically. Resource bundles are stored in XML-format files in the connector source. They are normally located inside the META-INF\res folder of the connector directory. For example, a connector may have two resource files defined in its META-INF\res folder: modelresource.xml and uiresource.xml.

Following code snippet illustrates how to use AlmResource to get resource bundle on the connector side


   RepositoryDef repoDef = getRepositoryDef();
   AlmResource res = repoDef.getResource();
   String resObj = (String) res.getResource(Locale.getDefault(), "BUG_PRIORITY");

 

More examples may be available in the Sample connector.

Since:
11.1.1.1.0
See Also:
WorkItemDef

Method Summary
 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.

 

Method Detail

getResource

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.

Parameters:
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 object
Returns:
an object for the given key and locale

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Team Productivity Center
11g Release 1 (11.1.1)
E14128-01


Copyright © 1998,2009, Oracle. All rights reserved.