|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.service.scheduler.SchedulableService
atg.service.scheduler.SingletonSchedulableService
atg.sitemap.SitemapGeneratorService
public class SitemapGeneratorService
This service is responsible for sitemap and siteindex generation. It could be run by schedule or manually using ATG Dynamo Admin UI.
This service iterates over the array ofSitemapGenerator
and invoke SitemapGenerator.generateSitemap()
method.
Each generator creates repository items of type sitemap
.
After sitemap generators are done, SitemapGeneratorService invokes
SitemapIndexGenerator
. This component generates special repository item
if type siteindex
. This repository item contains of links to every sitemap was generated.
To allow schedule this service extends SingletonSchedulableService
what
guarateed that only one instance of SitemapGeneratorService
wiil run.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from class atg.service.scheduler.SchedulableService |
---|
mJobId |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
SitemapGeneratorService()
|
Method Summary | |
---|---|
void |
doScheduledTask(Scheduler pScheduler,
ScheduledJob pJob)
Generate sitemap and siteindex repository items by schedule. |
void |
generateSitemaps()
This method is responsible for sitemap and siteindex generation. |
int |
getMaxSitemapSize()
Returns maximum allowed sitemap size in bytes. |
int |
getMaxUrlsPerSitemap()
Returns maximum allowed count of URLs per sitemap. |
atg.multisite.SiteContextManager |
getSiteContextManager()
get SiteContextManager - the SiteContext management component |
SitemapGenerator[] |
getSitemapGenerators()
Returns array of sitemap generators. |
SitemapIndexGenerator |
getSitemapIndexGenerator()
Returns sitemap index generator. |
SitemapPropertiesManager |
getSitemapPropertiesManager()
Returns SitemapPropertiesManager - utility class which provide property names for SitemapRepository . |
MutableRepository |
getSitemapRepository()
Returns current sitemap repository. |
SitemapTools |
getSitemapTools()
Returns utility class for handling repository items of types sitemap and siteindex. |
java.util.List<java.lang.String> |
getSites()
Returns list of site IDs for which sitemaps should be generated |
atg.multisite.SiteURLManager |
getSiteURLManager()
Returns SiteURLManager - the Site URL manager |
java.lang.String |
getUrlPrefix()
Returns URL prefix to the application with protocol, host, port. |
java.lang.String |
getWarDir()
Returns path where applications's war is located. |
WebApp |
getWebApp()
Returns representation of web application in WebApp . |
boolean |
isActiveSitesOnly()
|
boolean |
isDebugMode()
|
boolean |
isEnabledSitesOnly()
|
void |
setActiveSitesOnly(boolean pActiveSitesOnly)
Sets ActiveSitesOnly boolean. |
void |
setDebugMode(boolean pDebugMode)
Sets debugMode for sitemap and siteindex generation. |
void |
setEnabledSitesOnly(boolean pEnabledSitesOnly)
Sets EnabledSitesOnly boolean. |
void |
setMaxSitemapSize(int pMaxSitemapSize)
Sets maximum allowed sitemap size in bytes. |
void |
setMaxUrlsPerSitemap(int pMaxUrlsPerSitemap)
Sets maximum allowed count of URLs per sitemap. |
void |
setSiteContextManager(atg.multisite.SiteContextManager pSiteContextManager)
set SiteContextManager - the SiteContext management component |
void |
setSitemapGenerators(SitemapGenerator[] pSitemapGenerators)
Sets an array of sitemap generators. |
void |
setSitemapIndexGenerator(SitemapIndexGenerator pSitemapIndexGenerator)
Sets new SitemapIndexGenerator service. |
void |
setSitemapPropertiesManager(SitemapPropertiesManager pSitemapPropertiesManager)
Sets new property manager - utility class which provide property names for SitemapRepository . |
void |
setSitemapRepository(MutableRepository pSitemapRepository)
Sets new sitemap repository. |
void |
setSitemapTools(SitemapTools pSitemapTools)
Sets new SitemapTools . |
void |
setSiteURLManager(atg.multisite.SiteURLManager pSiteURLManager)
Sets new SiteURLManager |
void |
setUrlPrefix(java.lang.String pUrlPrefix)
Sets new URL prefix with protocol, host, port. |
void |
setWarDir(java.lang.String pWarDir)
Sets new path where to war directory. |
void |
setWebApp(WebApp pWebApp)
Sets new web application. |
Methods inherited from class atg.service.scheduler.SingletonSchedulableService |
---|
acquireLock, getClientLockManager, getLockName, getLockTimeOut, performScheduledTask, releaseLock, setClientLockManager, setLockName, setLockTimeOut |
Methods inherited from class atg.service.scheduler.SchedulableService |
---|
doStartService, doStopService, getJobDescription, getJobId, getJobName, getSchedule, getScheduler, getThreadMethod, isTransactional, setJobDescription, setJobName, setSchedule, setScheduler, setThreadMethod, setTransactional, startScheduledJob, stopScheduledJob |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public SitemapGeneratorService()
Method Detail |
---|
public MutableRepository getSitemapRepository()
public void setSitemapRepository(MutableRepository pSitemapRepository)
SitemapRepository
- the MutableRepository to set.public SitemapGenerator[] getSitemapGenerators()
sitemap
where
containts information for definite type, e.g. product, category, etc.
public void setSitemapGenerators(SitemapGenerator[] pSitemapGenerators)
pSitemapGenerators[]
- - the array of sitemap generators to set.public SitemapIndexGenerator getSitemapIndexGenerator()
siteindex
which contains links to sitemaps
.
public void setSitemapIndexGenerator(SitemapIndexGenerator pSitemapIndexGenerator)
siteindex
which contains links to sitemaps
.
pSitemapIndexGenerator
- - new sitemap index generatorpublic java.lang.String getWarDir()
public void setWarDir(java.lang.String pWarDir)
WarDir
- directory where application's war is located.public java.lang.String getUrlPrefix()
public void setUrlPrefix(java.lang.String pUrlPrefix)
UrlPrefix
- new URL prefixpublic int getMaxSitemapSize()
public void setMaxSitemapSize(int pMaxSitemapSize)
maxSitemapSize
- maximum allowed sitemap size in bytespublic int getMaxUrlsPerSitemap()
public void setMaxUrlsPerSitemap(int pMaxUrlsPerSitemap)
maxUrlsPerSitemap
- maximum allowed count of URLs per sitemappublic WebApp getWebApp()
WebApp
.
Used to retrieve application's context root.
public void setWebApp(WebApp pWebApp)
WebApp
- new WebApp componentpublic SitemapPropertiesManager getSitemapPropertiesManager()
SitemapRepository
.
public void setSitemapPropertiesManager(SitemapPropertiesManager pSitemapPropertiesManager)
SitemapRepository
.
SitemapPropertiesManager
- properties manager to setpublic SitemapTools getSitemapTools()
public void setSitemapTools(SitemapTools pSitemapTools)
SitemapTools
.
SitemapTools
- the SitemapTools to setpublic atg.multisite.SiteURLManager getSiteURLManager()
public void setSiteURLManager(atg.multisite.SiteURLManager pSiteURLManager)
SiteURLManager
- Site URL manager to setpublic void setSiteContextManager(atg.multisite.SiteContextManager pSiteContextManager)
pSiteContextManager
- the SiteContextManagerpublic atg.multisite.SiteContextManager getSiteContextManager()
public boolean isDebugMode()
public void setDebugMode(boolean pDebugMode)
pDebugMode=true
the generators will
produce formatted sitemaps and siteindex items.
DebugMode
- the boolean value to setpublic boolean isEnabledSitesOnly()
public void setEnabledSitesOnly(boolean pEnabledSitesOnly)
pEnabledSitesOnly
- the boolean value to setpublic boolean isActiveSitesOnly()
public void setActiveSitesOnly(boolean pActiveSitesOnly)
pActiveSitesOnly
- the boolean value to setpublic void generateSitemaps()
Before generators are started, remove old items from
SitemapRepository
.
Iterate over the array of SitemapGenerator
and invoke
SitemapGenerator.generateSitemap()
method.
Each generator creates repository items of type sitemap
.
After sitemap generators are done, SitemapGeneratorService invokes
SitemapIndexGenerator
. This component generates special repository item
if type siteindex
. This repository item contains of links
to every sitemap was generated.
public void doScheduledTask(Scheduler pScheduler, ScheduledJob pJob)
doScheduledTask
in class SingletonSchedulableService
pScheduler
- scheduler instancepJob
- scheduled jobpublic java.util.List<java.lang.String> getSites()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |