Package org.olat.core.commons.modules.bc.vfs

Examples of org.olat.core.commons.modules.bc.vfs.OlatRootFolderImpl


   *
   * @param ureq
   * @param command
   */
  private void doFileDelivery(UserRequest ureq, String taskFile) {
    OlatRootFolderImpl forumContainer = new OlatRootFolderImpl(TACourseNode.getTaskFolderPathRelToFolderRoot(courseEnv, node), null);
    VFSItem item = forumContainer.resolve(taskFile);
    if (item instanceof VFSLeaf) {
      VFSLeaf leaf = (VFSLeaf)item;
      ureq.getDispatchResult().setResultingMediaResource(new VFSMediaResource(leaf));
    } else if (item==null) {
      Tracing.logWarn("Can not cast to VFSLeaf. item==null, taskFile=" + taskFile,null, TaskController.class);
View Full Code Here


  public void archiveCourseLogFiles(Long oresID, String exportDir, Date begin, Date end, boolean adminLog, boolean userLog, boolean statisticLog, String charset, Locale locale, String email){
   
    String zipName = ExportUtil.createFileNameWithTimeStamp(ExportManager.COURSE_LOG_FILES, "zip");
    Date date = new Date();
    String tmpDirName = oresID + "-" + date.getTime();
    final VFSContainer tmpDirVFSContainer = new OlatRootFolderImpl(new File(FolderConfig.getRelativeTmpDir(), tmpDirName).getPath(), null);
    final File tmpDir = new File(new File(FolderConfig.getCanonicalRoot(), FolderConfig.getRelativeTmpDir()), tmpDirName);
   
    List<VFSItem> logFiles = new ArrayList<VFSItem>();
    if (adminLog) {
      logFiles.add(createLogFile(oresID, begin, end, charset, tmpDirVFSContainer, tmpDir, FILENAME_ADMIN_LOG, true, false));
View Full Code Here

   *
   * @param theCourse
   * @return File
   */
  public static File getExportDataDir(ICourse theCourse) {
    OlatRootFolderImpl vfsExportDir = (OlatRootFolderImpl)theCourse.getCourseBaseContainer()
      .resolve(ICourse.EXPORTED_DATA_FOLDERNAME);
    if (vfsExportDir == null)
      vfsExportDir = (OlatRootFolderImpl)theCourse.getCourseBaseContainer().createChildContainer(ICourse.EXPORTED_DATA_FOLDERNAME);
    return vfsExportDir.getBasefile();
  }
View Full Code Here

   * @param resourceableId
   * @return
   */
  public static VFSItem getCourseBaseContainer(Long resourceableId) {
    String relPath = "/course/" + resourceableId.longValue();
    OlatRootFolderImpl courseRootContainer = new OlatRootFolderImpl(relPath, null);
    File fBasePath = courseRootContainer.getBasefile();
    if (!fBasePath.exists())
      throw new OLATRuntimeException(PersistingCourseImpl.class, "Could not resolve course base path:" + courseRootContainer, null);
    return courseRootContainer;
  }
View Full Code Here

TOP

Related Classes of org.olat.core.commons.modules.bc.vfs.OlatRootFolderImpl

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.