org.eclipse.emfforms.internal.localization
Class EMFFormsLocalizationServiceImpl

java.lang.Object
  extended by org.eclipse.emfforms.internal.localization.EMFFormsLocalizationServiceImpl
All Implemented Interfaces:
EMFFormsLocalizationService

public class EMFFormsLocalizationServiceImpl
extends Object
implements EMFFormsLocalizationService

Service Implementation for retrieving translated Strings.

Author:
Eugen Neufeld

Constructor Summary
EMFFormsLocalizationServiceImpl()
           
 
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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EMFFormsLocalizationServiceImpl

public EMFFormsLocalizationServiceImpl()
Method Detail

getString

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

Specified by:
getString in interface EMFFormsLocalizationService
Parameters:
clazz - The class which needs a translated string
key - The key of the string
Returns:
The translated key
See Also:
EMFFormsLocalizationService.getString(java.lang.Class, java.lang.String)

getString

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

Specified by:
getString in interface EMFFormsLocalizationService
Parameters:
bundle - The bundle which provides the translated strings
key - The key of the string
Returns:
The translated key
See Also:
EMFFormsLocalizationService.getString(org.osgi.framework.Bundle, java.lang.String)

hasKey

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

Specified by:
hasKey in interface EMFFormsLocalizationService
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
See Also:
EMFFormsLocalizationService.hasKey(org.osgi.framework.Bundle, java.lang.String)

hasKey

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

Specified by:
hasKey in interface EMFFormsLocalizationService
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
See Also:
EMFFormsLocalizationService.hasKey(java.lang.Class, java.lang.String)


Copyright © 2015. All Rights Reserved.