Search in sources :

Example 26 with QuotaManager

use of org.olat.core.util.vfs.QuotaManager in project openolat by klemens.

the class FolderCallback method initFolderQuota.

private void initFolderQuota(String relPath) {
    QuotaManager qm = QuotaManager.getInstance();
    folderQuota = qm.getCustomQuota(relPath);
    if (folderQuota == null) {
        Quota defQuota = qm.getDefaultQuota(QuotaConstants.IDENTIFIER_DEFAULT_POWER);
        folderQuota = QuotaManager.getInstance().createQuota(relPath, defQuota.getQuotaKB(), defQuota.getUlLimitKB());
    }
}
Also used : Quota(org.olat.core.util.vfs.Quota) QuotaManager(org.olat.core.util.vfs.QuotaManager)

Aggregations

QuotaManager (org.olat.core.util.vfs.QuotaManager)26 Quota (org.olat.core.util.vfs.Quota)18 Path (javax.ws.rs.Path)4 CollaborationTools (org.olat.collaboration.CollaborationTools)4 OlatRootFolderImpl (org.olat.core.commons.modules.bc.vfs.OlatRootFolderImpl)4 SubscriptionContext (org.olat.core.commons.services.notifications.SubscriptionContext)4 Identity (org.olat.core.id.Identity)4 VFSWebServiceSecurityCallback (org.olat.core.util.vfs.restapi.VFSWebServiceSecurityCallback)4 VFSWebservice (org.olat.core.util.vfs.restapi.VFSWebservice)4 BusinessGroup (org.olat.group.BusinessGroup)4 BusinessGroupService (org.olat.group.BusinessGroupService)4 File (java.io.File)2 OLATSecurityException (org.olat.core.logging.OLATSecurityException)2 FullAccessWithQuotaCallback (org.olat.core.util.vfs.callbacks.FullAccessWithQuotaCallback)2 VFSSecurityCallback (org.olat.core.util.vfs.callbacks.VFSSecurityCallback)2 CourseConfig (org.olat.course.config.CourseConfig)2 Reference (org.olat.resource.references.Reference)2