|
Compoze Software, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This interface defines a folder. A folder can hold messages, sub-folders or both.
| Field Summary | |
static int |
TYPE_DELETED
This represents the 'Deleted' or 'Trash' folder type. |
static int |
TYPE_DRAFTS
This represents the 'Drafts' folder type. |
static int |
TYPE_INBOX
This represents the 'Inbox' folder type. |
static int |
TYPE_OTHER
This represents the 'Other' folder type. |
static int |
TYPE_SENT
This represents the 'Sent' folder type. |
| Method Summary | |
IFolder |
copy(IFolder targetFolder)
Copys this folder (including all messages) to the specified target parent folder. |
IFolder |
createFolder(java.lang.String sName)
Creates a sub-folder with the specified name directly under this folder. |
void |
delete()
Deletes this folder. |
java.lang.String |
getFullName()
Gets the full name of this folder. |
java.lang.Object |
getID()
Gets the ID of this folder. |
IMessage |
getMessage(java.lang.Object id)
Gets the message with the specified ID from this folder. |
IMessage |
getMessage(java.lang.Object id,
boolean bMarkRead)
Gets the message with the specified ID from this folder. |
int |
getMessageCount()
Gets the total message count for this folder. |
int |
getMessageCount(MessageFilter filter)
Gets the message count for this folder. |
java.util.List |
getMessages()
Gets a list of all messages in this folder |
java.util.List |
getMessages(int iFromIndex,
int iToIndex)
Gets the sublist of messages between the specified iFromIndex and iToIndex. |
java.util.List |
getMessages(int iFromIndex,
int iToIndex,
MessageFilter filter)
Gets the sublist of messages between the specified iFromIndex and iToIndex. |
java.util.List |
getMessages(int iFromIndex,
int iToIndex,
MessageFilter filter,
MessageComparator comp)
Gets the sublist of messages between the specified iFromIndex and iToIndex. |
java.lang.String |
getName()
Gets the name of this folder. |
IFolder |
getParent()
Gets the parent folder of this folder. |
int |
getSubFolderCount()
Gets the number of sub-folders under this folder. |
java.util.List |
getSubFolders()
Gets the sub-folders under this folder. |
int |
getType()
Gets the type of this folder. |
int |
getUnreadMessageCount()
Gets the total unread message count for this folder. |
boolean |
hasSubFolders()
Checks if this folder has sub-folders. |
boolean |
isUnderDeletedFolder()
Checks if this folder is under the 'deleted' folder. |
void |
move(IFolder targetFolder)
Moves this folder under the specified target folder. |
void |
refresh()
Refreshes the cached content of this folder. |
void |
rename(java.lang.String sName)
Renames this folder to the specified name. |
| Field Detail |
public static final int TYPE_INBOX
public static final int TYPE_DELETED
public static final int TYPE_DRAFTS
public static final int TYPE_SENT
public static final int TYPE_OTHER
| Method Detail |
public void refresh()
throws MailException
public IFolder getParent()
throws MailException
null if has no parent
public java.util.List getSubFolders()
throws MailException
getSubFolderCount()
or hasSubFolders().IFolder objects
public int getSubFolderCount()
throws MailException
getSubFolders()
public boolean hasSubFolders()
throws MailException
true if this folder has sub-folders; false otherwisegetSubFolders()
public java.lang.String getName()
throws MailException
public java.lang.String getFullName()
throws MailException
public int getMessageCount()
throws MailException
public int getMessageCount(MessageFilter filter)
throws MailException
public int getUnreadMessageCount()
throws MailException
public void delete()
throws MailException
MailException - an error occurs when deleting the folder
public void rename(java.lang.String sName)
throws MailException
sName - the new name of the folder (may not be null or empty)
public java.lang.Object getID()
throws MailException
public int getType()
throws MailException
TYPE_ constants)
public boolean isUnderDeletedFolder()
throws MailException
true if this folder is under the deleted folder; false otherwise
public java.util.List getMessages()
throws MailException
IMessage objects
public java.util.List getMessages(int iFromIndex,
int iToIndex)
throws MailException
iFromIndex and iToIndex.iFromIndex - the from index endpoint (inclusive)iToIndex - the to index highpoint (exclusive)IMessage objects
public java.util.List getMessages(int iFromIndex,
int iToIndex,
MessageFilter filter)
throws MailException
iFromIndex and iToIndex.iFromIndex - the from index endpoint (inclusive)iToIndex - the to index highpoint (exclusive)filter - the filterIMessage objects
public java.util.List getMessages(int iFromIndex,
int iToIndex,
MessageFilter filter,
MessageComparator comp)
throws MailException
iFromIndex and iToIndex.iFromIndex - the from index endpoint (inclusive)iToIndex - the to index highpoint (exclusive)filter - the filtercomp - the message comparator for sorting (null for default sorting)IMessage objects
public IFolder createFolder(java.lang.String sName)
throws MailException
sName - the name of the folder (may not be null or empty)null if the create fails
public IMessage getMessage(java.lang.Object id)
throws MailException
id - the ID of the message to retrievenull if not found
public IMessage getMessage(java.lang.Object id,
boolean bMarkRead)
throws MailException
id - the ID of the message to retrievebMarkRead - true to mark the message as read; false otherwisenull if not found
public void move(IFolder targetFolder)
throws MailException
targetFolder - the target folder to move to (may not be null)
public IFolder copy(IFolder targetFolder)
throws MailException
f - the target parent folder to copy to (may not be null)
|
Compoze Software, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||