1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 */ 19 20 package javax.mail; 21 22 /** 23 * An interface for Store implementations to support the IMAP RFC 2087 Quota extension. 24 * 25 * @version $Rev: 581202 $ $Date: 2007-10-02 08:05:22 -0400 (Tue, 02 Oct 2007) $ 26 */ 27 public interface QuotaAwareStore { 28 29 /** 30 * Get the quotas for the specified root element. 31 * 32 * @param root The root name for the quota information. 33 * 34 * @return An array of Quota objects defined for the root. 35 * @throws MessagingException if the quotas cannot be retrieved 36 */ 37 public Quota[] getQuota(String root) throws javax.mail.MessagingException; 38 39 /** 40 * Set a quota item. The root contained in the Quota item identifies 41 * the quota target. 42 * 43 * @param quota The source quota item. 44 * @throws MessagingException if the quota cannot be set 45 */ 46 public void setQuota(Quota quota) throws javax.mail.MessagingException; 47 } 48 49