Package org.opencms.staticexport
Class A_CmsStaticExportHandler
java.lang.Object
org.opencms.staticexport.A_CmsStaticExportHandler
- All Implemented Interfaces:
I_CmsStaticExportHandler
- Direct Known Subclasses:
A_CmsOnDemandStaticExportHandler
,CmsAfterPublishStaticExportHandler
Abstract base implementation for the
I_CmsStaticExportHandler
interface.This class provides several util methods to be used by static export handlers.
- Since:
- 6.1.7
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
Indicates if this content handler is busy. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected List<CmsPublishedResource>
addMovedLinkSources
(CmsObject cms, List<CmsPublishedResource> publishedResources) Add the link sources of moved resources to the list of published resources.getRelatedFilesToPurge
(String exportFileName, String vfsName) Returns a list of related files to purge.getSiblingsList
(CmsObject cms, String resPath) Returns a list containing the root paths of all siblings of a resource.boolean
isBusy()
Returnstrue
if this static export handler is currently performing a static export operation.abstract void
performEventPublishProject
(CmsUUID publishHistoryId, I_CmsReport report) Scrubs files from the export folder that might have been changed.protected void
Deletes the given file from the RFS if it exists, also deletes all parameter variations of the file.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.protected void
scrubResource
(CmsObject cms, CmsPublishedResource res, Set<String> scrubbedFolders, Set<String> scrubbedFiles) Scrub a single file or folder.
-
Field Details
-
m_busy
Indicates if this content handler is busy.
-
-
Constructor Details
-
A_CmsStaticExportHandler
public A_CmsStaticExportHandler()
-
-
Method Details
-
isBusy
Description copied from interface:I_CmsStaticExportHandler
Returnstrue
if this static export handler is currently performing a static export operation.- Specified by:
isBusy
in interfaceI_CmsStaticExportHandler
- Returns:
true
if this static export handler is currently performing a static export operation- See Also:
-
performEventPublishProject
Description copied from interface:I_CmsStaticExportHandler
Scrubs files from the export folder that might have been changed.- Specified by:
performEventPublishProject
in interfaceI_CmsStaticExportHandler
- Parameters:
publishHistoryId
- the
of the published projectCmsUUID
report
- an
instance to print output message, orI_CmsReport
null
to write messages to the log file- See Also:
-
scrubExportFolders
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- Returns:
- the list of
CmsPublishedResource
objects to export
-
addMovedLinkSources
protected List<CmsPublishedResource> addMovedLinkSources(CmsObject cms, List<CmsPublishedResource> publishedResources) Add the link sources of moved resources to the list of published resources.- Parameters:
cms
- the cms contextpublishedResources
- the published resources- Returns:
- the list of published resources included the link sources of moved resources
-
getRelatedFilesToPurge
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
-
getSiblingsList
Returns a list containing the root paths of all siblings of a resource.- Parameters:
cms
- the export user contextresPath
- the path of the resource to get the siblings for- Returns:
- a list containing the root paths of all siblings of a resource
-
purgeFile
Deletes the given file from the RFS if it exists, also deletes all parameter variations of the file.- Parameters:
rfsFilePath
- the path of the RFS file to deletevfsName
- the VFS name of the file to delete (required for logging)
-
scrubResource
protected void scrubResource(CmsObject cms, CmsPublishedResource res, Set<String> scrubbedFolders, Set<String> scrubbedFiles) Scrub a single file or folder.- Parameters:
cms
- an export cms objectres
- the resource to checkscrubbedFolders
- the list of already scrubbed foldersscrubbedFiles
- the list of already scrubbed files
-