org.opencms.staticexport
Class A_CmsOnDemandStaticExportHandler

java.lang.Object
  extended by org.opencms.staticexport.A_CmsOnDemandStaticExportHandler
All Implemented Interfaces:
I_CmsStaticExportHandler
Direct Known Subclasses:
CmsOnDemandHtmlSubTreeHandler, CmsOnDemandStaticExportHandler

public abstract class A_CmsOnDemandStaticExportHandler
extends Object
implements I_CmsStaticExportHandler

Abstract implementation for the I_CmsStaticExportHandler interface.

This handler is most suitable for dynamic sites that use the static export as optimization for non-dynamic content.

Since:
6.0.0
Version:
$Revision: 1.19 $
Author:
Michael Moossen
See Also:
I_CmsStaticExportHandler

Field Summary
protected  boolean m_busy
          Indicates if this content handler is busy.
 
Constructor Summary
A_CmsOnDemandStaticExportHandler()
           
 
Method Summary
protected abstract  List getRelatedFilesToPurge(String exportFileName, String vfsName)
          Returns a list of related files to purge.
 boolean isBusy()
          Returns true if this static export handler is currently performing a static export operation.
 void performEventPublishProject(CmsUUID publishHistoryId, I_CmsReport report)
          Scrubs files from the export folder that might have been changed.
 void scrubExportFolders(CmsUUID publishHistoryId)
          Scrubs all files from the export folder that might have been changed, so that the export is newly created after the next request to the resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_busy

protected boolean m_busy
Indicates if this content handler is busy.

Constructor Detail

A_CmsOnDemandStaticExportHandler

public A_CmsOnDemandStaticExportHandler()
Method Detail

isBusy

public boolean isBusy()
Description copied from interface: I_CmsStaticExportHandler
Returns true if this static export handler is currently performing a static export operation.

Specified by:
isBusy in interface I_CmsStaticExportHandler
Returns:
true if this static export handler is currently performing a static export operation
See Also:
I_CmsStaticExportHandler.isBusy()

performEventPublishProject

public void performEventPublishProject(CmsUUID publishHistoryId,
                                       I_CmsReport report)
Description copied from interface: I_CmsStaticExportHandler
Scrubs files from the export folder that might have been changed.

Specified by:
performEventPublishProject in interface I_CmsStaticExportHandler
Parameters:
publishHistoryId - the CmsUUID of the published project
report - an I_CmsReport instance to print output message, or null to write messages to the log file
See Also:
I_CmsStaticExportHandler.performEventPublishProject(org.opencms.util.CmsUUID, org.opencms.report.I_CmsReport)

scrubExportFolders

public void scrubExportFolders(CmsUUID publishHistoryId)
Scrubs all files from the export folder that might have been changed, so that the export is newly created after the next request to the resource.

Parameters:
publishHistoryId - id of the last published project

getRelatedFilesToPurge

protected abstract List getRelatedFilesToPurge(String exportFileName,
                                               String vfsName)
Returns a list of related files to purge.

Parameters:
exportFileName - the previous exported rfs filename (already purged)
vfsName - the vfs name of the resource (to be used to compute more sofisticated sets of related files to purge
Returns:
a list of related files to purge