public interface TranslationManager
Modifier and Type | Method and Description |
---|---|
TranslationService |
createPostEditService(Resource resource)
Creates a
TranslationService instance based upon logic determined by the properties of the passed
in resource. |
TranslationService |
createTranslationService(Resource resource)
Creates a
TranslationService instance based upon logic determined by the properties of the passed
in resource. |
TranslationService |
createTranslationService(java.lang.String factoryName)
Deprecated.
|
TranslationService |
createTranslationService(java.lang.String factoryName,
TranslationConstants.TranslationMethod translationMethod,
java.lang.String strCloudConfigPath)
Creates a
TranslationService instance registered with the given translation factory name. |
java.util.Map<java.lang.String,java.lang.String> |
getAvailableFactoryNames()
Deprecated.
|
java.util.Map<java.lang.String,java.lang.String> |
getAvailableFactoryNames(TranslationConstants.TranslationMethod translationMethod)
Returns a Map of the currently available TranslationServiceFactories The service returns both the factory name
and a factory label for use in drop downs based on TranslationMethod.
|
boolean |
isTranslationServiceConfigured(Resource resource)
Checks if the given resource has any translation service specified, and all the properties are set correctly.
|
boolean isTranslationServiceConfigured(Resource resource) throws TranslationException
resource
- resourceTranslationException
- the translation exception@Deprecated TranslationService createTranslationService(java.lang.String factoryName) throws TranslationException
TranslationService
instance registered with the given translation factory name.
TranslationManager returns the TranslationService instance From within a JSP for example: TranslationManager tm
= sling.getService(TranslationManager.class); TranslationService translationService =
tm.createTranslationService(resource); Or from within a Component/Service you would import the
TranslationManager Object:factoryName
- the translation factory nameTranslationService
instanceTranslationException
- the translation exceptionTranslationService createTranslationService(java.lang.String factoryName, TranslationConstants.TranslationMethod translationMethod, java.lang.String strCloudConfigPath) throws TranslationException
TranslationService
instance registered with the given translation factory name.
TranslationManager returns the TranslationService instance From within a JSP for example: TranslationManager tm
= sling.getService(TranslationManager.class); TranslationService translationService =
tm.createTranslationService(factoryName, translationMethod, strCloudConfigPath); Or from within a
Component/Service you would import the TranslationManager Object:factoryName
- the translation factory nametranslationMethod
- the translation methodstrCloudConfigPath
- path to cloud config, if this value is null, then factory name is used. This cloud
config is passed to service factory.TranslationService
instanceTranslationException
- the translation exceptionTranslationService createTranslationService(Resource resource) throws TranslationException
TranslationService
instance based upon logic determined by the properties of the passed
in resource. The Translation configuration logic is used to determine which properties to base the decision off
of (Content Path, Content Category, Provider Name stored on content). By default a configured factory name
(TranslationConstants.TN_FACTORY_NAME) takes precedence. If no Connector can be determined the system default
TranslationService will be returned.resource
- The resource of a content node containing the content to be translated.TranslationService
instanceTranslationException
- the translation exceptionTranslationService createPostEditService(Resource resource) throws TranslationException
TranslationService
instance based upon logic determined by the properties of the passed
in resource. The Translation configuration logic is used to determine which properties to base the decision off
of (Content Path, Content Category, Provider Name stored on content). If no Connector can be determined return
null.resource
- The resource of a content node containing the content to be translated.TranslationService
instanceTranslationException
- the translation exception@Deprecated java.util.Map<java.lang.String,java.lang.String> getAvailableFactoryNames() throws TranslationException
TranslationException
- the translation exceptionjava.util.Map<java.lang.String,java.lang.String> getAvailableFactoryNames(TranslationConstants.TranslationMethod translationMethod) throws TranslationException
translationMethod
- Use TranslationMethod parameter to filter out services and return only those factories
which support this translation method. Pass null to return all installed factories.TranslationException
- the translation exceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved