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

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


   * @param courseEnv
   * @return
   */
  public static OlatNamedContainerImpl getNodeFolderContainer(SPCourseNode node, CourseEnvironment courseEnv) {
    String path = getFoldernodesPathRelToFolderBase(courseEnv);
    OlatRootFolderImpl rootFolder = new OlatRootFolderImpl(path, null);
    OlatNamedContainerImpl namedFolder = new OlatNamedContainerImpl(node.getShortTitle(), rootFolder);
    return namedFolder;
  }
View Full Code Here


    Boolean hasReturnbox = (Boolean)modConfig.get(TACourseNode.CONF_RETURNBOX_ENABLED);
    myContent.contextPut("hasReturnbox", (hasReturnbox != null) ? hasReturnbox : hasDropboxValue);

    // dropbox display
    String assesseeName = userCourseEnv.getIdentityEnvironment().getIdentity().getName();
    OlatRootFolderImpl rootDropbox = new OlatRootFolderImpl(getDropboxFilePath(assesseeName), null);
    OlatNamedContainerImpl namedDropbox = new OlatNamedContainerImpl(getDropboxRootFolderName(assesseeName), rootDropbox);
    namedDropbox.setLocalSecurityCallback(new ReadOnlyAndDeleteCallback());
    dropboxFolderRunController = new FolderRunController(namedDropbox, false, ureq, getWindowControl());
    dropboxFolderRunController.addControllerListener(this);
    myContent.put("dropbox", dropboxFolderRunController.getInitialComponent());

    // returnbox display
    OlatRootFolderImpl rootReturnbox = new OlatRootFolderImpl(getReturnboxFilePath(assesseeName), null);
    OlatNamedContainerImpl namedReturnbox = new OlatNamedContainerImpl(getReturnboxRootFolderName(assesseeName), rootReturnbox);
    namedReturnbox.setLocalSecurityCallback(new ReturnboxFullAccessCallback(rootReturnbox.getRelPath(),userCourseEnv, node));
    returnboxFolderRunController = new FolderRunController(namedReturnbox, false, ureq, getWindowControl());

    returnboxFolderRunController.addControllerListener(this);
    myContent.put("returnbox", returnboxFolderRunController.getInitialComponent());
View Full Code Here

    String dropboxPath = getRelativeDropBoxFilePath(ureq.getIdentity());
    Quota dropboxQuota = QuotaManager.getInstance().getCustomQuota(dropboxPath);
    if (dropboxQuota == null) {
      dropboxQuota = QuotaManager.getInstance().getDefaultQuota(QuotaConstants.IDENTIFIER_DEFAULT_NODES);
    }
    OlatRootFolderImpl rootFolder = new OlatRootFolderImpl( getRelativeDropBoxFilePath(ureq.getIdentity()), null);
    VFSContainer dropboxContainer = new OlatNamedContainerImpl(ureq.getIdentity().getName(), rootFolder);
    FullAccessWithQuotaCallback secCallback = new FullAccessWithQuotaCallback(dropboxQuota);
    rootFolder.setLocalSecurityCallback(secCallback);
    int ulLimit = QuotaManager.getInstance().getUploadLimitKB(dropboxQuota.getQuotaKB(),dropboxQuota.getUlLimitKB(),dropboxContainer);
    return ulLimit;
  }
