Class AutoTranslateListModel
- java.lang.Object
-
- com.composum.ai.aem.core.impl.autotranslate.AutoTranslateListModel
-
@Model(adaptables=org.apache.sling.api.SlingHttpServletRequest.class) public class AutoTranslateListModel extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
SUFFIX_TRANSLATECOPY
If parameter copyOriginalPage is set, we create a copy of the original page with this suffix before doing the translation.
-
Constructor Summary
Constructors Constructor Description AutoTranslateListModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
copyOriginalPage(org.apache.sling.api.SlingHttpServletRequest request, String path)
Make a copy of the original page for comparison purposes.AutoTranslateService.TranslationRun
createRun()
List<AutoTranslateService.TranslationRun>
getTranslationRuns()
boolean
inProgress()
boolean
isDisabled()
String
rollback()
-
-
-
Field Detail
-
SUFFIX_TRANSLATECOPY
public static final String SUFFIX_TRANSLATECOPY
If parameter copyOriginalPage is set, we create a copy of the original page with this suffix before doing the translation.- See Also:
- Constant Field Values
-
-
Method Detail
-
isDisabled
public boolean isDisabled()
-
getTranslationRuns
@Nonnull public List<AutoTranslateService.TranslationRun> getTranslationRuns()
-
inProgress
public boolean inProgress()
-
createRun
public AutoTranslateService.TranslationRun createRun() throws org.apache.sling.api.resource.LoginException, org.apache.sling.api.resource.PersistenceException, com.day.cq.wcm.api.WCMException
- Throws:
org.apache.sling.api.resource.LoginException
org.apache.sling.api.resource.PersistenceException
com.day.cq.wcm.api.WCMException
-
copyOriginalPage
protected void copyOriginalPage(org.apache.sling.api.SlingHttpServletRequest request, String path) throws com.day.cq.wcm.api.WCMException, org.apache.sling.api.resource.PersistenceException
Make a copy of the original page for comparison purposes.- Throws:
com.day.cq.wcm.api.WCMException
org.apache.sling.api.resource.PersistenceException
-
rollback
public String rollback() throws com.day.cq.wcm.api.WCMException, org.apache.sling.api.resource.PersistenceException
- Throws:
com.day.cq.wcm.api.WCMException
org.apache.sling.api.resource.PersistenceException
-
-