public class CmsTempFolderExportPointDriver extends CmsExportPointDriver
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DELETE_MARKER
The content to be used for dummy files in the temporary export point folders which represent deleted files.
|
protected static byte[] |
DELETE_MARKER_BYTES
The byte array used to mark files as deleted.
|
static java.lang.String |
TEMP_EXPORTPOINT_FOLDER
The temp folder for export points.
|
m_exportpointLookupMap, m_exportpoints
Constructor and Description |
---|
CmsTempFolderExportPointDriver(java.util.Set<CmsExportPoint> exportpoints,
java.util.List<java.lang.String> tempFolderDestinations)
Constructor for a CmsExportPointDriver.
|
Modifier and Type | Method and Description |
---|---|
void |
deleteResource(java.lang.String resourceName,
java.lang.String exportpoint)
Deletes a file or a folder in the real file sytem.
|
void |
writeFile(java.lang.String resourceName,
java.lang.String exportpoint,
byte[] content)
Writes the file with the given root path to the real file system.
|
createFolder, getExportPoint, getExportPointFile, getExportPointPaths, writeResource, writeResource
public static final java.lang.String DELETE_MARKER
protected static byte[] DELETE_MARKER_BYTES
public static final java.lang.String TEMP_EXPORTPOINT_FOLDER
public CmsTempFolderExportPointDriver(java.util.Set<CmsExportPoint> exportpoints, java.util.List<java.lang.String> tempFolderDestinations)
exportpoints
- the list of export pointstempFolderDestinations
- the export point destinations (relative to the web application folder) which should be replaced withpublic void deleteResource(java.lang.String resourceName, java.lang.String exportpoint)
CmsExportPointDriver
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.
deleteResource
in interface I_CmsExportPointDriver
deleteResource
in class CmsExportPointDriver
resourceName
- the root path of the resource to be deletedexportpoint
- the name of the export pointI_CmsExportPointDriver.deleteResource(java.lang.String, java.lang.String)
public void writeFile(java.lang.String resourceName, java.lang.String exportpoint, byte[] content)
CmsExportPointDriver
If required, missing parent folders in the real file system are automatically created.
writeFile
in interface I_CmsExportPointDriver
writeFile
in class CmsExportPointDriver
resourceName
- the root path of the file to writeexportpoint
- the export point to write file tocontent
- the contents of the file to writeCmsExportPointDriver.writeFile(java.lang.String, java.lang.String, byte[])