Interface TranslationServiceFactory
- All Known Implementing Classes:
AbstractTranslationServiceFactory
The TranslationServiceFactory is responsible for creating TranslationService objects for a specific connector. It
also registers the connector with the TranslationManager using a unique identifier ("Name").
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringUnique name of the service property indicating the particular implementation this factory provides, e.g. -
Method Summary
Modifier and TypeMethodDescriptioncreateTranslationService(TranslationConstants.TranslationMethod translationMethod, String cloudConfigPath) Deprecated.default TranslationServicecreateTranslationService(TranslationConstants.TranslationMethod translationMethod, String cloudConfigPath, Resource resource) Creates a new TranslationService object specific to this Factory.Class<?> Gets the service Cloud Config Class.Gets the service factory name.Get the supported translation methods.
-
Field Details
-
PROPERTY_TRANSLATION_FACTORY
Unique name of the service property indicating the particular implementation this factory provides, e.g. microsoft.- See Also:
-
-
Method Details
-
createTranslationService
@Deprecated TranslationService createTranslationService(TranslationConstants.TranslationMethod translationMethod, String cloudConfigPath) throws TranslationException Deprecated.since 2.4.0, usecreateTranslationService(TranslationMethod, String, Resource)instead. Creates a new TranslationService object specific to this Factory.- Parameters:
translationMethod- Specify which type of Translation service to create based on Translation MethodcloudConfigPath- The path to cloud config file.- Returns:
- A TranslationService instance for the given factory.
- Throws:
TranslationException- the translation exception
-
createTranslationService
default TranslationService createTranslationService(TranslationConstants.TranslationMethod translationMethod, String cloudConfigPath, Resource resource) throws TranslationException Creates a new TranslationService object specific to this Factory.- Parameters:
translationMethod- Specify which type of Translation service to create based on Translation MethodcloudConfigPath- The path to cloud config file.resource- Context resource to fetch configuration for- Returns:
- A TranslationService instance for the given factory.
- Throws:
TranslationException- the translation exception
-
getSupportedTranslationMethods
List<TranslationConstants.TranslationMethod> getSupportedTranslationMethods()Get the supported translation methods.- Returns:
- List of Translation method of the service property indicating the particular translation method this factory provides, e.g. machine translation or human translation.
-
getServiceFactoryName
String getServiceFactoryName()Gets the service factory name.- Returns:
- Name of the service property indicating the particular implementation this factory provides, e.g. adobe.
-
getServiceCloudConfigClass
Class<?> getServiceCloudConfigClass()Gets the service Cloud Config Class.- Returns:
- Class of the service Cloud Config. This class name will be used to determine the cloud config for the Translation service.
-
createTranslationService(TranslationMethod, String, Resource)instead.