Example usage for javax.mail Quota setResourceLimit

List of usage examples for javax.mail Quota setResourceLimit

Introduction

In this page you can find the example usage for javax.mail Quota setResourceLimit.

Prototype

public void setResourceLimit(String name, long limit) 

Source Link

Document

Set a resource limit for this quota root.

Usage

From source file:com.hs.mail.imap.dao.MySqlUserDao.java

public Quota getQuota(long ownerID, String quotaRoot) {
    Quota quota = new Quota(quotaRoot);
    quota.setResourceLimit("STORAGE", getQuotaLimit(ownerID));
    quota.resources[0].usage = getQuotaUsage(ownerID);
    return quota;
}