Class PageManagementServiceImpl

    • Field Detail

      • fileManagerService

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

        @Autowired
        private co.mastermindcms.ai.gpt.services.ChatGPTService chatGPTService
      • mapper

        private static final com.fasterxml.jackson.databind.ObjectMapper mapper
    • Constructor Detail

      • PageManagementServiceImpl

        public PageManagementServiceImpl()
    • Method Detail

      • createPage

        public java.lang.String createPage​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> pageRequest)
        Description copied from interface: PageManagementService
        This method create a new page
        Specified by:
        createPage in interface PageManagementService
        Parameters:
        pageRequest - this request object as map
        Returns:
        identifier from created page
      • deletePages

        public void deletePages​(java.util.ArrayList<java.lang.String> pageIds)
        Description copied from interface: PageManagementService
        This method delete many pages
        Specified by:
        deletePages in interface PageManagementService
        Parameters:
        pageIds - identifiers for pages
      • updatePage

        public void updatePage​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> pageRequest)
        Description copied from interface: PageManagementService
        This method does update an existing page
        Specified by:
        updatePage in interface PageManagementService
        Parameters:
        pageRequest - this request object as map
      • duplicatePage

        public void duplicatePage​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> copyRequest)
        Description copied from interface: PageManagementService
        This method does copy template to another
        Specified by:
        duplicatePage in interface PageManagementService
        Parameters:
        copyRequest - this request object as map
      • copyPage

        public void copyPage​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> copyRequest)
        Description copied from interface: PageManagementService
        This method does copy template to another
        Specified by:
        copyPage in interface PageManagementService
        Parameters:
        copyRequest - this request object as map
      • publishToUrl

        public void publishToUrl​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> routeRequest)
        Description copied from interface: PageManagementService
        This method does copy template to specific route
        Specified by:
        publishToUrl in interface PageManagementService
        Parameters:
        routeRequest - this request object as map
      • askAiAssistant

        public java.lang.String askAiAssistant​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> prompt)
        Description copied from interface: PageManagementService
        This method does copy template to specific route. Only interact with web-socket calls.
        Specified by:
        askAiAssistant in interface PageManagementService
        Parameters:
        prompt - this prompt to Ai-assistant
        Returns:
        the answer from ChatGPT