|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - the type of message delegate supportedpublic interface FolderDelegate<T extends MessageDelegate>
Implementors support delegation of specific functions from MStorFolder.
$Id$ Created on 30/07/2007
| Method Summary | |
|---|---|
long |
allocateUid(MessageDelegate message)
Allocates a new message UID for the folder. |
void |
appendMessages(javax.mail.Message[] messages)
Append the specified messages to this delegate. |
void |
close()
Close the folder delegate. |
boolean |
create(int type)
Initialise the delegate based on the specified folder type. |
boolean |
delete()
Delete the folder delegate. |
boolean |
exists()
Indicates whether the folder represented by this delegate exists. |
void |
expunge(javax.mail.Message[] deleted)
Permanently delete the specified messages from this delegate. |
int |
getDeletedMessageCount()
Optional support for more efficient implementation. |
FolderDelegate<T> |
getFolder(java.lang.String name)
Returns a child folder delegate with the specified name. |
java.lang.String |
getFolderName()
|
java.lang.String |
getFullName()
|
long |
getLastModified()
Returns the last modification timestamp of this folder. |
long |
getLastUid()
Retrieves the last allocated message UID for the folder. |
T |
getMessage(int messageNumber)
Returns message delegate corresponding to the specified message id. |
java.io.InputStream |
getMessageAsStream(int index)
Returns an input stream from which to read the specified message. |
int |
getMessageCount()
Returns the number of messages in the folder delegate. |
FolderDelegate<T> |
getParent()
|
char |
getSeparator()
|
int |
getType()
|
long |
getUidValidity()
Returns the UID validity associated with the metadata. |
FolderDelegate<T>[] |
list(java.lang.String pattern)
Returns a list of child folder delegates matching the specified pattern. |
void |
open(int mode)
Open the folder delegate. |
boolean |
renameTo(java.lang.String name)
Rename the folder delegate. |
| Method Detail |
|---|
java.lang.String getFolderName()
java.lang.String getFullName()
FolderDelegate<T> getParent()
boolean exists()
int getType()
Folder.HOLDS_FOLDERS,
Folder.HOLDS_MESSAGESFolderDelegate<T>[] list(java.lang.String pattern)
pattern - a pattern to match folders against
char getSeparator()
boolean create(int type)
throws javax.mail.MessagingException
type - a folder type
javax.mail.MessagingException - where an unexpected error occurs creating the delegate
FolderDelegate<T> getFolder(java.lang.String name)
throws javax.mail.MessagingException
name - a folder name
javax.mail.MessagingException - where an unexpected error occurs retrieving the folderboolean delete()
boolean renameTo(java.lang.String name)
name - the new folder name
void open(int mode)
mode - the mode to open the folderFolder.READ_ONLY,
Folder.READ_WRITE
void close()
throws javax.mail.MessagingException
javax.mail.MessagingException - where an unexpected error occurs closing the folder
int getMessageCount()
throws javax.mail.MessagingException
javax.mail.MessagingException - where an unexpected error occurs retrieving the message count
int getDeletedMessageCount()
throws javax.mail.MessagingException,
java.lang.UnsupportedOperationException
javax.mail.MessagingException - where an unexpected error occurs
java.lang.UnsupportedOperationException - if this method is not supported by the folder implementation
java.io.InputStream getMessageAsStream(int index)
throws java.io.IOException
index - the index of the message to return
java.io.IOException - where an error occurs
void appendMessages(javax.mail.Message[] messages)
throws javax.mail.MessagingException
messages - an array of messages to append to the folder
javax.mail.MessagingException - where an error occurs appending the messages
void expunge(javax.mail.Message[] deleted)
throws javax.mail.MessagingException
deleted - an array of deleted messages to expunge
javax.mail.MessagingException - where an error occurs expunging the messages
T getMessage(int messageNumber)
throws DelegateException
messageNumber - the message number of the message to retrieve
DelegateException - where an error occurs retrieving the message
long getLastUid()
throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException - if this method is not supported by the folder implementation
long allocateUid(MessageDelegate message)
throws java.lang.UnsupportedOperationException,
DelegateException
message - the message to allocate a UID value to
DelegateException - where an error occurs allocating a UID
java.lang.UnsupportedOperationException - if this method is not supported by the folder implementation
long getUidValidity()
throws java.lang.UnsupportedOperationException,
javax.mail.MessagingException
java.lang.UnsupportedOperationException - if this method is not supported by the folder implementation
javax.mail.MessagingException - if an error occurs retrieving the validity value
long getLastModified()
throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException - if this method is not supported by the folder implementation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||