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 bt...@apache.org on 2015/09/22 12:21:48 UTC

svn commit: r1704534 - /james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/quota/NoQuotaManager.java

Author: btellier
Date: Tue Sep 22 10:21:45 2015
New Revision: 1704534

URL: http://svn.apache.org/viewvc?rev=1704534&view=rev
Log:
MAILBOX-64 Disable QuotaManager in wanted

Added:
    james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/quota/NoQuotaManager.java

Added: james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/quota/NoQuotaManager.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/quota/NoQuotaManager.java?rev=1704534&view=auto
==============================================================================
--- james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/quota/NoQuotaManager.java (added)
+++ james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/quota/NoQuotaManager.java Tue Sep 22 10:21:45 2015
@@ -0,0 +1,41 @@
+/****************************************************************
+ * 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.store.quota;
+
+import org.apache.james.mailbox.exception.MailboxException;
+import org.apache.james.mailbox.model.Quota;
+import org.apache.james.mailbox.model.QuotaRoot;
+import org.apache.james.mailbox.quota.QuotaManager;
+
+/**
+ * This quota manager is intended to be used when you want to deactivate the Quota feature
+ */
+public class NoQuotaManager implements QuotaManager {
+
+    @Override
+    public Quota getMessageQuota(QuotaRoot quotaRoot) throws MailboxException {
+        return QuotaImpl.unlimited();
+    }
+
+    @Override
+    public Quota getStorageQuota(QuotaRoot quotaRoot) throws MailboxException {
+        return QuotaImpl.unlimited();
+    }
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org