Package org.olat.core.util.vfs

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


         
          MediaResource resource;
          if(row < versionedFile.getVersions().getRevisions().size()) {
            //restore current, do nothing
            VFSRevision version = versionedFile.getVersions().getRevisions().get(row);
            resource = new VFSRevisionMediaResource(version, true);
          } else {
            resource = new VFSMediaResource((VFSLeaf)versionedFile);
            ((VFSMediaResource)resource).setDownloadable(true);
          }
          ureq.getDispatchResult().setResultingMediaResource(resource);
View Full Code Here


      if (event instanceof TableEvent) {
        TableEvent tEvent = (TableEvent) event;
        int row = tEvent.getRowId();
        if (CMD_DOWNLOAD.equals(tEvent.getActionId())) {
          VFSRevision version = getLastRevision(deletedFiles.get(row));
          MediaResource resource = new VFSRevisionMediaResource(version, true);
          ureq.getDispatchResult().setResultingMediaResource(resource);
        } else if (CMD_RESTORE.equals(tEvent.getActionId())) {
          VFSRevision version = getLastRevision(deletedFiles.get(row));
          if (VersionsManager.getInstance().restore(container, version)) {
            status = FolderCommandStatus.STATUS_SUCCESS;
View Full Code Here

TOP

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

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.