You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2011/06/13 13:58:50 UTC
svn commit: r1135105 - in
/james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/quota:
OverQuotaException.java QuotaManager.java
Author: norman
Date: Mon Jun 13 11:58:50 2011
New Revision: 1135105
URL: http://svn.apache.org/viewvc?rev=1135105&view=rev
Log:
Add special exception for over-quota. See MAILBOX-64
Added:
james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/quota/OverQuotaException.java
Modified:
james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/quota/QuotaManager.java
Added: james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/quota/OverQuotaException.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/quota/OverQuotaException.java?rev=1135105&view=auto
==============================================================================
--- james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/quota/OverQuotaException.java (added)
+++ james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/quota/OverQuotaException.java Mon Jun 13 11:58:50 2011
@@ -0,0 +1,54 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+package org.apache.james.mailbox.quota;
+
+import org.apache.james.mailbox.MailboxException;
+
+/**
+ * {@link MailboxException} which identicate that a user was over-quota
+ *
+ *
+ */
+public class OverQuotaException extends MailboxException{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 532673188582481689L;
+
+ private long used;
+ private long max;
+
+ public OverQuotaException(String msg, long max, long used) {
+ super(msg);
+ }
+ public OverQuotaException(long max, long used) {
+ this(null, max, used);
+ }
+
+ public long getUsed() {
+ return used;
+ }
+
+ public long getMax() {
+ return max;
+ }
+
+
+}
Modified: james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/quota/QuotaManager.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/quota/QuotaManager.java?rev=1135105&r1=1135104&r2=1135105&view=diff
==============================================================================
--- james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/quota/QuotaManager.java (original)
+++ james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/quota/QuotaManager.java Mon Jun 13 11:58:50 2011
@@ -25,8 +25,6 @@ import org.apache.james.mailbox.MailboxS
/**
* Allows to get quotas for {@link MailboxSession} which are bound to a user.
*
- *
- * @param <Id>
*/
public interface QuotaManager {
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org