Class AutoTranslateLiveActionImpl

  • All Implemented Interfaces:
    AutoTranslateLiveAction, com.day.cq.commons.JSONItem, com.day.cq.wcm.msm.api.LiveAction

    public class AutoTranslateLiveActionImpl
    extends com.day.cq.wcm.msm.commons.BaseAction
    implements AutoTranslateLiveAction
    Implementation for the rollout configuration.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AutoTranslateLiveActionImpl​(org.apache.sling.api.resource.ValueMap config, com.day.cq.wcm.msm.commons.BaseActionFactory<? extends com.day.cq.wcm.msm.api.LiveAction> liveActionFactory, AutoPageTranslateService autoPageTranslateService, com.composum.ai.backend.slingbase.AIConfigurationService configurationService, AutoTranslateService autoTranslateService)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doExecute​(org.apache.sling.api.resource.Resource source, org.apache.sling.api.resource.Resource target, com.day.cq.wcm.msm.api.LiveRelationship liveRelationship, boolean autoSave)  
      String getName()  
      protected boolean handles​(org.apache.sling.api.resource.Resource source, org.apache.sling.api.resource.Resource target, com.day.cq.wcm.msm.api.LiveRelationship relation, boolean isResetRollout)  
      protected static void markAsError​(org.apache.sling.api.resource.Resource target)
      Make it easy to find pages with errors by marking page with AI_TRANSLATION_ERRORMARKER.
      • Methods inherited from class com.day.cq.wcm.msm.commons.BaseAction

        execute, execute, execute, getActionFactory, getConfig, getParameterName, getPropertiesNames, getRank, getTitle, isPage, resourceHasNode, write
      • Methods inherited from interface com.day.cq.wcm.msm.api.LiveAction

        execute, execute, execute, getParameterName, getPropertiesNames, getRank, getTitle, write
    • Constructor Detail

      • AutoTranslateLiveActionImpl

        protected AutoTranslateLiveActionImpl​(org.apache.sling.api.resource.ValueMap config,
                                              com.day.cq.wcm.msm.commons.BaseActionFactory<? extends com.day.cq.wcm.msm.api.LiveAction> liveActionFactory,
                                              AutoPageTranslateService autoPageTranslateService,
                                              com.composum.ai.backend.slingbase.AIConfigurationService configurationService,
                                              AutoTranslateService autoTranslateService)
    • Method Detail

      • getName

        public String getName()
        Specified by:
        getName in interface com.day.cq.wcm.msm.api.LiveAction
        Overrides:
        getName in class com.day.cq.wcm.msm.commons.BaseAction
      • handles

        protected boolean handles​(org.apache.sling.api.resource.Resource source,
                                  org.apache.sling.api.resource.Resource target,
                                  com.day.cq.wcm.msm.api.LiveRelationship relation,
                                  boolean isResetRollout)
                           throws javax.jcr.RepositoryException
        Specified by:
        handles in class com.day.cq.wcm.msm.commons.BaseAction
        Throws:
        javax.jcr.RepositoryException
      • doExecute

        protected void doExecute​(org.apache.sling.api.resource.Resource source,
                                 org.apache.sling.api.resource.Resource target,
                                 com.day.cq.wcm.msm.api.LiveRelationship liveRelationship,
                                 boolean autoSave)
                          throws com.day.cq.wcm.api.WCMException
        Specified by:
        doExecute in class com.day.cq.wcm.msm.commons.BaseAction
        Throws:
        com.day.cq.wcm.api.WCMException
      • markAsError

        protected static void markAsError​(org.apache.sling.api.resource.Resource target)
        Make it easy to find pages with errors by marking page with AI_TRANSLATION_ERRORMARKER.