Class PageProcessorServiceImpl

    • Field Detail

      • fileManagerService

        @Autowired
        private co.mastermindcms.modules.filestorage.services.FileManagerService fileManagerService
      • appContext

        @Autowired
        private org.springframework.context.ApplicationContext appContext
      • mongoTemplate

        @Autowired
        private org.springframework.data.mongodb.core.MongoTemplate mongoTemplate
    • Constructor Detail

      • PageProcessorServiceImpl

        public PageProcessorServiceImpl()
    • Method Detail

      • processPage

        public java.util.Map<java.lang.String,​java.lang.Object> processPage​(java.lang.String pageRoot,
                                                                                  java.lang.String html)
        Description copied from interface: PageProcessorService
        Processes the given HTML page and returns a map containing information extracted from the page.
        Specified by:
        processPage in interface PageProcessorService
        Parameters:
        pageRoot - The root URL or identifier of the page.
        html - The HTML content of the page.
        Returns:
        A map containing information extracted from the page, with the key "value"
      • processPageTitle

        public java.util.Map<java.lang.String,​java.lang.Object> processPageTitle​(java.lang.String entityId,
                                                                                       java.lang.String repositoryName)
        Description copied from interface: PageProcessorService
        Retrieves the page title for a given entity ID and repository name.
        Specified by:
        processPageTitle in interface PageProcessorService
        Parameters:
        entityId - the ID of the entity
        repositoryName - the name of the repository
        Returns:
        a Map object containing the page title as a String value, with the key "value"
      • processTranslation

        public java.util.Map<java.lang.String,​java.lang.Object> processTranslation​(java.lang.String pageRoot,
                                                                                         java.lang.String articleId,
                                                                                         java.lang.String repository)
        Description copied from interface: PageProcessorService
        This method performs content manipulation on the page in order to rebuild it in an SEO-friendly way.
        Specified by:
        processTranslation in interface PageProcessorService
        Parameters:
        pageRoot - the root path where the page is located
        articleId - transfer identifier in the database
        repository - the name of the repository from which the transfer can be retrieved
        Returns:
        a Map object containing the page title as a String value, with the key "value"
      • recursiveCompile

        private java.lang.String recursiveCompile​(java.lang.String pageRoot,
                                                  java.lang.String html,
                                                  boolean isNested)