Package org.opencms.module
Class CmsModuleImportExportRepository
java.lang.Object
org.opencms.module.CmsModuleImportExportRepository
Class which manages import/export of modules from repositories configured in opencms-importexport.xml.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classHolds exported module data and a modification date. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandeleteModule(String fileName) Deletes the module corresponding to the given virtual module file name.getExportedModuleData(String virtualModuleFileName, CmsProject project) Exports a module and returns the export zip file content in a byte array.Gets the list of modules as file names.Gets the object used to access the module log.voidimportModule(String name, byte[] content) Imports module data.voidinitialize(CmsObject adminCms) Initializes the CMS context.
-
Field Details
-
EXPORT_FOLDER_PATH
Export folder path.- See Also:
-
IMPORT_FOLDER_PATH
Import folder path.- See Also:
-
SUFFIX
Suffix for module zip files.- See Also:
-
-
Constructor Details
-
CmsModuleImportExportRepository
public CmsModuleImportExportRepository()Creates a new instance.
-
-
Method Details
-
deleteModule
Deletes the module corresponding to the given virtual module file name.- Parameters:
fileName- the file name- Returns:
- true if the module could be deleted
- Throws:
CmsException- if something goes wrong
-
getExportedModuleData
public CmsModuleImportExportRepository.ModuleExportData getExportedModuleData(String virtualModuleFileName, CmsProject project) throws CmsException Exports a module and returns the export zip file content in a byte array.- Parameters:
virtualModuleFileName- the virtual file name for the moduleproject- the project from which the module should be exported- Returns:
- the module export data
- Throws:
CmsException- if something goes wrong
-
getModuleFileNames
Gets the list of modules as file names.- Returns:
- the list of modules as file names
-
getModuleLog
Gets the object used to access the module log.- Returns:
- the module log
-
importModule
Imports module data.- Parameters:
name- the module file namecontent- the module ZIP file data- Throws:
CmsException- if something goes wrong
-
initialize
Initializes the CMS context.- Parameters:
adminCms- the admin CMS context
-