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

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


    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);

    homeMergeSource.setLocalSecurityCallback(secCallback);
    homeMergeSource.addContainer(vfsNamedPublic);
    homeMergeSource.addContainer(vfsNamedPrivate);
   
View Full Code Here


        Quota q = qm.getCustomQuota(tools.getFolderRelPath());
        if (q == null) {
          Quota defQuota = qm.getDefaultQuota(QuotaConstants.IDENTIFIER_DEFAULT_GROUPS);
          q = QuotaManager.getInstance().createQuota(tools.getFolderRelPath(), defQuota.getQuotaKB(), defQuota.getUlLimitKB());
        }
        FullAccessWithQuotaCallback secCallback = new FullAccessWithQuotaCallback(q);
        grpContainer.setLocalSecurityCallback(secCallback);
       
        // add container
        cfRoot.addContainer(grpContainer);
        addedGroupKeys.add(group.getKey());
View Full Code Here

    Quota q = qm.getCustomQuota(isolatedCourseFolder.getRelPath());
    if (q == null){
      Quota defQuota = qm.getDefaultQuota(QuotaConstants.IDENTIFIER_DEFAULT_COURSE);
      q = QuotaManager.getInstance().createQuota(isolatedCourseFolder.getRelPath(), defQuota.getQuotaKB(), defQuota.getUlLimitKB());
    }
    FullAccessWithQuotaCallback secCallback = new FullAccessWithQuotaCallback(q);
    isolatedCourseFolder.setLocalSecurityCallback(secCallback);
    return isolatedCourseFolder;
  }
View Full Code Here

      Quota quota = QuotaManager.getInstance().getCustomQuota(namedContainer.getRelPath());
      if (quota == null) {
        Quota defQuota = QuotaManager.getInstance().getDefaultQuota(QuotaConstants.IDENTIFIER_DEFAULT_NODES);
        quota = QuotaManager.getInstance().createQuota(namedContainer.getRelPath(), defQuota.getQuotaKB(), defQuota.getUlLimitKB());
      }
      VFSSecurityCallback secCallback = new FullAccessWithQuotaCallback(quota);
      namedContainer.setLocalSecurityCallback(secCallback);
      CloseableModalController cmc = new CloseableModalController(getWindowControl(), translate("close"),
          new FolderRunController(namedContainer, false, ureq, getWindowControl()).getInitialComponent());
      cmc.activate();
      return;
View Full Code Here

      Quota quota = QuotaManager.getInstance().getCustomQuota(namedContainer.getRelPath());
      if (quota == null) {
        Quota defQuota = QuotaManager.getInstance().getDefaultQuota(QuotaConstants.IDENTIFIER_DEFAULT_NODES);
        quota = QuotaManager.getInstance().createQuota(namedContainer.getRelPath(), defQuota.getQuotaKB(), defQuota.getUlLimitKB());
      }
      VFSSecurityCallback secCallback = new FullAccessWithQuotaCallback(quota);
      namedContainer.setLocalSecurityCallback(secCallback);
      CloseableModalController cmc = new CloseableModalController(getWindowControl(), translate("close"),
        new FolderRunController(namedContainer, false, ureq, getWindowControl()).getInitialComponent());
      cmc.activate();
     
View Full Code Here

    if (dropboxQuota == null) {
      dropboxQuota = QuotaManager.getInstance().getDefaultQuota(QuotaConstants.IDENTIFIER_DEFAULT_NODES);
    }
    OlatRootFolderImpl rootFolder = new OlatRootFolderImpl( getRelativeDropBoxFilePath(ureq.getIdentity()), null);
    VFSContainer dropboxContainer = new OlatNamedContainerImpl(ureq.getIdentity().getName(), rootFolder);
    FullAccessWithQuotaCallback secCallback = new FullAccessWithQuotaCallback(dropboxQuota);
    rootFolder.setLocalSecurityCallback(secCallback);
    int ulLimit = QuotaManager.getInstance().getUploadLimitKB(dropboxQuota.getQuotaKB(),dropboxQuota.getUlLimitKB(),dropboxContainer);
    return ulLimit;
  }
View Full Code Here

TOP

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

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.