Package org.olat.core.util.vfs.callbacks

Examples of org.olat.core.util.vfs.callbacks.ReadOnlyCallback


      RepositoryManager rm = RepositoryManager.getInstance();
      RepositoryEntry re = rm.lookupRepositoryEntryBySoftkey(sfSoftkey, false);
      if (re != null) {
        sharedFolder = SharedFolderManager.getInstance().getSharedFolder(re.getOlatResource());
        if (sharedFolder != null){
          sharedFolder.setLocalSecurityCallback(new ReadOnlyCallback());
          //add local course folder's children as read/write source and any sharedfolder as subfolder
          courseFolderContainer.addContainer(new NamedContainerImpl("_sharedfolder", sharedFolder));
        }
      }
    }
View Full Code Here


    if (item == null) item = sharedFolder.resolve(INDEXDOTHTM);
    if (item == null) item = sharedFolder.resolve(DEFAULTDOTHTML);
    if (item == null) item = sharedFolder.resolve(DEFAULTDOTHTM);

    if (item == null) {
      sharedFolder.setLocalSecurityCallback(new ReadOnlyCallback());
      controller = new FolderRunController(sharedFolder, true, true, ureq, getWindowControl());
      controller.addControllerListener(this);
    } else {
      controller = new WebsiteDisplayController(ureq, getWindowControl(), sharedFolder, item.getName());
    }
View Full Code Here

   
    // 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

  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()));
View Full Code Here

      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);
     
      removeAsListenerAndDispose(folderRunController);
      folderRunController = new FolderRunController(namedFolder, false, true, ureq, getWindowControl());
      listenTo(folderRunController);
View Full Code Here

    translator = new PackageTranslator(PACKAGE, ureq.getLocale());
    myContent = new VelocityContainer("taskVC", VELOCITY_ROOT + "/returnbox.html", translator, this);
    // returnbox display
    OlatRootFolderImpl rootFolder = new OlatRootFolderImpl(getReturnboxPathFor(userCourseEnv.getCourseEnvironment(), node, ureq.getIdentity()) , null);
    OlatNamedContainerImpl namedContainer = new OlatNamedContainerImpl(ureq.getIdentity().getName(), rootFolder);
    namedContainer.setLocalSecurityCallback(new ReadOnlyCallback());
    returnboxFolderRunController = new FolderRunController(namedContainer, false, ureq, wControl);
    returnboxFolderRunController.addControllerListener(this);
    myContent.put("returnbox", returnboxFolderRunController.getInitialComponent());
    // notification
    if ( !previewMode && !ureq.getUserSession().getRoles().isGuestOnly()) {
View Full Code Here

  private static final String MOUNT_POINT = "calendars";
 
  public VFSContainer getContainer(Identity identity) {
    VirtualContainer calendars = new VirtualContainer("calendars");
    calendars.setLocalSecurityCallback(new ReadOnlyCallback());
    // get private calendar
    CalendarManager calendarManager = CalendarManagerFactory.getInstance().getCalendarManager();
    File fPersonalCalendar = calendarManager.getCalendarICalFile(CalendarManager.TYPE_USER, identity.getName());
    calendars.addItem(new LocalFileImpl(fPersonalCalendar));
    return calendars;
View Full Code Here

TOP

Related Classes of org.olat.core.util.vfs.callbacks.ReadOnlyCallback

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.