com.hs.mail.imap.mailbox
Class Mailbox

java.lang.Object
  extended by com.hs.mail.imap.mailbox.Mailbox

public class Mailbox
extends Object

Mailbox is a class that represents a mailbox for mail messages.

Since:
Feb 2, 2010
Author:
Won Chul Doh

Field Summary
static String folderSeparator
          Delimiter string that separates mailbox's pathname from the names of immediate sub-mailboxes.
 
Constructor Summary
Mailbox()
           
Mailbox(String name)
           
 
Method Summary
 boolean equals(Object obj)
           
 long getMailboxID()
           
 String getName()
          Returns the full name of this mailbox.
 long getNextUID()
          Returns the predicted UID that will be assigned to the next message that is appended to this mailbox.
 long getOwnerID()
           
static String getParent(String mailboxName)
          Get the full name of parent mailbox for given mailbox.
 long getUidValidity()
          Returns the UIDValidity for this mailbox.
 boolean hasChildren()
          Check whether this mailbox has child mailboxes.
 boolean isChildOf(Mailbox mailbox)
          Check if this mailbox is subsequent child of the given mailbox.
 boolean isMarked()
           
 boolean isNoInferiors()
          Check whether this mailbox can have child mailboxes.
 boolean isNoSelect()
          Check whether this mailbox can be selected.
 boolean isReadOnly()
          Check whether this mailbox is read-only.
 Mailbox rename(String base, String dest)
           
 void setHasChildren(boolean hasChildren)
           
 void setMailboxID(long mailboxID)
           
 void setMarked(boolean marked)
           
 void setName(String name)
           
 void setNextUID(long nextUid)
           
 void setNoInferiors(boolean noInferiors)
           
 void setNoSelect(boolean noSelect)
           
 void setOwnerID(long ownerID)
           
 void setReadOnly(boolean readOnly)
           
 void setUidValidity(long uidValidity)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

folderSeparator

public static String folderSeparator
Delimiter string that separates mailbox's pathname from the names of immediate sub-mailboxes.

Constructor Detail

Mailbox

public Mailbox()

Mailbox

public Mailbox(String name)
Method Detail

getMailboxID

public long getMailboxID()

setMailboxID

public void setMailboxID(long mailboxID)

getName

public String getName()
Returns the full name of this mailbox. If the mailbox resides under the root hierarchy, the returned name may contain the hierarchy delimiter.

Returns:
name of the mailbox

setName

public void setName(String name)

getOwnerID

public long getOwnerID()

setOwnerID

public void setOwnerID(long ownerID)

getNextUID

public long getNextUID()
Returns the predicted UID that will be assigned to the next message that is appended to this mailbox.

Returns:
the UIDNEXT value

setNextUID

public void setNextUID(long nextUid)

getUidValidity

public long getUidValidity()
Returns the UIDValidity for this mailbox.


setUidValidity

public void setUidValidity(long uidValidity)

isNoInferiors

public boolean isNoInferiors()
Check whether this mailbox can have child mailboxes.


setNoInferiors

public void setNoInferiors(boolean noInferiors)

isNoSelect

public boolean isNoSelect()
Check whether this mailbox can be selected.


setNoSelect

public void setNoSelect(boolean noSelect)

isReadOnly

public boolean isReadOnly()
Check whether this mailbox is read-only.


setReadOnly

public void setReadOnly(boolean readOnly)

isMarked

public boolean isMarked()

setMarked

public void setMarked(boolean marked)

hasChildren

public boolean hasChildren()
Check whether this mailbox has child mailboxes.


setHasChildren

public void setHasChildren(boolean hasChildren)

isChildOf

public boolean isChildOf(Mailbox mailbox)
Check if this mailbox is subsequent child of the given mailbox.

Parameters:
mailbox - potential parent mailbox
Returns:
true if child, otherwise false

rename

public Mailbox rename(String base,
                      String dest)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getParent

public static String getParent(String mailboxName)
Get the full name of parent mailbox for given mailbox.

Parameters:
mailboxName - full name of the mailbox
Returns:
full name of parent mailbox


Copyright © 2011. All Rights Reserved.