Examples of VFSMediaResource


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

   * @see org.olat.repository.handlers.RepositoryHandler#getAsMediaResource(org.olat.resource.OLATResourceable)
   */
  public MediaResource getAsMediaResource(OLATResourceable res) {
    VFSContainer rootContainer = FileResourceManager.getInstance().getFileResourceRootImpl(res);
    VFSLeaf wikiZip = WikiToZipUtils.getWikiAsZip(rootContainer);
    return new VFSMediaResource(wikiZip);
  }
View Full Code Here

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

    contentMapper = new Mapper() {
      public MediaResource handle(String relPath, HttpServletRequest request) {
        VFSItem vfsItem = documentBaseContainer.resolve(relPath);
        MediaResource mr;
        if (vfsItem == null || !(vfsItem instanceof VFSLeaf)) mr = new NotFoundMediaResource(relPath);
        else mr = new VFSMediaResource((VFSLeaf) vfsItem);
        return mr;
      }
    };
    // Register mapper for this user. This mapper is cleaned up in the
    // dispose method (RichTextElementImpl will clean it up)
View Full Code Here

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

  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);
    } else {
      Tracing.logWarn("Can not cast to VFSLeaf. item.class.name=" + item.getClass().getName() + ", taskFile="+taskFile,null, TaskController.class);
    }
View Full Code Here

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

        OlatRootFolderImpl rootFolder = new OlatRootFolderImpl(ProjectBrokerManagerFactory.getProjectBrokerManager().getAttamchmentRelativeRootPath(project,courseEnv,cNode),null);
        VFSLeaf vfsfile = (VFSLeaf) rootFolder.resolve(relPath);
        if (vfsfile == null) {
          return new NotFoundMediaResource(relPath);
        } else {
          return new VFSMediaResource(vfsfile);
        }
      }
    });
    // Trigger auto-download
    getLogger().debug("baseUrl=" + baseUrl);
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.