Class A_CmsStaticExportHandler

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean m_busy
      Indicates if this content handler is busy.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.util.List<CmsPublishedResource> addMovedLinkSources​(CmsObject cms, java.util.List<CmsPublishedResource> publishedResources)
      Add the link sources of moved resources to the list of published resources.
      protected abstract java.util.List<java.io.File> getRelatedFilesToPurge​(java.lang.String exportFileName, java.lang.String vfsName)
      Returns a list of related files to purge.
      protected java.util.List<java.lang.String> getSiblingsList​(CmsObject cms, java.lang.String resPath)
      Returns a list containing the root paths of all siblings of a resource.
      boolean isBusy()
      Returns true 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 purgeFile​(java.lang.String rfsFilePath, java.lang.String vfsName)
      Deletes the given file from the RFS if it exists, also deletes all parameter variations of the file.
      java.util.List<CmsPublishedResource> 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, java.util.Set<java.lang.String> scrubbedFolders, java.util.Set<java.lang.String> scrubbedFiles)
      Scrub a single file or folder.
      • 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.
    • Method Detail

      • scrubExportFolders

        public java.util.List<CmsPublishedResourcescrubExportFolders​(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
        Returns:
        the list of CmsPublishedResource objects to export
      • addMovedLinkSources

        protected java.util.List<CmsPublishedResourceaddMovedLinkSources​(CmsObject cms,
                                                                           java.util.List<CmsPublishedResource> publishedResources)
        Add the link sources of moved resources to the list of published resources.

        Parameters:
        cms - the cms context
        publishedResources - the published resources
        Returns:
        the list of published resources included the link sources of moved resources
      • getRelatedFilesToPurge

        protected abstract java.util.List<java.io.File> getRelatedFilesToPurge​(java.lang.String exportFileName,
                                                                               java.lang.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
      • getSiblingsList

        protected java.util.List<java.lang.String> getSiblingsList​(CmsObject cms,
                                                                   java.lang.String resPath)
        Returns a list containing the root paths of all siblings of a resource.

        Parameters:
        cms - the export user context
        resPath - the path of the resource to get the siblings for
        Returns:
        a list containing the root paths of all siblings of a resource
      • purgeFile

        protected void purgeFile​(java.lang.String rfsFilePath,
                                 java.lang.String vfsName)
        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 delete
        vfsName - the VFS name of the file to delete (required for logging)
      • scrubResource

        protected void scrubResource​(CmsObject cms,
                                     CmsPublishedResource res,
                                     java.util.Set<java.lang.String> scrubbedFolders,
                                     java.util.Set<java.lang.String> scrubbedFiles)
        Scrub a single file or folder.

        Parameters:
        cms - an export cms object
        res - the resource to check
        scrubbedFolders - the list of already scrubbed folders
        scrubbedFiles - the list of already scrubbed files