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

Examples of org.olat.core.commons.modules.bc.FolderEvent


   *      org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
   */
  public void event(UserRequest ureq, Controller source, Event event) {
    if (source == uploadCtr) {
      if (event instanceof FolderEvent) {
        FolderEvent folderEvent = (FolderEvent) event;
        if (isFileSuffixOk(folderEvent.getFilename())) {
          fireEvent(ureq, new URLChoosenEvent(folderEvent
              .getFilename()));
          return;
        } else {
          setErrorMessage(folderEvent.getFilename());
        }
      }
      if (event == Event.DONE_EVENT) {
        if (uploadCtr.getStatus() == FolderCommandStatus.STATUS_CANCELED) {
          fireEvent(ureq, Event.CANCELLED_EVENT);
View Full Code Here


 
  public void event(UserRequest ureq, Controller source, Event event) {
    if (source == editorCtr) {
      if (event == Event.DONE_EVENT) {
        // we're done, notify listerers
        fireEvent(ureq, new FolderEvent(FolderEvent.NEW_FILE_EVENT, fileName))
        fireEvent(ureq, FolderCommand.FOLDERCOMMAND_FINISHED);
      } else if(event == Event.CANCELLED_EVENT){
        fireEvent(ureq, FolderCommand.FOLDERCOMMAND_FINISHED);
      }
    } else if(source == createFileForm) {
View Full Code Here

 
  public void event(UserRequest ureq, Controller source, Event event) {
    if (source == fileUploadCtr) {
      // catch upload event
      if (event instanceof FolderEvent && event.getCommand().equals(FolderEvent.UPLOAD_EVENT)) {
        FolderEvent folderEvent = (FolderEvent) event;
        // Get file from temp folder location
        uploadFileName = folderEvent.getFilename();
        vfsNewFile = (VFSLeaf) currentContainer.resolve(uploadFileName);
        overwritten = fileUploadCtr.isExistingFileOverwritten();
        if (vfsNewFile != null) {
          notifyFinished(ureq);
        } else {
View Full Code Here

      } else if (event == Event.FAILED_EVENT) {
        status = FolderCommandStatus.STATUS_FAILED;
        fireEvent(ureq, FolderCommand.FOLDERCOMMAND_FINISHED);
      } else if (event == Event.DONE_EVENT) {
        //we're done, notify listerers
        fireEvent(ureq, new FolderEvent(FolderEvent.NEW_FOLDER_EVENT, folderName))
        fireEvent(ureq, FolderCommand.FOLDERCOMMAND_FINISHED);
      }
    }
  }
View Full Code Here

          SubscriptionContext subsContext = secCallback.getSubscriptionContext();
          if (subsContext != null) {
            NotificationsManager.getInstance().markPublisherNews(subsContext, ureq.getIdentity());
          }
        }
        fireEvent(ureq, new FolderEvent(move ? FolderEvent.MOVE_EVENT : FolderEvent.COPY_EVENT, fileSelection.renderAsHtml()));
        fireEvent(ureq, FOLDERCOMMAND_FINISHED);
      } else {
        // abort
        status = FolderCommandStatus.STATUS_CANCELED;
        fireEvent(ureq, FOLDERCOMMAND_FINISHED);
View Full Code Here

              getWindowControl().setError(translator.translate("FileRenameFailed", new String[]{fileName}));
              status = FolderCommandStatus.STATUS_FAILED;
            }
          }
        }
        fireEvent(ureq, new FolderEvent(FolderEvent.EDIT_EVENT, fileName));
        fireEvent(ureq, FOLDERCOMMAND_FINISHED);

      } else if (event == Event.CANCELLED_EVENT) {
        fireEvent(ureq, FOLDERCOMMAND_FINISHED);
      }
View Full Code Here

            getWindowControl().setWarning(translator.translate("del.partial"));
          }
        }
       
        String confirmationText = fileSelection.renderAsHtml();
        fireEvent(ureq, new FolderEvent(FolderEvent.DELETE_EVENT, confirmationText));
        fireEvent(ureq, FOLDERCOMMAND_FINISHED);
      } else {
        // abort
        status = FolderCommandStatus.STATUS_CANCELED;
        fireEvent(ureq, FOLDERCOMMAND_FINISHED);
View Full Code Here

        //abort
        status = FolderCommandStatus.STATUS_FAILED;
        fireEvent(ureq, FOLDERCOMMAND_FINISHED);
      } else if (event == Event.DONE_EVENT) {
        //we're done, notify listerers       
        fireEvent(ureq, new FolderEvent(FolderEvent.ZIP_EVENT, selection.renderAsHtml()));       
        fireEvent(ureq, FolderCommand.FOLDERCOMMAND_FINISHED);
      }
    }
  }
View Full Code Here

   */
  public void event(UserRequest ureq, Controller source, Event event) {
    if (source == uploadCtr) {
      // catch upload event
      if (event instanceof FolderEvent && event.getCommand().equals(FolderEvent.UPLOAD_EVENT)) {
        FolderEvent folderEvent = (FolderEvent) event;
        // Get file from temp folder location
        String uploadFileName = folderEvent.getFilename();
        newFile = new File(uploadDir, uploadFileName);
        if (!newFile.exists()) {
          showError("Failed");
        } else {
          // Scale uploaded image
View Full Code Here

       * file upload controller events
       ************************************************************************/
      if (event == Event.DONE_EVENT) {
        fileUplCtr.reset();
      } else if (event.getCommand().equals(FolderEvent.UPLOAD_EVENT)) {
        FolderEvent fEvent = (FolderEvent)event;
        createMediaMetadataFile(fEvent.getFilename(), ureq.getIdentity().getKey());
        editContent.contextPut("fileList", wiki.getMediaFileList());
      }
    } else if (source == breadCrumpCtr) {
      /*************************************************************************
       * BreadCrump controller events
View Full Code Here

TOP

Related Classes of org.olat.core.commons.modules.bc.FolderEvent

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.