atg.sitemap
Class SitemapWriterService

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.service.scheduler.SchedulableService
              extended by atg.service.scheduler.SingletonSchedulableService
                  extended by atg.sitemap.SitemapWriterService
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, Schedulable, java.util.EventListener

public class SitemapWriterService
extends SingletonSchedulableService

This service creates copies of sitemap and siteindex files to the local file system. It could be run by schedule or manually using ATG Dynamo Admin UI.


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
SitemapWriterService()
           
 
Method Summary
 void doScheduledTask(Scheduler pScheduler, ScheduledJob pJob)
          Writes sitemap and siteindex files by schedule.
 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.lang.String getWarDir()
          Returns path where applications's war is located.
 void setSitemapPropertiesManager(SitemapPropertiesManager pSitemapPropertiesManager)
          Sets new property manager.
 void setSitemapRepository(MutableRepository pSitemapRepository)
          Sets new sitemap repository.
 void setSitemapTools(SitemapTools pSitemapTools)
          Sets new SitemapTools.
 void setWarDir(java.lang.String pWarDir)
          Sets new path where to war directory.
 void writeItemsToFiles(RepositoryItem[] pItems)
          Write array of repository items to local file system.
 void writeItemToFile(RepositoryItem pItem)
          Write repository item to local file in warDir.
 void writeSiteindex(RepositoryItem[] pSiteindex)
          Write siteindex files.
 void writeSitemapFiles()
          Writes sitemap and siteindex files to the file system.
 void writeSitemaps(RepositoryItem[] pSitemaps)
          Write sitemap files.
 
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.GenericService
addLogListener, createAdminServlet, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
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

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

SitemapWriterService

public SitemapWriterService()
Method Detail

getSitemapRepository

public MutableRepository getSitemapRepository()
Returns current sitemap repository.

Returns:
the current SitemapRepository.

setSitemapRepository

public void setSitemapRepository(MutableRepository pSitemapRepository)
Sets new sitemap repository.

Parameters:
SitemapRepository - the MutableRepository to set.

getWarDir

public java.lang.String getWarDir()
Returns path where applications's war is located.

Returns:
directory where application's war is located.

setWarDir

public void setWarDir(java.lang.String pWarDir)
Sets new path where to war directory.

Parameters:
WarDir - directory where application's war is located.

getSitemapPropertiesManager

public SitemapPropertiesManager getSitemapPropertiesManager()
Returns SitemapPropertiesManager - utility class which provide property names for SitemapRepository.

Returns:
properties manager

setSitemapPropertiesManager

public void setSitemapPropertiesManager(SitemapPropertiesManager pSitemapPropertiesManager)
Sets new property manager.

Parameters:
SitemapPropertiesManager - properties manager to set

getSitemapTools

public SitemapTools getSitemapTools()
Returns utility class for handling repository items of types sitemap and siteindex.

Returns:
the SitemapTools component

setSitemapTools

public void setSitemapTools(SitemapTools pSitemapTools)
Sets new SitemapTools.

Parameters:
SitemapTools - the SitemapTools to set

doScheduledTask

public void doScheduledTask(Scheduler pScheduler,
                            ScheduledJob pJob)
Writes sitemap and siteindex files by schedule.

Specified by:
doScheduledTask in class SingletonSchedulableService
Parameters:
pScheduler - Scheduler
pJob - Scheduled job

writeSitemapFiles

public void writeSitemapFiles()
Writes sitemap and siteindex files to the file system.


writeSitemaps

public void writeSitemaps(RepositoryItem[] pSitemaps)
Write sitemap files.

Parameters:
pSitemaps - array of repository items that contains data for sitemap files

writeSiteindex

public void writeSiteindex(RepositoryItem[] pSiteindex)
Write siteindex files.

Parameters:
pSiteindex - array of repository items that contains data for siteindex files

writeItemsToFiles

public void writeItemsToFiles(RepositoryItem[] pItems)
Write array of repository items to local file system.

Parameters:
pItems - array of repository items that contains sitemap or siteindex repository items

writeItemToFile

public void writeItemToFile(RepositoryItem pItem)
Write repository item to local file in warDir.

Parameters:
pItem - RepositoryItem sitemap or siteindex repository item.