|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.fortuna.mstor.connector.AbstractFolderDelegate<T>
net.fortuna.mstor.connector.mbox.AbstractMetaFolder<T>
T
- message delegate typepublic abstract class AbstractMetaFolder<T extends MessageDelegate>
Base implementation of a meta folder.
$Id$ Created: 18/08/2004
Constructor Summary | |
---|---|
AbstractMetaFolder(FolderDelegate<MessageDelegate> delegate)
Constructs a new meta folder instance. |
Method Summary | |
---|---|
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. |
protected FolderDelegate<MessageDelegate> |
getDelegate()
|
protected java.io.File |
getFile()
|
protected abstract java.lang.String |
getFileExtension()
|
java.lang.String |
getFolderName()
|
java.lang.String |
getFullName()
|
long |
getLastModified()
Returns the last modification timestamp of this folder. |
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. |
char |
getSeparator()
|
int |
getType()
|
protected int |
newUidValidity()
|
void |
open(int mode)
Open the folder delegate. |
protected abstract T[] |
removeMessages(javax.mail.Message[] deleted)
|
boolean |
renameTo(java.lang.String name)
Rename the folder delegate. |
protected abstract void |
save()
|
Methods inherited from class net.fortuna.mstor.connector.AbstractFolderDelegate |
---|
allocateUid, createMessage, getDeletedMessageCount, setLastUid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.fortuna.mstor.connector.FolderDelegate |
---|
getFolder, getLastUid, getMessage, getParent, getUidValidity, list |
Constructor Detail |
---|
public AbstractMetaFolder(FolderDelegate<MessageDelegate> delegate)
file
- the meta folder fileMethod Detail |
---|
public final int getType()
Folder.HOLDS_FOLDERS
,
Folder.HOLDS_MESSAGES
public final java.lang.String getFolderName()
public final java.lang.String getFullName()
public final boolean exists()
public final boolean delete()
public final boolean renameTo(java.lang.String name)
name
- the new folder name
public final void open(int mode)
mode
- the mode to open the folderFolder.READ_ONLY
,
Folder.READ_WRITE
public final void close() throws javax.mail.MessagingException
javax.mail.MessagingException
- where an unexpected error occurs closing the folderpublic final char getSeparator()
public final int getMessageCount() throws javax.mail.MessagingException
javax.mail.MessagingException
- where an unexpected error occurs retrieving the message countpublic final java.io.InputStream getMessageAsStream(int index) throws java.io.IOException
index
- the index of the message to return
java.io.IOException
- where an error occurspublic final 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 messagespublic final boolean create(int type) throws javax.mail.MessagingException
type
- a folder type
javax.mail.MessagingException
- where an unexpected error occurs creating the delegatepublic final 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 messagesprotected int newUidValidity()
protected final java.io.File getFile()
protected final FolderDelegate<MessageDelegate> getDelegate()
protected abstract java.lang.String getFileExtension()
protected abstract T[] removeMessages(javax.mail.Message[] deleted)
deleted
- protected abstract void save() throws DelegateException
DelegateException
public final 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 |