com.ibm.workplace.wcm.api.plugin.textprovider
Interface TextProvider

All Superinterfaces:
AuthoringPlugin, Localized
All Known Implementing Classes:
TextProviderAdapter

public interface TextProvider
extends AuthoringPlugin, Localized

Interface for providing localized title and description values for use in the Web Content Manager Authoring UI. This class extends com.ibm.portal.Localized which is documented in the WebSphere Portal Infocenter. Contribute your rendering plugin to WCM by using an Eclipse extension point "com.ibm.workplace.wcm.api.TextProvider". Refer to the product documentation for more information. Extend TextProviderAdapter to create a TextProvider backed by a ResourceBundle.

Since:
7.0
Note:
This interface is designed to be implemented by clients.

Method Summary
 java.util.Collection<java.lang.String> getProviderKeys()
          Get the list of keys that are defined for this text provider
 java.lang.String getProviderName()
          Get the name for this text provider.
 java.lang.String getString(java.lang.String key, java.util.Locale locale)
          Retrieves a text string using the given key, in the given locale.
 boolean isShownInAuthoringUI()
          This property should return true if the plugin will be selectable through the Web Content Manager Authoring UI for use in item and element titles, descriptions and help text etc.
 
Methods inherited from interface com.ibm.portal.Localized
getDescription, getLocales, getTitle
 

Method Detail

getProviderName

java.lang.String getProviderName()
Get the name for this text provider. Names should be unique across all registered providers and have a maximum length of 200 characters.

Returns:
the unique provider name

getString

java.lang.String getString(java.lang.String key,
                           java.util.Locale locale)
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.

Parameters:
key - the key for retrieving the text string
locale - locale to display
Returns:
the localized text

getProviderKeys

java.util.Collection<java.lang.String> getProviderKeys()
Get the list of keys that are defined for this text provider

Returns:
a list of keys used in this text provider

isShownInAuthoringUI

boolean isShownInAuthoringUI()
This property should return true if the plugin will be selectable through the Web Content Manager Authoring UI for use in item and element titles, descriptions and help text etc. It should be false if the plugin is to be hidden in these selectors. If this property is false, the user can still manually enter the name of the plugin in order to use it. Hidden plugins can also be used in the TextProvider Rendering plugin, eg: [Plugin:TextProvider provider="myHiddenProviderName" key=..."] so, they are a convenient way to reference a resource bundle from with the design.

Specified by:
isShownInAuthoringUI in interface AuthoringPlugin
Returns:
true to make the plugin selectable, false to hide it in the selectors