public class TranslationSupport
extends java.lang.Object
IQueryable that should be used
to obtain the translation fragment IU's, as well as the locale that
should be used for translations.| Constructor and Description |
|---|
TranslationSupport()
Create an instance of TranslationSupport for the current locale.
|
TranslationSupport(IQueryable<IInstallableUnit> fragmentSource)
Create an instance of TranslationSupport for the current locale.
|
| Modifier and Type | Method and Description |
|---|---|
ICopyright |
getCopyright(IInstallableUnit iu,
java.lang.String locale)
Return the copyright for the specified IInstallableUnit,
localized for the receiver's locale.
|
static TranslationSupport |
getInstance() |
java.lang.String |
getIUProperty(IInstallableUnit iu,
KeyWithLocale propertyKey)
Return the localized value for the specified IInstallableUnit
property using the locale specified in the
propertyKey. |
java.lang.String |
getIUProperty(IInstallableUnit iu,
java.lang.String propertyKey)
Return the localized value for the specified IInstallableUnit
property using the default locale.
|
java.lang.String |
getIUProperty(IInstallableUnit iu,
java.lang.String propertyKey,
java.lang.String locale)
Return the localized value for the specified IInstallableUnit
property.
|
ILicense[] |
getLicenses(IInstallableUnit iu,
java.lang.String locale)
Return an array of licenses for the specified IInstallableUnit,
localized for the receiver's locale.
|
IUpdateDescriptor |
getUpdateDescriptor(IInstallableUnit iu,
java.lang.String locale)
Return an update descriptor localized for the receiver's locale.
|
void |
setLocaleProvider(LocaleProvider provider)
Set the locale that should be used when obtaining translations.
|
IQueryable<IInstallableUnit> |
setTranslationSource(IQueryable<IInstallableUnit> queryable)
Set the
IQueryable that should be used to obtain translation fragment
IUs. |
public TranslationSupport()
public TranslationSupport(IQueryable<IInstallableUnit> fragmentSource)
fragmentSource as the source of the translation fragments.public static TranslationSupport getInstance()
public ICopyright getCopyright(IInstallableUnit iu, java.lang.String locale)
iu - the IInstallableUnit in questionpublic java.lang.String getIUProperty(IInstallableUnit iu, java.lang.String propertyKey, java.lang.String locale)
iu - the IInstallableUnit in questionpropertyKey - the name of the property to be retrievedlocale - The locale to return the property fornull if no
such property is defined.public java.lang.String getIUProperty(IInstallableUnit iu, KeyWithLocale propertyKey)
propertyKey.iu - the IInstallableUnit in questionpropertyKey - the name and locale of the property to be retrievednull if no
such property is defined.public java.lang.String getIUProperty(IInstallableUnit iu, java.lang.String propertyKey)
iu - the IInstallableUnit in questionpropertyKey - the name of the property to be retrievednull if no
such property is defined.public ILicense[] getLicenses(IInstallableUnit iu, java.lang.String locale)
iu - the IInstallableUnit in questionpublic IUpdateDescriptor getUpdateDescriptor(IInstallableUnit iu, java.lang.String locale)
iu - the IInstallableUnit in questionpublic void setLocaleProvider(LocaleProvider provider)
provider - the locale for which translations should be retrieved.public IQueryable<IInstallableUnit> setTranslationSource(IQueryable<IInstallableUnit> queryable)
IQueryable that should be used to obtain translation fragment
IUs. Returns the previous translation source.queryable - an IQueryable that can supply the appropriate NLS
translation fragments