Class AutoPageTranslateServiceImpl

  • All Implemented Interfaces:
    AutoPageTranslateService

    public class AutoPageTranslateServiceImpl
    extends Object
    implements AutoPageTranslateService

    Translated would normally be properties that "obviously" contain text, like jcr:title, jcr:description, text, title etc. (Let's search the wcm core components documentation for that), and properties that heuristically "look like text", that is, contain multiple whitespace sequences. Since that's bound to fail sometimes, we later need a rule configuration mechanism in the OSGI configuration that defines positive / negative exceptions, but that's not in scope for now.

    We save property values : the property value before the translation is saved with prefix `ai_` and suffix `_original` for the property name, and the property value after the translation is saved with prefix `ai_` and suffix `_translated` for the property name.

    • Field Detail

      • LOG

        protected static final org.slf4j.Logger LOG
      • PATTERN_IGNORED_SUBNODE_NAMES

        protected static final Pattern PATTERN_IGNORED_SUBNODE_NAMES
      • MARKER_DEBUG_ADDITIONAL_INSTRUCTIONS

        public static final String MARKER_DEBUG_ADDITIONAL_INSTRUCTIONS
        See Also:
        Constant Field Values
      • translationService

        protected com.composum.ai.backend.base.service.chat.GPTTranslationService translationService
      • configurationService

        protected com.composum.ai.backend.slingbase.AIConfigurationService configurationService
      • liveRelationshipManager

        protected com.day.cq.wcm.msm.api.LiveRelationshipManager liveRelationshipManager
    • Constructor Detail

      • AutoPageTranslateServiceImpl

        public AutoPageTranslateServiceImpl()