* @param keepSoftkey If true, no new softkey will be generated.
* @param owner
* @return
*/
public static RepositoryEntry doImport(RepositoryEntryImportExport importExport, ICourse course, boolean keepSoftkey, Identity owner) {
SharedFolderManager sfm = SharedFolderManager.getInstance();
SharedFolderFileResource resource = sfm.createSharedFolder();
if (resource == null) {
Tracing.logError("Error adding file resource during repository reference import: " + importExport.getDisplayName(), ImportSharedfolderReferencesController.class);
return null;
}
// unzip contents
VFSContainer sfContainer = sfm.getSharedFolder(resource);
File fExportedFile = importExport.importGetExportedFile();
if (fExportedFile.exists())
ZipUtil.unzip(new LocalFileImpl(fExportedFile), sfContainer);
else
Tracing.logWarn("The actual contents of the shared folder were not found in the export.", ImportSharedfolderReferencesController.class);