MCPcopy Create free account
hub / github.com/M66B/FairEmail / getQuota

Method getQuota

app/src/main/java/com/sun/mail/imap/IMAPStore.java:2070–2090  ·  view source on GitHub ↗

Get the quotas for the named quota root. Quotas are controlled on the basis of a quota root, not (necessarily) a folder. The relationship between folders and quota roots depends on the IMAP server. Some servers might implement a single quota root for all folders owned by a user. Other servers mig

(String root)

Source from the content-addressed store, hash-verified

2068 * QUOTA extension
2069 */
2070 @Override
2071 public synchronized Quota[] getQuota(String root)
2072 throws MessagingException {
2073 checkConnected();
2074 Quota[] qa = null;
2075
2076 IMAPProtocol p = null;
2077 try {
2078 p = getStoreProtocol("getQuota");
2079 qa = p.getQuotaRoot(root);
2080 } catch (BadCommandException bex) {
2081 throw new MessagingException("QUOTA not supported", bex);
2082 } catch (ConnectionException cex) {
2083 throw new StoreClosedException(this, cex.getMessage());
2084 } catch (ProtocolException pex) {
2085 throw new MessagingException(pex.getMessage(), pex);
2086 } finally {
2087 releaseStoreProtocol(p);
2088 }
2089 return qa;
2090 }
2091
2092 /**
2093 * Set the quotas for the quota root specified in the quota argument.

Callers

nothing calls this directly

Calls 5

checkConnectedMethod · 0.95
getStoreProtocolMethod · 0.95
getQuotaRootMethod · 0.95
releaseStoreProtocolMethod · 0.95
getMessageMethod · 0.65

Tested by

no test coverage detected