public class CmsModuleImportExportHandler extends java.lang.Object implements I_CmsImportExportHandler
| 构造器和说明 |
|---|
CmsModuleImportExportHandler()
Creates a new Cms module import/export handler.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
exportData(CmsObject cms,
I_CmsReport report)
Exports the data from the Cms.
|
java.util.List<java.lang.String> |
getAdditionalResources()
Returns the VFS resources to be exported additionally with the module.
|
java.lang.String |
getDescription()
Returns the description of this import/export handler.
|
java.lang.String |
getFileName()
Returns the name of the export file in the real file system.
|
CmsImportParameters |
getImportParameters()
Returns the import parameters.
|
java.lang.String |
getModuleName()
Returns the (package) name of the module to be exported.
|
java.util.List<java.lang.String> |
getResourcesAsList()
Returns the VFS resources to be exported additionally with the module as a list.
|
void |
importData(CmsObject cms,
I_CmsReport report)
Imports the data into the Cms.
|
void |
importData(CmsObject cms,
java.lang.String importFile,
java.lang.String importPath,
I_CmsReport report)
已过时。
use
importData(CmsObject, I_CmsReport) instead |
boolean |
matches(org.dom4j.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.
|
static CmsModule |
readModuleFromImport(java.lang.String importResource)
Reads a module object from an external file source.
|
void |
setAdditionalResources(java.lang.String[] resources)
Sets the VFS resources to be exported additionally with the module.
|
void |
setDescription(java.lang.String description)
Sets the description of this import/export handler.
|
void |
setFileName(java.lang.String fileName)
Sets the name of the export file in the real file system.
|
void |
setImportParameters(CmsImportParameters importParams)
Sets the import parameters.
|
void |
setModule(CmsModuleXmlHandler moduleHandler)
Will be called by the digester if a module was imported.
|
void |
setModuleName(java.lang.String moduleName)
Sets the (package) name of the module to be exported.
|
public CmsModuleImportExportHandler()
public static CmsModule readModuleFromImport(java.lang.String importResource) throws CmsConfigurationException
importResource - the name of the input sourceCmsConfigurationException - if the module could not be importedpublic void exportData(CmsObject cms, I_CmsReport report) throws CmsConfigurationException, CmsImportExportException, CmsRoleViolationException
I_CmsImportExportHandlerexportData 在接口中 I_CmsImportExportHandlercms - the current OpenCms context objectreport - a Cms report to print log messagesCmsConfigurationException - if a specified module to be exported does not existCmsImportExportException - if operation was not successfulCmsRoleViolationException - if the current user has not the required roleI_CmsImportExportHandler.exportData(org.opencms.file.CmsObject, org.opencms.report.I_CmsReport)public java.util.List<java.lang.String> getAdditionalResources()
public java.lang.String getDescription()
I_CmsImportExportHandlerThe description is useful to print some info about the purpose of this handler.
getDescription 在接口中 I_CmsImportExportHandlerI_CmsImportExportHandler.getDescription()public java.lang.String getFileName()
public CmsImportParameters getImportParameters()
getImportParameters 在接口中 I_CmsImportExportHandlerpublic java.lang.String getModuleName()
public java.util.List<java.lang.String> getResourcesAsList()
public void importData(CmsObject cms, I_CmsReport report) throws CmsXmlException, CmsImportExportException, CmsRoleViolationException, CmsException
I_CmsImportExportHandlerimportData 在接口中 I_CmsImportExportHandlercms - the current OpenCms context objectreport - a Cms report to print log messagesCmsXmlException - if the manifest of the import could not be unmarshalledCmsImportExportException - if operation was not successfulCmsRoleViolationException - if the current user has not the required roleCmsException - in case of errors accessing the VFSI_CmsImportExportHandler.importData(CmsObject, I_CmsReport)@Deprecated public void importData(CmsObject cms, java.lang.String importFile, java.lang.String importPath, I_CmsReport report) throws CmsXmlException, CmsImportExportException, CmsRoleViolationException, CmsException
importData(CmsObject, I_CmsReport) insteadI_CmsImportExportHandlerimportData 在接口中 I_CmsImportExportHandlercms - the current OpenCms context objectimportFile - the name (absolute path) of the resource (zip file 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 messagesCmsXmlException - if the manifest of the import could not be unmarshalledCmsImportExportException - if operation was not successfulCmsRoleViolationException - if the current user has not the required roleCmsException - in case of errors accessing the VFSI_CmsImportExportHandler.importData(org.opencms.file.CmsObject, java.lang.String, java.lang.String, org.opencms.report.I_CmsReport)public boolean matches(org.dom4j.Document manifest)
I_CmsImportExportHandlermatches 在接口中 I_CmsImportExportHandlermanifest - the manifest.xml of the import as a dom4j XML documentI_CmsImportExportHandler.matches(org.dom4j.Document)public void setAdditionalResources(java.lang.String[] resources)
resources - the VFS resources to be exported additionally with the modulepublic void setDescription(java.lang.String description)
I_CmsImportExportHandlerThe description is useful to print some info about the purpose of this handler.
setDescription 在接口中 I_CmsImportExportHandlerdescription - the description of this import/export handlerI_CmsImportExportHandler.setDescription(java.lang.String)public void setFileName(java.lang.String fileName)
fileName - the name of the export file in the real file systempublic void setImportParameters(CmsImportParameters importParams)
setImportParameters 在接口中 I_CmsImportExportHandlerimportParams - the parameters to setpublic void setModule(CmsModuleXmlHandler moduleHandler)
moduleHandler - contains the imported modulepublic void setModuleName(java.lang.String moduleName)
moduleName - the (package) name of the module to be exported