Class SitemapGeneratorServiceImpl
- java.lang.Object
-
- co.mastermindcms.modules.services.SitemapGeneratorServiceImpl
-
- All Implemented Interfaces:
SitemapGeneratorService
@Service public class SitemapGeneratorServiceImpl extends java.lang.Object implements SitemapGeneratorService
-
-
Field Summary
Fields Modifier and Type Field Description private CommonProperties
commonProperties
private Job
job
private java.lang.String
jobsEndpoint
private JobsManagementService
jobService
private static com.fasterxml.jackson.databind.ObjectMapper
mapper
private co.mastermindcms.modules.enums.ServiceState
status
private java.lang.String
username
private WebSocketService
webSocketService
-
Constructor Summary
Constructors Constructor Description SitemapGeneratorServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
changeStatus(co.mastermindcms.modules.enums.ServiceState status)
Changes the status of the service.void
generateSiteMap(java.util.LinkedHashMap<java.lang.String,java.lang.Object> siteMapRequest)
This method generate a site map entity.private void
generateSiteMapAsGlobal(java.lang.String currentDomain, java.lang.String siteUrl, java.lang.String urlPrefix, java.io.File fileDir, java.util.List<java.lang.String> urlsToIgnore)
private void
generateSiteMapAsMultiple(java.lang.String currentDomain, java.lang.String siteUrl, java.lang.String urlPrefix, java.io.File fileDir, java.util.List<java.lang.String> urlsToIgnore)
private java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>
getLangMap(java.lang.String link)
java.util.HashSet<java.lang.String>
getPageLinks(java.lang.String baseURL, java.lang.String URL, java.util.HashSet<java.lang.String> links, java.util.List<java.lang.String> urlsToIgnore)
This method returns a page links set.boolean
isWorkInProgress()
Checks if the work is in progress.
-
-
-
Field Detail
-
commonProperties
@Autowired private CommonProperties commonProperties
-
webSocketService
@Autowired private WebSocketService webSocketService
-
jobService
@Autowired private JobsManagementService jobService
-
job
private Job job
-
jobsEndpoint
private final java.lang.String jobsEndpoint
- See Also:
- Constant Field Values
-
username
private java.lang.String username
-
status
private co.mastermindcms.modules.enums.ServiceState status
-
mapper
private static final com.fasterxml.jackson.databind.ObjectMapper mapper
-
-
Method Detail
-
generateSiteMap
@Async("asyncTaskExecutor") public void generateSiteMap(java.util.LinkedHashMap<java.lang.String,java.lang.Object> siteMapRequest)
Description copied from interface:SitemapGeneratorService
This method generate a site map entity.- Specified by:
generateSiteMap
in interfaceSitemapGeneratorService
- Parameters:
siteMapRequest
- map-representation of request contains an instructions for create site map
-
generateSiteMapAsGlobal
private void generateSiteMapAsGlobal(java.lang.String currentDomain, java.lang.String siteUrl, java.lang.String urlPrefix, java.io.File fileDir, java.util.List<java.lang.String> urlsToIgnore)
-
generateSiteMapAsMultiple
private void generateSiteMapAsMultiple(java.lang.String currentDomain, java.lang.String siteUrl, java.lang.String urlPrefix, java.io.File fileDir, java.util.List<java.lang.String> urlsToIgnore)
-
getLangMap
private java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> getLangMap(java.lang.String link)
-
getPageLinks
public java.util.HashSet<java.lang.String> getPageLinks(java.lang.String baseURL, java.lang.String URL, java.util.HashSet<java.lang.String> links, java.util.List<java.lang.String> urlsToIgnore)
Description copied from interface:SitemapGeneratorService
This method returns a page links set.- Specified by:
getPageLinks
in interfaceSitemapGeneratorService
- Parameters:
baseURL
- url to start fromURL
- url link for add set linkslinks
- set-representation of links, which will be updatedurlsToIgnore
- list of urls for filter and ignored- Returns:
- set of links from parsed page
-
isWorkInProgress
public boolean isWorkInProgress()
Description copied from interface:SitemapGeneratorService
Checks if the work is in progress.- Specified by:
isWorkInProgress
in interfaceSitemapGeneratorService
- Returns:
- true if the work is in progress, false otherwise
-
changeStatus
public void changeStatus(co.mastermindcms.modules.enums.ServiceState status)
Description copied from interface:SitemapGeneratorService
Changes the status of the service.- Specified by:
changeStatus
in interfaceSitemapGeneratorService
- Parameters:
status
- the new service status.
-
-