com.sap.tc.webdynpro.progmodel.api

Interface IWDTextAccessor


public interface IWDTextAccessor

Provides access to translatable texts.

Type Classification Type Classification:

This interface is part of the Web Dynpro API, so applications may reference it or call any method of it, but they must not implement or extend it.

For a detailed explanation of API classification see the Web Dynpro Compatibility Guide

Method Summary
 boolean contains(String key)
          Returns true, iff there is a localized text for the given key.
 String getText(IWDMessage message)
          Returns a localized text for the given message.
 String getText(IWDMessage message, Object[] parameters)
          Returns a formatted text whose localized text is determined by the given message, parameterized by the given parameters.
 String getText(String key)
          Returns a localized text for the given key.
 String getText(String key, Object[] parameters)
          Returns a formatted text whose localized text is determined by the given key, parameterized by the given parameters.
 

Method Detail

getText

public String getText(IWDMessage message)
Returns a localized text for the given message. This method returns the message text stored in message. If no message text is available it is searched for the localized message text for the message's key. If a text is found for the key, this text is returned. If neither a message text nor a valid message key is available, the message key is returned. This may also be null!

Parameters:
message - message for which a localized text is returned
Returns:
the message text

getText

public String getText(IWDMessage message,
                      Object[] parameters)
Returns a formatted text whose localized text is determined by the given message, parameterized by the given parameters. This method returns the message text stored in message. If no message text is available it is searched for the localized message text for the message's key. If a text is found for the key, this text is returned. If neither a message text nor a valid message key is available, the message key is returned. This may also be null!

Parameters:
message - message for which a localized text is returned
parameters - object array of parameters
Returns:
the message text

getText

public String getText(String key)
Returns a localized text for the given key.

Parameters:
key - the key of the localized text
Returns:
the localized text

getText

public String getText(String key,
                      Object[] parameters)
Returns a formatted text whose localized text is determined by the given key, parameterized by the given parameters.

Parameters:
key - the key of the localized text
parameters - object array of parameters
Returns:
the localized text

contains

public boolean contains(String key)
Returns true, iff there is a localized text for the given key.



Copyright 2006 SAP AG Complete Copyright Notice