james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r995327 - in /james/imap/trunk/mailbox/src/main/java/org/apache/james/mailbox: MailboxConstants.java MailboxPath.java
Date Thu, 09 Sep 2010 06:38:50 GMT
Author: norman
Date: Thu Sep  9 06:38:49 2010
New Revision: 995327

URL: http://svn.apache.org/viewvc?rev=995327&view=rev
Log:
Add helper for creating MailboxPath which refer to user inbox

Modified:
    james/imap/trunk/mailbox/src/main/java/org/apache/james/mailbox/MailboxConstants.java
    james/imap/trunk/mailbox/src/main/java/org/apache/james/mailbox/MailboxPath.java

Modified: james/imap/trunk/mailbox/src/main/java/org/apache/james/mailbox/MailboxConstants.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/mailbox/src/main/java/org/apache/james/mailbox/MailboxConstants.java?rev=995327&r1=995326&r2=995327&view=diff
==============================================================================
--- james/imap/trunk/mailbox/src/main/java/org/apache/james/mailbox/MailboxConstants.java
(original)
+++ james/imap/trunk/mailbox/src/main/java/org/apache/james/mailbox/MailboxConstants.java
Thu Sep  9 06:38:49 2010
@@ -36,4 +36,9 @@ public interface MailboxConstants {
      */
     public static final String DEFAULT_DELIMITER_STRING = ".";
 
+    /**
+     * The name of the INBOX
+     */
+    public static final String INBOX = "INBOX";
+
 }

Modified: james/imap/trunk/mailbox/src/main/java/org/apache/james/mailbox/MailboxPath.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/mailbox/src/main/java/org/apache/james/mailbox/MailboxPath.java?rev=995327&r1=995326&r2=995327&view=diff
==============================================================================
--- james/imap/trunk/mailbox/src/main/java/org/apache/james/mailbox/MailboxPath.java (original)
+++ james/imap/trunk/mailbox/src/main/java/org/apache/james/mailbox/MailboxPath.java Thu Sep
 9 06:38:49 2010
@@ -169,4 +169,14 @@ public class MailboxPath {
         return result;
    }
     
+    /**
+     * Return a {@link MailboxPath} which represent the INBOX of the given username
+     * 
+     * @param username
+     * @return inbox
+     */
+    public static MailboxPath inbox(String username) {
+        return new MailboxPath(MailboxConstants.USER_NAMESPACE, username, MailboxConstants.INBOX);
+    }
+    
 }



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


Mime
View raw message