org.apache.james.imapserver
Interface FolderRecord

All Known Implementing Classes:
SimpleFolderRecord

public interface FolderRecord

Interface for objects representing the record of a folder on an IMAP host.

Version:
0.1 on 14 Dec 2000
Author:
Charles Benett

Method Summary
 java.lang.String getAbsoluteName()
          Returns the absolute name of this mailbox.
 int getExists()
          Indicates number of messages in folder
 java.lang.String getFullName()
          Returns the full name, including namespace, of this mailbox.
 int getHighestUid()
          Returns current highest assigned uid value
 int getRecent()
          Indicates no of messages with \Recent flag set
 int getUidValidity()
          Returns current uid validity value
 int getUnseen(java.lang.String user)
          Indicates the number of unseen messages for the specified user.
 java.lang.String getUser()
          Returns the user in whose namespace the mailbox existed.
 boolean hasLookupRights(java.lang.String user)
          Indicates if given user has lookup rights for this mailbox.
 boolean hasReadRights(java.lang.String user)
          Indicates if given user has read rights for this mailbox.
 boolean isDeleted()
          Returns whether mailbox has been deleted.
 boolean isMarked()
          Indicates if the mailbox is marked.
 boolean isNameInUse()
          Returns unavailability of name for a new mailbox.
 boolean isNotSelectableByAnyone()
           
 boolean isSelectable(java.lang.String user)
          A folder is selectable by a given user if both it is not NotSelectableByAnyone and the named user has read rights.
 void setDeleted(boolean state)
          Records if the corresponding mailbox has been deleted.
 void setExists(int num)
          Set number of messages in this folder
 void setHighestUid(int uid)
          Records the highest assigned Unique Identifier Value for this mailbox.
 void setLookupRights(java.util.Set users)
          Record which users have LookupRights.
 void setMarked(boolean mark)
          Record if mailbox is marked.
 void setNameInUse(boolean state)
          Records if this mailbox name is currently in use.
 void setNotSelectableByAnyone(boolean state)
          Mark this mailbox as not selectable by anyone.
 void setReadRights(java.util.Set users)
          Record which users have ReadRights.
 void setRecent(int num)
          Set number of messages in this folder with Recent flag set
 void setUidValidity(int uidValidity)
          Records the Unique Identifier Validity Value for this mailbox.
 void setUnseenbyUser(java.util.Map unseen)
          Set map of users versus number of messages in this folder without \Seen flag set for them
 

Method Detail

getFullName

public java.lang.String getFullName()
Returns the full name, including namespace, of this mailbox. Example 1: '#mail.projectBonzi' Example 2: '#shared.projectBonzi'

getUser

public java.lang.String getUser()
Returns the user in whose namespace the mailbox existed. Example 1: 'fred.flintstone' Example 2: ''
Parameters:
user - String a user.An empty string indicates that the mailbox name is absolute.

getAbsoluteName

public java.lang.String getAbsoluteName()
Returns the absolute name of this mailbox. The absolute name is user-independent and unique for a given host. Example 1: 'privatemail.fred.flintstone.projectBonzi' Example 2: '#shared.projectBonzi'

setNameInUse

public void setNameInUse(boolean state)
Records if this mailbox name is currently in use. The mailbox name is in use when a mailbox with this name has been created. Implementations that allow shared mailboxes may encounter a sate where the mailbox has been deleted but there are clients who were already connected to the mailbox. In this case the name remains in use until all clients have either de-selected the mailbox or been disconnected from the server.
Parameters:
state - boolean true when mailbox created, false when name no longer in use.

isNameInUse

public boolean isNameInUse()
Returns unavailability of name for a new mailbox.

setDeleted

public void setDeleted(boolean state)
Records if the corresponding mailbox has been deleted.
Parameters:
state - boolean true when mailbox deleted, false when created

isDeleted

public boolean isDeleted()
Returns whether mailbox has been deleted. A deleted mailbox is an invalid argument to any IMAP command..

setUidValidity

public void setUidValidity(int uidValidity)
Records the Unique Identifier Validity Value for this mailbox.
Parameters:
uidValidity - int the uid validity value must be incremented if the current uid values overlap uid values of this or a previous incarnation of the mailbox.

getUidValidity

public int getUidValidity()
Returns current uid validity value

setHighestUid

public void setHighestUid(int uid)
Records the highest assigned Unique Identifier Value for this mailbox.
Parameters:
uid - int the highest uid assigned to a message in this mailbox.

getHighestUid

public int getHighestUid()
Returns current highest assigned uid value

setLookupRights

public void setLookupRights(java.util.Set users)
Record which users have LookupRights.
Parameters:
users - Set of Strings, one per user with Lookup rights

hasLookupRights

public boolean hasLookupRights(java.lang.String user)
Indicates if given user has lookup rights for this mailbox. Need lookup rights to be included in a List response.

setReadRights

public void setReadRights(java.util.Set users)
Record which users have ReadRights.
Parameters:
users - Set of Strings, one per user with read rights

hasReadRights

public boolean hasReadRights(java.lang.String user)
Indicates if given user has read rights for this mailbox. Need read rights for user to select or examine mailbox.

setMarked

public void setMarked(boolean mark)
Record if mailbox is marked.

isMarked

public boolean isMarked()
Indicates if the mailbox is marked. Usually means unseen mail.

setNotSelectableByAnyone

public void setNotSelectableByAnyone(boolean state)
Mark this mailbox as not selectable by anyone. Example folders at the roots of hierarchies, e. #mail for each user.
Parameters:
state - true if folder is not selectable by anyone

isNotSelectableByAnyone

public boolean isNotSelectableByAnyone()

isSelectable

public boolean isSelectable(java.lang.String user)
A folder is selectable by a given user if both it is not NotSelectableByAnyone and the named user has read rights.

setExists

public void setExists(int num)
Set number of messages in this folder

getExists

public int getExists()
Indicates number of messages in folder

setRecent

public void setRecent(int num)
Set number of messages in this folder with Recent flag set

getRecent

public int getRecent()
Indicates no of messages with \Recent flag set

setUnseenbyUser

public void setUnseenbyUser(java.util.Map unseen)
Set map of users versus number of messages in this folder without \Seen flag set for them

getUnseen

public int getUnseen(java.lang.String user)
Indicates the number of unseen messages for the specified user.


Copyright © 2001 Apache Jakarta Project. All Rights Reserved.