Examples of OlatNamedContainerImpl


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

    // mount /public
    OlatRootFolderImpl vfsPublic = new OlatRootFolderImpl(getRootPathFor(identity) + "/public", homeMergeSource);
    vfsPublic.getBasefile().mkdirs(); // lazy initialize folders
    // we do a little trick here and wrap it again in a NamedContainerImpl so
    // it doesn't show up as a OlatRootFolderImpl to prevent it from editing its MetaData
    OlatNamedContainerImpl vfsNamedPublic = new OlatNamedContainerImpl("public", vfsPublic);
   
    // mount /private
    OlatRootFolderImpl vfsPrivate = new OlatRootFolderImpl(getRootPathFor(identity) + "/private", homeMergeSource);
    vfsPrivate.getBasefile().mkdirs(); // lazy initialize folders
    // we do a little trick here and wrap it again in a NamedContainerImpl so
    // it doesn't show up as a OlatRootFolderImpl to prevent it from editing its MetaData
    OlatNamedContainerImpl vfsNamedPrivate = new OlatNamedContainerImpl("private", vfsPrivate);
   
    // set quota for this merge source
    QuotaManager qm = QuotaManager.getInstance();
    Quota quota = qm.getCustomQuotaOrDefaultDependingOnRole(identity, getRootPathFor(identity));
    FullAccessWithQuotaCallback secCallback = new FullAccessWithQuotaCallback(quota);
View Full Code Here

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

    // do not use a global translator since in the fututre a collaborationtools
    // may be shared among users
    PackageTranslator trans = new PackageTranslator(PACKAGE, ureq.getLocale());
    String relPath = getFolderRelPath();
    OlatRootFolderImpl rootContainer = new OlatRootFolderImpl(relPath, null);
    OlatNamedContainerImpl namedContainer = new OlatNamedContainerImpl(trans.translate("folder"), rootContainer);
    namedContainer.setLocalSecurityCallback(new CollabSecCallback(relPath, subsContext));
    FolderRunController frc = new FolderRunController(namedContainer, true, true, ureq, wControl);
    return frc;
  }
View Full Code Here

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

  public static SharedFolderManager getInstance() {
    return INSTANCE;
  }
 
  public OlatNamedContainerImpl getNamedSharedFolder(RepositoryEntry re) {
    return new OlatNamedContainerImpl(Formatter.makeStringFilesystemSave(re.getDisplayname()), getSharedFolder(re.getOlatResource()));
  }
View Full Code Here

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

        BCCourseNode bcNode = (BCCourseNode) child;
        // add folder not to merge source. Use name and node id to have unique name
        String path = BCCourseNode.getFoldernodePathRelToFolderBase(getCourseEnvironment(), bcNode);
        OlatRootFolderImpl rootFolder = new OlatRootFolderImpl(path, null);
        String folderName = bcNode.getShortTitle() + " (" + bcNode.getIdent() + ")";
        OlatNamedContainerImpl BCFolder = new OlatNamedContainerImpl(folderName, rootFolder);
        BCNodesContainer.addContainer(BCFolder);       
      }
      // recursion for all childrenØ
      addFolderBuildingBlocks(BCNodesContainer, child);
    }
View Full Code Here

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

    courseNodeResourceContext.setBusinessControlFor(courseNode);
    courseNodeResourceContext.setDocumentType(TYPE);
    courseNodeResourceContext.setTitle(courseNode.getShortTitle());
    courseNodeResourceContext.setDescription(courseNode.getLongTitle());

    OlatNamedContainerImpl namedContainer = BCCourseNode.getNodeFolderContainer((BCCourseNode) courseNode, course.getCourseEnvironment());
    doIndexVFSContainer(courseNodeResourceContext,namedContainer,indexWriter,"", FolderIndexerAccess.FULL_ACCESS);
    // go further, index my child nodes
    courseNodeIndexer.doIndexCourse(repositoryResourceContext, course, courseNode, indexWriter);
  }
View Full Code Here

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

    myContent = new VelocityContainer("taskVC", VELOCITY_ROOT + "/solutionRun.html", translator, this);
   
    // returnbox display
    OlatRootFolderImpl rootFolder = new OlatRootFolderImpl(
      SolutionController.getSolutionPathRelToFolderRoot(userCourseEnv.getCourseEnvironment(), node), null);
    OlatNamedContainerImpl namedContainer = new OlatNamedContainerImpl("solutions", rootFolder);
    namedContainer.setLocalSecurityCallback(new ReadOnlyCallback());
    solutionFolderRunController = new FolderRunController(namedContainer, false, ureq, wControl);
    solutionFolderRunController.addControllerListener(this);
    myContent.put("solutionbox", solutionFolderRunController.getInitialComponent());
    if ( !previewMode) {
      // offer subscription, but not to guests
View Full Code Here

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

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

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

   * @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

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

   */
  public BCPreviewController(UserRequest ureq, WindowControl wControl, BCCourseNode node, CourseEnvironment courseEnv, NodeEvaluation ne) {
    super(wControl);   
    trans = new PackageTranslator(PACKAGE, ureq.getLocale());
    previewVC = new VelocityContainer("bcPreviewVC", VELOCITY_ROOT + "/preview.html", trans, this);
    OlatNamedContainerImpl namedContainer = BCCourseNode.getNodeFolderContainer(node, courseEnv);
    namedContainer.setLocalSecurityCallback(new ReadOnlyCallback());
    FolderRunController folder = new FolderRunController(namedContainer, false, ureq, getWindowControl());
    previewVC.put("folder", folder.getInitialComponent());
    // get additional infos
    VFSSecurityCallback secCallback = new FolderNodeCallback(namedContainer.getRelPath(), ne, false, false, null);
    previewVC.contextPut("canUpload", Boolean.valueOf(secCallback.canWrite()));
    previewVC.contextPut("canDownload", Boolean.valueOf(secCallback.canRead()));
    Quota q = secCallback.getQuota();
    previewVC.contextPut("quotaKB", (q != null) ? q.getQuotaKB().toString() : "-");
    setInitialComponent(previewVC);
View Full Code Here

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

    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
TOP
Copyright © 2018 www.massapi.com. 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.