View Full Code Here

      sb.append(" ");
      sb.append(mn.getModifiedDate().toString());
    }
    sb.append(" \\par}");
    // attachment(s)
    OlatRootFolderImpl msgContainer = fm.getMessageContainer((Long)(getMetainfo(ForumFormatter.MANDATORY_METAINFO_KEY)), mn.getKey());
    List attachments = msgContainer.getItems();
    if (attachments != null && attachments.size() > 0){
      VFSItem item = container.resolve("attachments");
      if (item == null){
        item = container.createChildContainer("attachments");
      }
View Full Code Here

  private VFSContainer makeTempVFSContainer() {   
    Long forumKey = (Long) metaInfo.get(ForumFormatter.MANDATORY_METAINFO_KEY);
    String dateStamp = String.valueOf(System.currentTimeMillis());
    //TODO: (LD) could this filename regarded as unique or use System.nanoTime() instead?
    String fileName = "forum" + forumKey.toString() + "_" + dateStamp;
    LocalFolderImpl tempFolder =  new OlatRootFolderImpl("/tmp/" + fileName, null);
    return tempFolder;
  }
View Full Code Here

      CoursePropertyManager cpm = PersistingCoursePropertyManager.getInstance(course);
      List assignedProps = cpm.listCourseNodeProperties(node, null, null, TaskController.PROP_ASSIGNED);
      if (assignedProps.size() == 0) {
        // no task assigned
        String relPath = TACourseNode.getTaskFolderPathRelToFolderRoot(course, node);
        OlatRootFolderImpl rootFolder = new OlatRootFolderImpl(relPath, null);
        OlatNamedContainerImpl namedFolder = new OlatNamedContainerImpl(translate("taskfolder"), rootFolder);
        namedFolder.setLocalSecurityCallback(getTaskFolderSecCallback(relPath));
        frc = new FolderRunController(namedFolder, false, ureq, getWindowControl());
        CloseableModalController cmc = new CloseableModalController(getWindowControl(), translate("folder.close"), frc
            .getInitialComponent());
View Full Code Here

      }
    } else if (source == dialogBoxController) {     
      if (DialogBoxUIFactory.isOkEvent(event)) {
        // ok: open task folder
        String relPath = TACourseNode.getTaskFolderPathRelToFolderRoot(course, node);
        OlatRootFolderImpl rootFolder = new OlatRootFolderImpl(relPath, null);
        OlatNamedContainerImpl namedFolder = new OlatNamedContainerImpl(translate("taskfolder"), rootFolder);
        namedFolder.setLocalSecurityCallback(getTaskFolderSecCallback(relPath));
        frc = new FolderRunController(namedFolder, false, urequest, getWindowControl());
        CloseableModalController cmc = new CloseableModalController(getWindowControl(), translate("folder.close"), frc
            .getInitialComponent());
View Full Code Here

   *      org.olat.course.run.userview.UserCourseEnvironment,
   *      org.olat.course.run.userview.NodeEvaluation)
   */
  public static OlatNamedContainerImpl getNodeFolderContainer(TACourseNode node, CourseEnvironment courseEnvironment) {
    String path = getFoldernodePathRelToFolderBase(courseEnvironment, node);
    OlatRootFolderImpl rootFolder = new OlatRootFolderImpl(path, null);
    OlatNamedContainerImpl namedFolder = new OlatNamedContainerImpl(TACourseNode.SOLUTION_FOLDER_NAME, rootFolder);
    return namedFolder;
  }
View Full Code Here

      myContent.put("userinfo", calendarController.getInitialComponent());
    } else if (menuCommand.equals(CMD_FOLDER)) {

      String chosenUserFolderRelPath = FolderConfig.getUserHome(identity.getName()) + "/public";

      OlatRootFolderImpl rootFolder = new OlatRootFolderImpl(chosenUserFolderRelPath, null);
      OlatNamedContainerImpl namedFolder = new OlatNamedContainerImpl(firstLastName, rootFolder);
     
      //decided in plenum to have read only view in the personal visit card, even for admin
      VFSSecurityCallback secCallback = new ReadOnlyCallback();
      namedFolder.setLocalSecurityCallback(secCallback);
View Full Code Here

                      + "<H1>Test HTML Seite fuer JUnit Test</H1>"
                      + "Dies ist<br />der Test&nbsp;Text"
                      + "</body></html>"; // Text = 'Dies ist der Test Text'
    String text = "Test HTML Seite fuer JUnit Test Dies ist der Test\u00A0Text";
    // Create a test HTML File 
    OlatRootFolderImpl rootFolder = new OlatRootFolderImpl(rootPath , null);
    OlatNamedContainerImpl namedFolder = new OlatNamedContainerImpl(filePath, rootFolder);
    VFSLeaf leaf = (VFSLeaf)namedFolder.resolve(htmlFileName);
    if (leaf != null) {
      leaf.delete();
    }
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.