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.rendering
Class ValueOptionImpl

    java.lang.Object
      com.ibm.workplace.wcm.api.plugin.rendering.ValueOptionAdapter
          com.ibm.workplace.wcm.api.plugin.rendering.ValueOptionImpl

All Implemented Interfaces:
  Localized, ValueOption

    public class ValueOptionImpl

extends ValueOptionAdapter

Simple concrete implementation of `ValueOptionAdapter`. Example usage: RenderingPluginParameter myRenderingPluginParameter = new RenderingPluginParameterImpl("MyRenderingParameter").allowedValues(new ValueOptionImpl("MyValueOption1"), new ValueOptionImpl("MyValueOption2"));

Since:
  8.5

Constructor Summary
`ValueOptionImpl(java.lang.String p_name)` Constructor

Method Summary
`java.lang.String` | `getDescription(java.util.Locale p_locale)` Get the translated description of the value option.
`ListModel<java.util.Locale>` | `getLocales()` Returns a list model containing the locales that are supported by this object.
`java.lang.String` | `getTitle(java.util.Locale p_locale)` Get the translated title of the value option.

Methods inherited from class com.ibm.workplace.wcm.api.plugin.rendering.ValueOptionAdapter
`getName, toString`

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

Constructor Detail

### ValueOptionImpl

    public ValueOptionImpl(java.lang.String p_name)

  Constructor

  Parameters:
    `p_name` - allowed value name

Method Detail

### getTitle

    public java.lang.String getTitle(java.util.Locale p_locale)

  Description copied from interface: `ValueOption`
  Get the translated title of the value option.

  Parameters:
    `p_locale` - the locale for which to retrieve the title, must not be `null`.
  Returns:
    the title of this node in the given locale. If a title is not available in the given locale, this method will return `null`. It is up to the invoker of the method to implement an appropriate fallback mechanism.
  See Also:
    `ValueOption.getTitle(java.util.Locale)`

### getDescription

    public java.lang.String getDescription(java.util.Locale p_locale)

  Description copied from interface: `ValueOption`
  Get the translated description of the value option.

  Parameters:
    `p_locale` - the locale for which to retrieve the description, must not be `null`.
  Returns:
    the description of this node in the given locale. If a description is not available in the given locale, this method will return `null`. It is up to the invoker of the method to implement an appropriate fallback mechanism
  See Also:
    `ValueOption.getDescription(java.util.Locale)`

### getLocales

    public ListModel<java.util.Locale> getLocales()

  Description copied from interface: `Localized`
  Returns a list model containing the locales that are supported by this object. The presence of a locale in this list does not mean that a title and description is available, but rather that either one or both are available in that locale.

  Returns:
    a list of locales defined for this object, returns an empty `ListModel` if no locales are supported.
  See Also:
    `Localized.getLocales()`

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