Package org.olat.core.util.vfs

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


      }
    }
    // now as we have a writable file we initialize the path to this file
    // and the edit button
    fileName = editFile.getName();
    rootDir = new LocalFolderImpl(editFile.getParentFile());
   
    return true;
  }
View Full Code Here


    doIndex(resourceContext, indexWriter, cpRoot);
  }
   
  protected void doIndex(SearchResourceContext resourceContext, OlatFullIndexer indexWriter, File cpRoot)
  throws IOException,InterruptedException  {
    VFSContainer container = new LocalFolderImpl(cpRoot);
    VFSLeaf fManifest = (VFSLeaf)container.resolve("imsmanifest.xml");
    if(fManifest != null) {
      Element rootElement =  IMSLoader.loadIMSDocument(fManifest).getRootElement();
      Document manfiestDoc = createManifestDocument(fManifest, rootElement, resourceContext);
      indexWriter.addDocument(manfiestDoc);
     
View Full Code Here

        // remove course node id from combined course id / node id value
        courseId = courseId.substring(0, delimiterPos);
      }
      courseOres = OresHelper.createOLATResourceableInstance(CourseModule.class, Long.valueOf(courseId));
    }
    iframectr = new IFrameDisplayController(ureq, wControl, new LocalFolderImpl(cpRoot), SCORM_CONTENT_FRAME,  courseOres);
    listenTo(iframectr);
    myContent.contextPut("frameId", SCORM_CONTENT_FRAME);
   
    //pre next navigation links
    nextScoTop = LinkFactory.createCustomLink("nextScoTop", "nextsco", "", Link.NONTRANSLATED, myContent, this);
View Full Code Here

 
/**
* Return the SCORM Root folder
*/
  public static VFSContainer getScormRootFolder() {
    VFSContainer canonicalRoot = new LocalFolderImpl(new File(FolderConfig.getCanonicalRoot()));
    return (VFSContainer)canonicalRoot.resolve("scorm");
  }
View Full Code Here

      // append export timestamp to avoid overwriting previous export
      Date tmp = new Date(System.currentTimeMillis());
      java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH_mm_ss_SSS");
      forumName += "_"+formatter.format(tmp);
     
      VFSContainer container = new LocalFolderImpl(exportDirectory);
      VFSItem vfsItem = container.resolve(forumName);
     
      if (vfsItem == null || !(vfsItem instanceof VFSContainer)){
        vfsItem = container.createChildContainer(forumName);
      }
      container = (VFSContainer)vfsItem;
       
      ForumRTFFormatter rtff = new ForumRTFFormatter(container, false)
      ForumArchiveManager fam = ForumArchiveManager.getInstance();
View Full Code Here

    Set<String> mimeTypes = new HashSet<String>();
    mimeTypes.add("image/gif");
    mimeTypes.add("image/jpg");
    mimeTypes.add("image/jpeg");
    mimeTypes.add("image/png");
    VFSContainer uploadContainer = new LocalFolderImpl(uploadDir);
    uploadCtr = new FileUploadController(getWindowControl(), uploadContainer, ureq, this.limitKB, this.limitKB, mimeTypes, false);
    uploadCtr.hideTitleAndFieldset();
    listenTo(uploadCtr);
    folderContainer.put("uploadCtr", uploadCtr.getInitialComponent());
    putInitialPanel(folderContainer);
View Full Code Here

  /**
   * @see org.olat.course.nodes.GenericCourseNode#archiveNodeData(java.util.Locale, org.olat.course.ICourse, java.io.File, java.lang.String)
   */
  public void archiveNodeData(Locale locale, ICourse course, File exportDirectory, String charset) {
    VFSContainer exportContainer = new LocalFolderImpl(exportDirectory);
    VFSContainer wikiExportContainer = (VFSContainer)exportContainer.resolve(WikiManager.WIKI_RESOURCE_FOLDER_NAME);
    if(wikiExportContainer == null){
      wikiExportContainer = exportContainer.createChildContainer(WikiManager.WIKI_RESOURCE_FOLDER_NAME);
    }
    String exportDirName = getShortTitle()+"_"+Formatter.formatDatetimeFilesystemSave(new Date(System.currentTimeMillis()));
    VFSContainer destination = wikiExportContainer.createChildContainer(exportDirName);
    if (destination==null) {
      Tracing.logError("archiveNodeData: Could not create destination directory: wikiExportContainer="+wikiExportContainer+", exportDirName="+exportDirName, getClass());
View Full Code Here

    // add optinal download link, see class comments in DisclaimerFormController
    // Add the additional link to the form (depending on the configuration)
    if (RegistrationModule.isDisclaimerAdditionaLinkText()) {
      File disclaimerDir = new File(WebappHelper.getUserDataRoot() + "/customizing/disclaimer/");
      disclaimerDir.mkdirs();
      VFSContainer disclaimerContainer = new LocalFolderImpl(disclaimerDir);
      String i18nIfiedFilename = translate("disclaimer.filedownloadurl");
      this.downloadFile = (VFSLeaf)disclaimerContainer.resolve(i18nIfiedFilename);
      if (this.downloadFile != null) {
        this.downloadLink = LinkFactory.createLink("disclaimer.additionallinktext", main, this);
        this.downloadLink.setTarget("_blank");
       
        if (i18nIfiedFilename.toLowerCase().endsWith(".pdf")) {
View Full Code Here

    }   

    // mount /static/themes, filter out CVS!
    String staticAbsPath = WebappHelper.getContextRoot() + "/static/themes";
    File themesFile = new File(staticAbsPath);
    LocalFolderImpl vfsThemes = new LocalFolderImpl(themesFile);
    vfsThemes.setDefaultItemFilter(new VFSItemExcludePrefixFilter(new String[]{"CVS","cvs"} ));
    VFSContainer vfsCont = vfsThemes;
    return vfsCont;
  }
View Full Code Here

      //
      Manager manager = ManagerFactory.getManager();
      RepositoryManager rm = RepositoryManager.getInstance();
      RepositoryEntry myEntry;
      HashMap logmsg = new HashMap();
      VFSContainer qtiTmpDir = new LocalFolderImpl(QTIEditorPackage.getTmpBaseDir());
      VFSContainerFilter foldersOnly = new VFSContainerFilter();
      //folders in ../tmp/qtieditor hold the usernames
      List foldersUsername = qtiTmpDir.getItems(foldersOnly);
      for (Iterator iter = foldersUsername.iterator(); iter.hasNext();) {
        VFSContainer folderOfUser = (VFSContainer) iter.next();
        //the users folders holds folders with ids of OLATResourceable's
        List oResFolders = folderOfUser.getItems(foldersOnly);
        for (Iterator resources = oResFolders.iterator(); resources.hasNext();) {
View Full Code Here

TOP

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

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.