Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.workplace.wcm.api.plugin.textprovider
Class TextProviderAdapter

    java.lang.Object
      com.ibm.workplace.wcm.api.plugin.textprovider.TextProviderAdapter

All Implemented Interfaces:
  Localized, AuthoringPlugin, TextProvider

    public abstract class TextProviderAdapter

extends java.lang.Object
implements TextProvider

A text provider adapter implementation backed by a specified `ResourceBundle`. Override the protected method to create an implementation of `TextProvider`. The provider keys will be sorted alphabetically in the locale returned by `Localized.getLocales()`.

Since:
  8.5 CF2
Note:

  This interface is designed to be implemented by clients.

Constructor Summary
`TextProviderAdapter()`

Method Summary
`java.util.Collection<java.lang.String>` | `getProviderKeys()` Get the list of keys that are defined for this text provider
`protected abstract java.lang.String` | `getResourceBundleName()` Override this to return the name of the `ResourceBundle` to use.
`java.lang.String` | `getString(java.lang.String key, java.util.Locale locale)` Retrieves a text string using the given key, in the given locale.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.ibm.workplace.wcm.api.plugin.textprovider.TextProvider
`getProviderName, isShownInAuthoringUI`

Methods inherited from interface com.ibm.portal.Localized
`getDescription, getLocales, getTitle`

Constructor Detail

### TextProviderAdapter

    public TextProviderAdapter()

Method Detail

### getResourceBundleName

    protected abstract java.lang.String getResourceBundleName()

  Override this to return the name of the `ResourceBundle` to use. For example: "com.example.MyBundle".

  Returns:
    the name of the resource bundle

### getString

    public java.lang.String getString(java.lang.String key,
                                      java.util.Locale locale)

  Description copied from interface: `TextProvider`
  Retrieves a text string using the given key, in the given locale. If no entry is found for the given key, null is returned. The given locale is the locale that the Portal has chosen for the user, based on their locale as specified in the request, the locales supported by the Portal, and the locales supported by the text provider. Otherwise stated, this a locale that is guaranteed to be supported by both the Portal and this TextProvider.

  Specified by:
    `getString` in interface `TextProvider`
  Parameters:
    `key` - the key for retrieving the text string
    `locale` - locale to display
  Returns:
    the localized text

### getProviderKeys

    public java.util.Collection<java.lang.String> getProviderKeys()

  Description copied from interface: `TextProvider`
  Get the list of keys that are defined for this text provider

  Specified by:
    `getProviderKeys` in interface `TextProvider`
  Returns:
    a list of keys used in this text provider

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD