Class PageManagementServiceImpl
- java.lang.Object
-
- co.mastermindcms.builder.services.PageManagementServiceImpl
-
- All Implemented Interfaces:
PageManagementService
@Service public class PageManagementServiceImpl extends java.lang.Object implements PageManagementService
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
ARTICLE_PREFIX
private BuilderProperties
builderProperties
private co.mastermindcms.ai.gpt.services.ChatGPTService
chatGPTService
private CommonProperties
commonProperties
private ContentContainerService
containerService
private co.mastermindcms.modules.filestorage.services.FileManagerService
fileManagerService
private static com.fasterxml.jackson.databind.ObjectMapper
mapper
private java.lang.String
PREVIEW_PREFIX
private java.lang.String
TITLE_PREFIX
private TranslationService
translationService
private UserManagementService
userManagementService
-
Constructor Summary
Constructors Constructor Description PageManagementServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
askAiAssistant(java.util.LinkedHashMap<java.lang.String,java.lang.Object> prompt)
This method does copy template to specific route.void
copyPage(CopyPageRequest copyRequest)
This method does copy template to anothervoid
copyPage(java.util.LinkedHashMap<java.lang.String,java.lang.Object> copyRequest)
This method does copy template to anotherjava.lang.String
createPage(CreatePageRequest pageRequest)
This method create a new pagejava.lang.String
createPage(java.util.LinkedHashMap<java.lang.String,java.lang.Object> pageRequest)
This method create a new pagevoid
deletePage(java.lang.String pageId)
This method delete a pagevoid
deletePages(java.util.ArrayList<java.lang.String> pageIds)
This method delete many pagesvoid
duplicatePage(CopyPageRequest copyRequest)
This method does copy template to anothervoid
duplicatePage(java.util.LinkedHashMap<java.lang.String,java.lang.Object> copyRequest)
This method does copy template to anothervoid
publishToUrl(CreateRouteRequest routeRequest)
This method does copy template to specific routevoid
publishToUrl(java.util.LinkedHashMap<java.lang.String,java.lang.Object> routeRequest)
This method does copy template to specific routevoid
updatePage(CreatePageRequest pageRequest)
This method does update an existing pagevoid
updatePage(java.util.LinkedHashMap<java.lang.String,java.lang.Object> pageRequest)
This method does update an existing page
-
-
-
Field Detail
-
containerService
@Autowired private ContentContainerService containerService
-
translationService
@Autowired private TranslationService translationService
-
userManagementService
@Autowired private UserManagementService userManagementService
-
fileManagerService
@Autowired private co.mastermindcms.modules.filestorage.services.FileManagerService fileManagerService
-
commonProperties
@Autowired private CommonProperties commonProperties
-
builderProperties
@Autowired private BuilderProperties builderProperties
-
chatGPTService
@Autowired private co.mastermindcms.ai.gpt.services.ChatGPTService chatGPTService
-
TITLE_PREFIX
private final java.lang.String TITLE_PREFIX
- See Also:
- Constant Field Values
-
PREVIEW_PREFIX
private final java.lang.String PREVIEW_PREFIX
- See Also:
- Constant Field Values
-
ARTICLE_PREFIX
private final java.lang.String ARTICLE_PREFIX
- See Also:
- Constant Field Values
-
mapper
private static final com.fasterxml.jackson.databind.ObjectMapper mapper
-
-
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 interfacePageManagementService
- Parameters:
pageRequest
- this request object as map- Returns:
- identifier from created page
-
createPage
public java.lang.String createPage(CreatePageRequest pageRequest)
Description copied from interface:PageManagementService
This method create a new page- Specified by:
createPage
in interfacePageManagementService
- Parameters:
pageRequest
- this request object as entity- Returns:
- identifier from created page
-
deletePage
public void deletePage(java.lang.String pageId)
Description copied from interface:PageManagementService
This method delete a page- Specified by:
deletePage
in interfacePageManagementService
- Parameters:
pageId
- identifier for 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 interfacePageManagementService
- 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 interfacePageManagementService
- Parameters:
pageRequest
- this request object as map
-
updatePage
public void updatePage(CreatePageRequest pageRequest)
Description copied from interface:PageManagementService
This method does update an existing page- Specified by:
updatePage
in interfacePageManagementService
- Parameters:
pageRequest
- this request object as entity
-
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 interfacePageManagementService
- Parameters:
copyRequest
- this request object as map
-
duplicatePage
public void duplicatePage(CopyPageRequest copyRequest)
Description copied from interface:PageManagementService
This method does copy template to another- Specified by:
duplicatePage
in interfacePageManagementService
- Parameters:
copyRequest
- this request object as entity
-
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 interfacePageManagementService
- Parameters:
copyRequest
- this request object as map
-
copyPage
public void copyPage(CopyPageRequest copyRequest)
Description copied from interface:PageManagementService
This method does copy template to another- Specified by:
copyPage
in interfacePageManagementService
- Parameters:
copyRequest
- this request object as entity
-
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 interfacePageManagementService
- Parameters:
routeRequest
- this request object as map
-
publishToUrl
public void publishToUrl(CreateRouteRequest routeRequest)
Description copied from interface:PageManagementService
This method does copy template to specific route- Specified by:
publishToUrl
in interfacePageManagementService
- Parameters:
routeRequest
- this request object as entity
-
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 interfacePageManagementService
- Parameters:
prompt
- this prompt to Ai-assistant- Returns:
- the answer from ChatGPT
-
-