Class PageProcessorServiceImpl
- java.lang.Object
-
- co.mastermindcms.builder.services.PageProcessorServiceImpl
-
- All Implemented Interfaces:
PageProcessorService
@Service public class PageProcessorServiceImpl extends java.lang.Object implements PageProcessorService
-
-
Field Summary
Fields Modifier and Type Field Description private org.springframework.context.ApplicationContextappContextprivate BuilderPropertiesbuilderPropertiesprivate CommonPropertiescommonPropertiesprivate ContentContainerServicecontentContainerServiceprivate co.mastermindcms.modules.filestorage.services.FileManagerServicefileManagerServiceprivate org.springframework.data.mongodb.core.MongoTemplatemongoTemplateprivate PageRenderServicepageRenderServiceprivate WebSiteSettingsRepositorysiteSettingsRepositoryprivate TranslationServicetranslationService
-
Constructor Summary
Constructors Constructor Description PageProcessorServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>processMetaData(java.lang.String pageUrl, java.lang.String containerId, java.lang.String repositoryName)This method does search request for database entity based on metadata URL propertyjava.util.Map<java.lang.String,java.lang.Object>processPage(java.lang.String pageRoot, java.lang.String html)Processes the given HTML page and returns a map containing information extracted from the page.java.util.Map<java.lang.String,java.lang.Object>processPageTitle(java.lang.String entityId, java.lang.String repositoryName)Retrieves the page title for a given entity ID and repository name.java.lang.StringprocessThemeCss(java.lang.String pageUrl)Processes the CSS for a given page URL and returns the modified CSS.java.util.Map<java.lang.String,java.lang.Object>processTranslation(java.lang.String pageRoot, java.lang.String articleId, java.lang.String repository)This method performs content manipulation on the page in order to rebuild it in an SEO-friendly way.private java.lang.StringrecursiveCompile(java.lang.String pageRoot, java.lang.String html, boolean isNested)private voidsettingsAccumulator(java.util.LinkedHashMap<java.lang.String,java.lang.Object> m, java.util.Map.Entry<java.lang.String,java.lang.Object> v)
-
-
-
Field Detail
-
pageRenderService
@Autowired private PageRenderService pageRenderService
-
fileManagerService
@Autowired private co.mastermindcms.modules.filestorage.services.FileManagerService fileManagerService
-
translationService
@Autowired private TranslationService translationService
-
contentContainerService
@Autowired private ContentContainerService contentContainerService
-
builderProperties
@Autowired private BuilderProperties builderProperties
-
commonProperties
@Autowired private CommonProperties commonProperties
-
siteSettingsRepository
@Autowired private WebSiteSettingsRepository siteSettingsRepository
-
appContext
@Autowired private org.springframework.context.ApplicationContext appContext
-
mongoTemplate
@Autowired private org.springframework.data.mongodb.core.MongoTemplate mongoTemplate
-
-
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:PageProcessorServiceProcesses the given HTML page and returns a map containing information extracted from the page.- Specified by:
processPagein interfacePageProcessorService- 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:PageProcessorServiceRetrieves the page title for a given entity ID and repository name.- Specified by:
processPageTitlein interfacePageProcessorService- Parameters:
entityId- the ID of the entityrepositoryName- 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:PageProcessorServiceThis method performs content manipulation on the page in order to rebuild it in an SEO-friendly way.- Specified by:
processTranslationin interfacePageProcessorService- Parameters:
pageRoot- the root path where the page is locatedarticleId- transfer identifier in the databaserepository- 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"
-
processMetaData
public java.util.Map<java.lang.String,java.lang.Object> processMetaData(java.lang.String pageUrl, java.lang.String containerId, java.lang.String repositoryName)Description copied from interface:PageProcessorServiceThis method does search request for database entity based on metadata URL property- Specified by:
processMetaDatain interfacePageProcessorService- Parameters:
pageUrl- this is page-urlcontainerId- the ID of the containerrepositoryName- repository name from where will be returned data- Returns:
- map-representation of data
-
processThemeCss
public java.lang.String processThemeCss(java.lang.String pageUrl)
Description copied from interface:PageProcessorServiceProcesses the CSS for a given page URL and returns the modified CSS.- Specified by:
processThemeCssin interfacePageProcessorService- Parameters:
pageUrl- the URL of the web page for which the CSS needs to be processed- Returns:
- the modified CSS for the given page URL
-
settingsAccumulator
private void settingsAccumulator(java.util.LinkedHashMap<java.lang.String,java.lang.Object> m, java.util.Map.Entry<java.lang.String,java.lang.Object> v)
-
recursiveCompile
private java.lang.String recursiveCompile(java.lang.String pageRoot, java.lang.String html, boolean isNested)
-
-