Package org.olat.core.util.vfs

Examples of org.olat.core.util.vfs.LocalFileImpl


  /**
   *
   */
  private void uploadFiles(FileElement attachmentFileElement) {
    VFSLeaf uploadedItem = new LocalFileImpl(attachmentFileElement.getUploadFile());
    ProjectBrokerManagerFactory.getProjectBrokerManager().saveAttachedFile(project, attachmentFileElement.getUploadFileName(), uploadedItem, courseEnv, courseNode );
  }
View Full Code Here


  /**
   *
   */
  private void uploadFiles(FileElement attachmentFileElement) {
    VFSLeaf uploadedItem = new LocalFileImpl(attachmentFileElement.getUploadFile());
    ProjectBrokerManagerFactory.getProjectBrokerManager().saveAttachedFile(project, attachmentFileElement.getUploadFileName(), uploadedItem, courseEnv, courseNode );
  }
View Full Code Here

    return logFile;
  }
 
  private void saveFile(String targetDir, String fileName, VFSContainer tmpDir, List<VFSItem> files, String email, String emailI18nSubkey, Locale locale) {
    File file = new File(targetDir, fileName);
    VFSLeaf exportFile = new LocalFileImpl(file);
    if (!ZipUtil.zip(files, exportFile)) {
      // cleanup zip file
      exportFile.delete();       
    } else {
      // success
      sendEMail(email, locale, emailI18nSubkey);
    }
    removeTemporaryFolder(tmpDir);
View Full Code Here

    // 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);
   
    // create repository entry
    RepositoryManager rm = RepositoryManager.getInstance();
View Full Code Here

    }

    // unzip contents
    VFSContainer glossaryContainer = gm.getGlossaryRootFolder(resource);
    File fExportedFile = importExport.importGetExportedFile();
    if (fExportedFile.exists()) ZipUtil.unzip(new LocalFileImpl(fExportedFile), glossaryContainer);
    else Tracing.logWarn("The actual contents of the glossary were not found in the export.", ImportGlossaryReferencesController.class);

    // create repository entry
    RepositoryManager rm = RepositoryManager.getInstance();
    RepositoryEntry importedRepositoryEntry = rm.createRepositoryEntryInstance(owner.getName());
View Full Code Here

    VirtualContainer calendars = new VirtualContainer("calendars");
    calendars.setLocalSecurityCallback(new ReadOnlyCallback());
    // get private calendar
    CalendarManager calendarManager = CalendarManagerFactory.getInstance().getCalendarManager();
    File fPersonalCalendar = calendarManager.getCalendarICalFile(CalendarManager.TYPE_USER, identity.getName());
    calendars.addItem(new LocalFileImpl(fPersonalCalendar));
    return calendars;
  }
View Full Code Here

TOP

Related Classes of org.olat.core.util.vfs.LocalFileImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.