Class CmsTempFolderExportPointDriver

  • All Implemented Interfaces:
    I_CmsExportPointDriver

    public class CmsTempFolderExportPointDriver
    extends CmsExportPointDriver
    An alternative export point driver which replaces the RFS targets of some export points with locations in a temporary export folder. This is designed specifically for export points which map to WEB-INF/lib and WEB-INF/classes. The problem with these is that replacing jar files or classes does not work at runtime. If these files are written to a temp folder (which is not picked up by the servlet coontainer's class loader) instead, an external script can be used to update the actual export point locations based on the temp folder while the servlet container is stopped. Since the script needs to know which files to delete in the 'real' (not temporary) export point locations, deletions of files which are mapped to the temp export point folder are not handled by deleting the files in that folder, but rather by replacing them with "dummy" files containing a specific marker string (which is contained in the DELETE_MARKER variable), so the script that updates the 'real' folder needs to delete files if it comes across a file starting with that marker string.
    • Constructor Detail

      • CmsTempFolderExportPointDriver

        public CmsTempFolderExportPointDriver​(java.util.Set<CmsExportPoint> exportpoints,
                                              java.util.List<java.lang.String> tempFolderDestinations)
        Constructor for a CmsExportPointDriver.

        Parameters:
        exportpoints - the list of export points
        tempFolderDestinations - the export point destinations (relative to the web application folder) which should be replaced with
    • Method Detail

      • deleteResource

        public void deleteResource​(java.lang.String resourceName,
                                   java.lang.String exportpoint)
        Description copied from class: CmsExportPointDriver
        Deletes a file or a folder in the real file sytem.

        If the given resource name points to a folder, then this folder is only deleted if it is empty. This is required since the same export point RFS target folder may be used by multiple export points. For example, this is usually the case with the /WEB-INF/classes/ and /WEB-INF/lib/ folders which are export point for multiple modules. If all resources in the RFS target folder where deleted, uninstalling one module would delete the export classes and lib resources of all other modules.

        Specified by:
        deleteResource in interface I_CmsExportPointDriver
        Overrides:
        deleteResource in class CmsExportPointDriver
        Parameters:
        resourceName - the root path of the resource to be deleted
        exportpoint - the name of the export point
        See Also:
        I_CmsExportPointDriver.deleteResource(java.lang.String, java.lang.String)