|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.fortuna.mstor.connector.AbstractFolderDelegate<MessageDelegate>
net.fortuna.mstor.connector.nntp.NntpFolder
public class NntpFolder
$Id$ Created on 10/08/2008
| Constructor Summary | |
|---|---|
NntpFolder(org.apache.commons.net.nntp.NewsgroupInfo newsgroupInfo,
org.apache.commons.net.nntp.NNTPClient client)
|
|
| 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. |
protected MessageDelegate |
createMessage(int messageNumber)
|
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. |
FolderDelegate<MessageDelegate> |
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. |
MessageDelegate |
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<MessageDelegate> |
getParent()
|
char |
getSeparator()
|
int |
getType()
|
long |
getUidValidity()
Returns the UID validity associated with the metadata. |
FolderDelegate<MessageDelegate>[] |
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. |
protected void |
setLastUid(long uid)
|
| Methods inherited from class net.fortuna.mstor.connector.AbstractFolderDelegate |
|---|
allocateUid, getDeletedMessageCount |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NntpFolder(org.apache.commons.net.nntp.NewsgroupInfo newsgroupInfo,
org.apache.commons.net.nntp.NNTPClient client)
| Method Detail |
|---|
protected MessageDelegate createMessage(int messageNumber)
throws DelegateException
createMessage in class AbstractFolderDelegate<MessageDelegate>messageNumber - the message number to associate with the new message
DelegateException - where an error occurs creating the delegate
protected void setLastUid(long uid)
throws java.lang.UnsupportedOperationException,
DelegateException
setLastUid in class AbstractFolderDelegate<MessageDelegate>uid - the latest UID for the folder
java.lang.UnsupportedOperationException - if this method is not supported in the folder delegate
DelegateException - where an error occurs updating the latest UID
public void appendMessages(javax.mail.Message[] messages)
throws javax.mail.MessagingException
FolderDelegate
messages - an array of messages to append to the folder
javax.mail.MessagingException - where an error occurs appending the messages
public void close()
throws javax.mail.MessagingException
FolderDelegate
javax.mail.MessagingException - where an unexpected error occurs closing the folder
public boolean create(int type)
throws javax.mail.MessagingException
FolderDelegate
type - a folder type
javax.mail.MessagingException - where an unexpected error occurs creating the delegatepublic boolean delete()
FolderDelegate
public boolean exists()
FolderDelegate
public void expunge(javax.mail.Message[] deleted)
throws javax.mail.MessagingException
FolderDelegate
deleted - an array of deleted messages to expunge
javax.mail.MessagingException - where an error occurs expunging the messagespublic FolderDelegate<MessageDelegate> getFolder(java.lang.String name)
FolderDelegate
name - a folder name
public java.lang.String getFullName()
public long getLastModified()
throws java.lang.UnsupportedOperationException
FolderDelegate
java.lang.UnsupportedOperationException - if this method is not supported by the folder implementation
public long getLastUid()
throws java.lang.UnsupportedOperationException
FolderDelegate
java.lang.UnsupportedOperationException - if this method is not supported by the folder implementation
public MessageDelegate getMessage(int messageNumber)
throws DelegateException
FolderDelegate
messageNumber - the message number of the message to retrieve
DelegateException - where an error occurs retrieving the message
public java.io.InputStream getMessageAsStream(int index)
throws java.io.IOException
FolderDelegate
index - the index of the message to return
java.io.IOException - where an error occurs
public int getMessageCount()
throws javax.mail.MessagingException
FolderDelegate
javax.mail.MessagingException - where an unexpected error occurs retrieving the message countpublic java.lang.String getFolderName()
public FolderDelegate<MessageDelegate> getParent()
public char getSeparator()
public int getType()
Folder.HOLDS_FOLDERS,
Folder.HOLDS_MESSAGES
public long getUidValidity()
throws java.lang.UnsupportedOperationException,
javax.mail.MessagingException
FolderDelegate
java.lang.UnsupportedOperationException - if this method is not supported by the folder implementation
javax.mail.MessagingException - if an error occurs retrieving the validity valuepublic FolderDelegate<MessageDelegate>[] list(java.lang.String pattern)
FolderDelegate
pattern - a pattern to match folders against
public void open(int mode)
FolderDelegate
mode - the mode to open the folderFolder.READ_ONLY,
Folder.READ_WRITEpublic boolean renameTo(java.lang.String name)
FolderDelegate
name - the new folder name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||