Package com.e1c.langtool.external
Interface ITranslationProviderRegistry
- All Known Implementing Classes:
TranslationProviderRegistry
public interface ITranslationProviderRegistry
This interface allows to get registered providers of external translation services or their ids.
- See Also:
-
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.Returns ids of all registered providers with attributes for which the given predicate returns true.
-
Method Details
-
getAllExternalTranslationProviders
Map<String,IExternalTranslationProvider> getAllExternalTranslationProviders()Returns all registered providers as map where keys are ids and values are providers.- Returns:
- all registered providers
-
getExternalTranslationProvidersIds
Returns ids of all registered providers.- Returns:
- the ids of all registered providers
-
getExternalTranslationProvidersIds
List<String> getExternalTranslationProvidersIds(Predicate<ExternalTranslationProviderAttrs> predicate) Returns ids of all registered providers with attributes for which the given predicate returns true.- Parameters:
predicate- the predicate to filter providers by attributes- Returns:
- the ids of registered providers filtered by predicate
-
getExternalTranslationProvider
Returns registered provider that correspond to the given id.- 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
Returns the extension attributes of registered provider that correspond to the given id.- Parameters:
id- the id of expected provider- Returns:
- the extension attributes of registered provider that correspond to the given id
-