ZipUtil.unzip(new LocalFileImpl(fExportedFile), sfContainer);
else
Tracing.logWarn("The actual contents of the shared folder were not found in the export.", ImportSharedfolderReferencesController.class);
// create repository entry
RepositoryManager rm = RepositoryManager.getInstance();
RepositoryEntry importedRepositoryEntry = rm.createRepositoryEntryInstance(owner.getName());
importedRepositoryEntry.setDisplayname(importExport.getDisplayName());
importedRepositoryEntry.setResourcename(importExport.getResourceName());
importedRepositoryEntry.setDescription(importExport.getDescription());
if (keepSoftkey)
importedRepositoryEntry.setSoftkey(importExport.getSoftkey());
// Set the resource on the repository entry.
OLATResource ores = OLATResourceManager.getInstance().findOrPersistResourceable(resource);
importedRepositoryEntry.setOlatResource(ores);
RepositoryHandler rh = RepositoryHandlerFactory.getInstance().getRepositoryHandler(importedRepositoryEntry);
importedRepositoryEntry.setCanLaunch(rh.supportsLaunch());
// create security group
Manager securityManager = ManagerFactory.getManager();
SecurityGroup newGroup = securityManager.createAndPersistSecurityGroup();
// member of this group may modify member's membership
securityManager.createAndPersistPolicy(newGroup, Constants.PERMISSION_ACCESS, newGroup);
// members of this group are always authors also
securityManager.createAndPersistPolicy(newGroup, Constants.PERMISSION_HASROLE, Constants.ORESOURCE_AUTHOR);
securityManager.addIdentityToSecurityGroup(owner, newGroup);
importedRepositoryEntry.setOwnerGroup(newGroup);
rm.saveRepositoryEntry(importedRepositoryEntry);
if (!keepSoftkey) {
// set the new shared folder reference
CourseConfig courseConfig = course.getCourseEnvironment().getCourseConfig();
courseConfig.setSharedFolderSoftkey(importedRepositoryEntry.getSoftkey());