Class AutoTranslateServiceImpl

  • All Implemented Interfaces:
    AutoTranslateService

    public class AutoTranslateServiceImpl
    extends Object
    implements AutoTranslateService
    A service that provides automatic translation of AEM pages. The actual work is done in AutoPageTranslateServiceImpl; this is for managing the translation queue and the thread pool.

    This is a proof-of-concept implementation, only available if explicitly enabled in the OSGi configuration.

    • Constructor Detail

      • AutoTranslateServiceImpl

        public AutoTranslateServiceImpl()
    • Method Detail

      • activate

        protected void activate()
      • deactivate

        public void deactivate()
      • getThreadPool

        protected org.apache.sling.commons.threads.ThreadPool getThreadPool()
      • collectPages

        protected List<org.apache.sling.api.resource.Resource> collectPages​(org.apache.sling.api.resource.Resource root,
                                                                            int maxDepth)
      • rollback

        public void rollback​(org.apache.sling.api.resource.Resource resource)
                      throws com.day.cq.wcm.api.WCMException,
                             org.apache.sling.api.resource.PersistenceException
        Description copied from interface: AutoTranslateService
        Rolls the translation results at this resource back - mostly for debugging.
        Specified by:
        rollback in interface AutoTranslateService
        Throws:
        com.day.cq.wcm.api.WCMException
        org.apache.sling.api.resource.PersistenceException
      • doRollback

        protected void doRollback​(org.apache.sling.api.resource.ResourceResolver resourceResolver,
                                  AutoTranslateServiceImpl.TranslationRunImpl translationRun)
                           throws org.apache.sling.api.resource.PersistenceException,
                                  com.day.cq.wcm.api.WCMException
        Throws:
        org.apache.sling.api.resource.PersistenceException
        com.day.cq.wcm.api.WCMException