public class CmsModuleImportExportRepository extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
EXPORT_FOLDER_PATH
Export folder path.
|
static java.lang.String |
IMPORT_FOLDER_PATH
Import folder path.
|
static java.lang.String |
SUFFIX
Suffix for module zip files.
|
| Constructor and Description |
|---|
CmsModuleImportExportRepository()
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
deleteModule(java.lang.String fileName)
Deletes the module corresponding to the given virtual module file name.
|
byte[] |
getExportedModuleData(java.lang.String virtualModuleFileName,
CmsProject project)
Exports a module and returns the export zip file content in a byte array.
|
java.util.List<java.lang.String> |
getModuleFileNames()
Gets the list of modules as file names.
|
CmsModuleLog |
getModuleLog()
Gets the object used to access the module log.
|
void |
importModule(java.lang.String name,
byte[] content)
Imports module data.
|
void |
initialize(CmsObject adminCms)
Initializes the CMS context.
|
public static final java.lang.String EXPORT_FOLDER_PATH
public static final java.lang.String IMPORT_FOLDER_PATH
public static final java.lang.String SUFFIX
public CmsModuleImportExportRepository()
public boolean deleteModule(java.lang.String fileName) throws CmsException
fileName - the file nameCmsException - if something goes wrongpublic byte[] getExportedModuleData(java.lang.String virtualModuleFileName, CmsProject project) throws CmsException
virtualModuleFileName - the virtual file name for the moduleproject - the project from which the module should be exportedCmsException - if something goes wrongpublic java.util.List<java.lang.String> getModuleFileNames()
public CmsModuleLog getModuleLog()
public void importModule(java.lang.String name, byte[] content) throws CmsException
name - the module file namecontent - the module ZIP file dataCmsException - if something goes wrongpublic void initialize(CmsObject adminCms)
adminCms - the admin CMS context