org.eclipse.emfforms.spi.localization
Interface EMFFormsLocalizationService

All Known Implementing Classes:
EMFFormsLocalizationServiceImpl

public interface EMFFormsLocalizationService

Service for retrieving translated Strings.

Author:
Eugen Neufeld

Method Summary
 String getString(org.osgi.framework.Bundle bundle, String key)
          Return the String for the provided key.
 String getString(Class<?> clazz, String key)
          Return the String for the provided key.
 boolean hasKey(org.osgi.framework.Bundle bundle, String key)
          Return whether the key in question is available.
 boolean hasKey(Class<?> clazz, String key)
          Return whether the key in question is available.
 

Method Detail

getString

String getString(org.osgi.framework.Bundle bundle,
                 String key)
Return the String for the provided key.

Parameters:
bundle - The bundle which provides the translated strings
key - The key of the string
Returns:
The translated key

getString

String getString(Class<?> clazz,
                 String key)
Return the String for the provided key.

Parameters:
clazz - The class which needs a translated string
key - The key of the string
Returns:
The translated key

hasKey

boolean hasKey(org.osgi.framework.Bundle bundle,
               String key)
Return whether the key in question is available.

Parameters:
bundle - The bundle in which to search for the key
key - The key to search
Returns:
true if the key is available in the bundle, false otherwise

hasKey

boolean hasKey(Class<?> clazz,
               String key)
Return whether the key in question is available.

Parameters:
clazz - The class in whose bundle to search for the key
key - The key to search
Returns:
true if the key is available in the bundle, false otherwise


Copyright © 2015. All Rights Reserved.