|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.db.CmsExportPointDriver
public class CmsExportPointDriver
Provides methods to write export points to the "real" file system.
Constructor Summary | |
---|---|
CmsExportPointDriver(java.util.Set exportpoints)
Constructor for a CmsExportPointDriver. |
Method Summary | |
---|---|
void |
createFolder(java.lang.String resourceName,
java.lang.String exportpoint)
If required, creates the folder with the given root path in the real file system. |
void |
deleteResource(java.lang.String resourceName,
java.lang.String exportpoint)
Deletes a file or a folder in the real file sytem. |
java.lang.String |
getExportPoint(java.lang.String rootPath)
Returns the export point path for the given resource root path, 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 |
writeFile(java.lang.String resourceName,
java.lang.String exportpoint,
byte[] content)
Writes the file with the given root path 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 |
---|
public CmsExportPointDriver(java.util.Set exportpoints)
exportpoints
- the list of export pointsMethod Detail |
---|
public void createFolder(java.lang.String resourceName, java.lang.String exportpoint)
resourceName
- the root path of the folder to createexportpoint
- the export point to create the folder inpublic void deleteResource(java.lang.String resourceName, java.lang.String exportpoint)
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.
resourceName
- the root path of the resource to be deletedexportpoint
- the name of the export pointpublic java.lang.String getExportPoint(java.lang.String rootPath)
null
if the resource is not contained in
any export point.
rootPath
- the root path of a resource in the OpenCms VFS
null
if the resource is not contained in
any export pointpublic java.util.Set getExportPointPaths()
public void writeFile(java.lang.String resourceName, java.lang.String exportpoint, byte[] content)
If required, missing parent folders in the real file system are automatically created.
resourceName
- the root path of the file to writeexportpoint
- the export point to write file tocontent
- the contents of the file to write
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |