org.apache.james.mailbox
Class MailboxPath

java.lang.Object
  extended by org.apache.james.mailbox.MailboxPath

public class MailboxPath
extends java.lang.Object

The path to a mailbox.


Constructor Summary
MailboxPath(MailboxPath mailboxPath)
           
MailboxPath(MailboxPath mailboxPath, java.lang.String name)
           
MailboxPath(java.lang.String namespace, java.lang.String user, java.lang.String name)
           
 
Method Summary
 boolean equals(java.lang.Object mailboxPath)
           
 java.util.List<MailboxPath> getHierarchyLevels(char delimiter)
          Return a list of MailboxPath representing the hierarchy levels of this MailboxPath.
 java.lang.String getName()
          Get the name of the mailbox.
 java.lang.String getNamespace()
          Get the namespace this mailbox is in
 java.lang.String getUser()
          Get the name of the user who owns the mailbox.
 int hashCode()
           
static MailboxPath inbox(java.lang.String username)
          Return a MailboxPath which represent the INBOX of the given username
 void setName(java.lang.String name)
          Set the name of the mailbox.
 void setNamespace(java.lang.String namespace)
          Set the namespace this mailbox is in
 void setUser(java.lang.String user)
          Set the name of the user who owns the mailbox.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MailboxPath

public MailboxPath(java.lang.String namespace,
                   java.lang.String user,
                   java.lang.String name)

MailboxPath

public MailboxPath(MailboxPath mailboxPath)

MailboxPath

public MailboxPath(MailboxPath mailboxPath,
                   java.lang.String name)
Method Detail

getNamespace

public java.lang.String getNamespace()
Get the namespace this mailbox is in

Returns:
The namespace

setNamespace

public void setNamespace(java.lang.String namespace)
Set the namespace this mailbox is in


getUser

public java.lang.String getUser()
Get the name of the user who owns the mailbox. This can be null e.g. for shared mailboxes.

Returns:
The username

setUser

public void setUser(java.lang.String user)
Set the name of the user who owns the mailbox.


getName

public java.lang.String getName()
Get the name of the mailbox. This is the pure name without user or namespace, so this is what a user would see in his client.

Returns:
The name string

setName

public void setName(java.lang.String name)
Set the name of the mailbox. This is the pure name without user or namespace, so this is what a user would see in his client.


getHierarchyLevels

public java.util.List<MailboxPath> getHierarchyLevels(char delimiter)
Return a list of MailboxPath representing the hierarchy levels of this MailboxPath. E.g. INBOX.main.sub would yield INBOX INBOX.main INBOX.main.sub

Parameters:
delimiter -
Returns:

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object mailboxPath)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

inbox

public static MailboxPath inbox(java.lang.String username)
Return a MailboxPath which represent the INBOX of the given username

Parameters:
username -
Returns:
inbox


Copyright © 2002-2010 The Apache Software Foundation. All Rights Reserved.