Class EMFFormsLocalizationServiceImpl
- java.lang.Object
-
- org.eclipse.emfforms.internal.localization.EMFFormsLocalizationServiceImpl
-
- All Implemented Interfaces:
EMFFormsLocalizationService
public class EMFFormsLocalizationServiceImpl extends java.lang.Object implements EMFFormsLocalizationService
Service Implementation for retrieving translated Strings.- Author:
- Eugen Neufeld
-
-
Constructor Summary
Constructors Constructor Description EMFFormsLocalizationServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetString(java.lang.Class<?> clazz, java.lang.String key)Return the String for the provided key.java.lang.StringgetString(org.osgi.framework.Bundle bundle, java.lang.String key)Return the String for the provided key.booleanhasKey(java.lang.Class<?> clazz, java.lang.String key)Return whether the key in question is available.booleanhasKey(org.osgi.framework.Bundle bundle, java.lang.String key)Return whether the key in question is available.protected voidsetBundleLocalization(org.eclipse.osgi.service.localization.BundleLocalization bundleLocalization)Called by the framework to set the BundleLocalization.protected voidsetEMFFormsLocaleProvider(EMFFormsLocaleProvider localeProvider)Called by the framework to set the EMFFormsLocaleProvider.protected voidsetReportService(ReportService reportService)Called by the framework to set the ReportService.protected voidunsetEMFFormsLocaleProvider(EMFFormsLocaleProvider localeProvider)Called by the framework to unset the EMFFormsLocaleProvider.
-
-
-
Method Detail
-
setEMFFormsLocaleProvider
protected void setEMFFormsLocaleProvider(EMFFormsLocaleProvider localeProvider)
Called by the framework to set the EMFFormsLocaleProvider.- Parameters:
localeProvider- TheEMFFormsLocaleProvider
-
unsetEMFFormsLocaleProvider
protected void unsetEMFFormsLocaleProvider(EMFFormsLocaleProvider localeProvider)
Called by the framework to unset the EMFFormsLocaleProvider.- Parameters:
localeProvider- TheEMFFormsLocaleProvider
-
setBundleLocalization
protected void setBundleLocalization(org.eclipse.osgi.service.localization.BundleLocalization bundleLocalization)
Called by the framework to set the BundleLocalization.- Parameters:
bundleLocalization- TheBundleLocalization
-
setReportService
protected void setReportService(ReportService reportService)
Called by the framework to set the ReportService.- Parameters:
reportService- TheReportService
-
getString
public java.lang.String getString(java.lang.Class<?> clazz, java.lang.String key)Return the String for the provided key.- Specified by:
getStringin interfaceEMFFormsLocalizationService- Parameters:
clazz- The class which needs a translated stringkey- The key of the string- Returns:
- The translated key
- See Also:
EMFFormsLocalizationService.getString(java.lang.Class, java.lang.String)
-
getString
public java.lang.String getString(org.osgi.framework.Bundle bundle, java.lang.String key)Return the String for the provided key.- Specified by:
getStringin interfaceEMFFormsLocalizationService- Parameters:
bundle- The bundle which provides the translated stringskey- 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, java.lang.String key)Return whether the key in question is available.- Specified by:
hasKeyin interfaceEMFFormsLocalizationService- Parameters:
bundle- The bundle in which to search for the keykey- 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(java.lang.Class<?> clazz, java.lang.String key)Return whether the key in question is available.- Specified by:
hasKeyin interfaceEMFFormsLocalizationService- Parameters:
clazz- The class in whose bundle to search for the keykey- 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)
-
-