|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface I_CmsImportExportHandler
An import/export handler is an abstract layer to hide the logic how to import/export a specific type of Cms data.
To export data, you would create an instance of a class implementing this interface, and call the
implementation's setter methods to arrange which data should be exported. To write the export,
call CmsImportExportManager.exportData(CmsObject, I_CmsImportExportHandler, I_CmsReport).
To import data, call CmsImportExportManager.importData(CmsObject, String, String, I_CmsReport).
You don't have to worry about the contents of an imported a ZIP archive -
the import/export manager finds the right import/export handler implementation
to import the data. You can assign null to the importPath argument in case of a Cms module import.
Use OpenCms.getImportExportManager() to get the Cms import/export manager.
| Method Summary | |
|---|---|
void |
exportData(CmsObject cms,
I_CmsReport report)
Exports the data from the Cms. |
String |
getDescription()
Returns the description of this import/export handler. |
void |
importData(CmsObject cms,
String importFile,
String importPath,
I_CmsReport report)
Imports the data into the Cms. |
boolean |
matches(Document manifest)
Checks, if this import/export handler matches with a specified manifest document of an import, so that it is able to import the data listed in the manifest document. |
void |
setDescription(String description)
Sets the description of this import/export handler. |
| Method Detail |
|---|
void exportData(CmsObject cms,
I_CmsReport report)
throws CmsConfigurationException,
CmsImportExportException,
CmsRoleViolationException
cms - the current OpenCms context objectreport - a Cms report to print log messages
CmsImportExportException - if operation was not successful
CmsRoleViolationException - if the current user has not the required role
CmsConfigurationException - if a specified module to be exproted does not existString getDescription()
The description is useful to print some info about the purpose of this handler.
void importData(CmsObject cms,
String importFile,
String importPath,
I_CmsReport report)
throws CmsXmlException,
CmsImportExportException,
CmsRoleViolationException,
CmsException
cms - the current OpenCms context objectimportFile - the name (absolute path) of the resource (zipfile or folder) to be importedimportPath - the name (absolute path) of the destination folder in the Cms (if required)report - a Cms report to print log messages
CmsImportExportException - if operation was not successful
CmsRoleViolationException - if the current user has not the required role
CmsXmlException - if the manifest of the import could not be unmarshalled
CmsException - in case of errors accessing the VFSboolean matches(Document manifest)
manifest - the manifest.xml of the import as a dom4j XML document
void setDescription(String description)
The description is useful to print some info about the purpose of this handler.
description - the description of this import/export handler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||