org.opencms.db
Class CmsExportPointDriver

java.lang.Object
  extended byorg.opencms.db.CmsExportPointDriver

public class CmsExportPointDriver
extends java.lang.Object

Provides methods to write export points to the "real" file system.

Since:
6.0.0
Version:
$Revision: 1.19 $
Author:
Alexander Kandzior

Constructor Summary
CmsExportPointDriver(java.util.Set exportpoints)
          Constructor for a CmsExportPointDriver.
 
Method Summary
 void createFolder(java.lang.String foldername, java.lang.String exportpoint)
          Creates a new folder in the real file system.
 java.lang.String getExportPoint(java.lang.String filename)
          Returns the export point path of the given resource, or null if the resource is not contained in any export point.
 java.util.Set getExportPointPaths()
          Returns the set of all VFS paths that are exported as an export point.
 void removeResource(java.lang.String resourcename, java.lang.String exportpoint)
          Deletes a file (or folder) in the real file sytem.
 void writeFile(java.lang.String filename, java.lang.String exportpoint, byte[] content)
          Writes a file with the given content to the real file system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsExportPointDriver

public CmsExportPointDriver(java.util.Set exportpoints)
Constructor for a CmsExportPointDriver.

Parameters:
exportpoints - the list of export points
Method Detail

createFolder

public void createFolder(java.lang.String foldername,
                         java.lang.String exportpoint)
Creates a new folder in the real file system.

Parameters:
foldername - the complete path to the folder
exportpoint - the name of the export point

getExportPoint

public java.lang.String getExportPoint(java.lang.String filename)
Returns the export point path of the given resource, or null if the resource is not contained in any export point.

Parameters:
filename - the uri of a resource in the OpenCms VFS
Returns:
the matching export points path or null if no export point matches

getExportPointPaths

public java.util.Set getExportPointPaths()
Returns the set of all VFS paths that are exported as an export point.

Returns:
the set of all VFS paths that are exported as an export point

removeResource

public void removeResource(java.lang.String resourcename,
                           java.lang.String exportpoint)
Deletes a file (or folder) in the real file sytem.

Parameters:
resourcename - the complete path to the resource to be deleted
exportpoint - the name of the export point

writeFile

public void writeFile(java.lang.String filename,
                      java.lang.String exportpoint,
                      byte[] content)
Writes a file with the given content to the real file system.

Parameters:
filename - the path of the file to write
exportpoint - the name of the export point
content - the contents of the file to write