Class TranslationProviderRegistry
java.lang.Object
com.e1c.langtool.internal.external.TranslationProviderRegistry
- All Implemented Interfaces:
ITranslationProviderRegistry
The base implementation of
ITranslationProviderRegistry.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns all registered providers as map where keys are ids and values are providers.Returns registered provider that correspond to the given id.Returns the extension attributes of registered provider that correspond to the given id.Returns ids of all registered providers sorted by order.Returns ids of all registered providers with attributes for which the given predicate returns true.
-
Constructor Details
-
TranslationProviderRegistry
public TranslationProviderRegistry()
-
-
Method Details
-
getExternalTranslationProvider
Description copied from interface:ITranslationProviderRegistryReturns registered provider that correspond to the given id.- Specified by:
getExternalTranslationProviderin interfaceITranslationProviderRegistry- Parameters:
id- the id of expected provider, cannot benull.- Returns:
- the provider that correspond to the given id, may return
nullif provider not found.
-
getExternalTranslationProviderAttrs
Description copied from interface:ITranslationProviderRegistryReturns the extension attributes of registered provider that correspond to the given id.- Specified by:
getExternalTranslationProviderAttrsin interfaceITranslationProviderRegistry- Parameters:
id- the id of expected provider- Returns:
- the extension attributes of registered provider that correspond to the given id
-
getExternalTranslationProvidersIds
public List<String> getExternalTranslationProvidersIds(Predicate<ExternalTranslationProviderAttrs> predicate) Description copied from interface:ITranslationProviderRegistryReturns ids of all registered providers with attributes for which the given predicate returns true.- Specified by:
getExternalTranslationProvidersIdsin interfaceITranslationProviderRegistry- Parameters:
predicate- the predicate to filter providers by attributes- Returns:
- the ids of registered providers filtered by predicate
-
getExternalTranslationProvidersIds
Returns ids of all registered providers sorted by order.- Specified by:
getExternalTranslationProvidersIdsin interfaceITranslationProviderRegistry- Returns:
- the ids of all registered providers sorted by order
-
getAllExternalTranslationProviders
Description copied from interface:ITranslationProviderRegistryReturns all registered providers as map where keys are ids and values are providers.- Specified by:
getAllExternalTranslationProvidersin interfaceITranslationProviderRegistry- Returns:
- all registered providers
-