UIDFolder.FetchProfileItem| Modifier and Type | Field and Description |
|---|---|
protected char |
delimiter |
protected int |
messageCount |
protected int |
newMessageCount |
protected java.lang.String |
path
The folder path.
|
protected Flags |
permanentFlags |
protected int |
type
The type of this folder (HOLDS_MESSAGES or HOLDS_FOLDERS).
|
protected long |
uidnext |
protected long |
uidvalidity |
protected int |
unreadMessageCount |
HOLDS_FOLDERS, HOLDS_MESSAGES, mode, READ_ONLY, READ_WRITE, store| Modifier | Constructor and Description |
|---|---|
protected |
IMAPFolder(Store store,
java.lang.String path)
Constructor.
|
protected |
IMAPFolder(Store store,
java.lang.String path,
char delimiter)
Constructor.
|
protected |
IMAPFolder(Store store,
java.lang.String path,
int type,
char delimiter)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendMessages(Message[] messages)
Appends the specified set of messages to this folder.
|
void |
close(boolean expunge)
Closes this folder.
|
void |
copyMessages(Message[] msgs,
Folder folder)
Copies the specified messages into another folder.
|
boolean |
create(int type)
Create this folder.
|
boolean |
delete(boolean flag)
Delete this folder.
|
boolean |
equals(java.lang.Object other) |
boolean |
exists()
Indicates whether this folder exists.
|
Message[] |
expunge()
Expunges this folder.
|
void |
fetch(Message[] messages,
FetchProfile fp)
IMAP fetch routine.
|
int |
getDeletedMessageCount()
Returns the number of deleted messages in this folder.
|
Folder |
getFolder(java.lang.String name)
Returns a subfolder with the specified name.
|
java.lang.String |
getFullName()
Returns the full path of this folder.
|
Message |
getMessage(int msgnum)
Returns the specified message number from this folder.
|
Message |
getMessageByUID(long uid)
Returns the message corresponding to the given UID, or
null if no such message exists. |
int |
getMessageCount()
Returns the number of messages in this folder.
|
int |
getMessageCountByCriteria(java.lang.String criteria)
Convenience method for returning the number of messages in the
current folder that match the single criteria.
|
Message[] |
getMessagesByUID(long[] uids)
Returns the messages specified by the given UIDs.
|
Message[] |
getMessagesByUID(long start,
long end)
Returns the messages in the given range.
|
java.lang.String |
getName()
Returns the name of this folder.
|
int |
getNewMessageCount()
Returns the number of new messages in this folder.
|
Folder |
getParent()
Returns the parent folder of this folder.
|
Flags |
getPermanentFlags()
Returns the permanent flags for this folder.
|
char |
getSeparator()
Returns the path separator charcter.
|
int |
getType()
Returns the type of this folder.
|
long |
getUID(Message message)
Returns the UID for the specified message.
|
long |
getUIDValidity()
Returns the UIDValidity value associated with this folder.
|
int |
getUnreadMessageCount()
Returns the number of unread messages in this folder.
|
boolean |
hasNewMessages()
Indicates whether this folder contains new messages.
|
boolean |
isOpen()
Indicates whether this folder is open.
|
boolean |
isSubscribed()
Indicates whether this folder is subscribed.
|
Folder[] |
list(java.lang.String pattern)
Returns the subfolders for this folder.
|
Folder[] |
listSubscribed(java.lang.String pattern)
Returns the subscribed subfolders for this folder.
|
void |
open(int mode)
Opens this folder.
|
boolean |
renameTo(Folder folder)
Rename this folder.
|
Message[] |
search(SearchTerm term)
IMAP search function.
|
Message[] |
search(SearchTerm term,
Message[] msgs)
IMAP search function.
|
void |
setSubscribed(boolean flag)
Subscribe to or unsubscribe from this folder.
|
addConnectionListener, addFolderListener, addMessageChangedListener, addMessageCountListener, getMessages, getMessages, getMessages, getMode, getStore, getURLName, list, listSubscribed, notifyConnectionListeners, notifyFolderListeners, notifyFolderRenamedListeners, notifyMessageAddedListeners, notifyMessageChangedListeners, notifyMessageRemovedListeners, removeConnectionListener, removeFolderListener, removeMessageChangedListener, removeMessageCountListener, setFlags, setFlags, setFlags, toStringprotected java.lang.String path
protected int type
protected Flags permanentFlags
protected char delimiter
protected int messageCount
protected int newMessageCount
protected int unreadMessageCount
protected long uidvalidity
protected long uidnext
protected IMAPFolder(Store store, java.lang.String path)
protected IMAPFolder(Store store, java.lang.String path, char delimiter)
protected IMAPFolder(Store store, java.lang.String path, int type, char delimiter)
public java.lang.String getName()
public java.lang.String getFullName()
getFullName in class Folderpublic int getType()
throws MessagingException
getType in class FolderMessagingException - if a messaging error occurredpublic boolean exists()
throws MessagingException
exists in class FolderMessagingException - if a messaging error occurredpublic boolean hasNewMessages()
throws MessagingException
hasNewMessages in class FolderMessagingException - if a messaging error occurredpublic void open(int mode)
throws MessagingException
open in class Foldermode - open the Folder READ_ONLY or READ_WRITEMessagingException - if a messaging error occurredpublic boolean create(int type)
throws MessagingException
create in class Foldertype - the desired type of the folderMessagingExceptionpublic boolean delete(boolean flag)
throws MessagingException
delete in class Folderflag - delete any subfoldersFolderNotFoundException - if this folder does not existMessagingExceptionpublic boolean renameTo(Folder folder) throws MessagingException
renameTo in class Folderfolder - a folder representing the new name for this folderFolderNotFoundException - if this folder does not existMessagingExceptionpublic void close(boolean expunge)
throws MessagingException
close in class Folderexpunge - if the folder is to be expunged before it is closedMessagingException - if a messaging error occurredpublic Message[] expunge() throws MessagingException
expunge in class FolderMessagingException - if a messaging error occurredpublic boolean isOpen()
public Flags getPermanentFlags()
getPermanentFlags in class Folderpublic int getMessageCount()
throws MessagingException
getMessageCount in class FolderMessagingException - if a messaging error occurredpublic int getNewMessageCount()
throws MessagingException
getNewMessageCount in class FolderMessagingException - if a messaging error occurredpublic Message getMessage(int msgnum) throws MessagingException
getMessage in class Foldermsgnum - the message numberMessagingException - if a messaging error occurredpublic void copyMessages(Message[] msgs, Folder folder) throws MessagingException
The destination folder does not have to be open.
copyMessages in class Foldermsgs - the messagesfolder - the folder to copy the messages toMessagingExceptionpublic void appendMessages(Message[] messages) throws MessagingException
MimeMessages are accepted.appendMessages in class Foldermessages - array of messages to be appendedFolderNotFoundException - if this folder does not existMessagingException - if the append operation failedpublic void fetch(Message[] messages, FetchProfile fp) throws MessagingException
fetch in class Foldermessages - the messages to fetch the items forfp - the fetch profileMessagingExceptionpublic Message[] search(SearchTerm term) throws MessagingException
search in class Folderterm - the search termFolderNotFoundException - if this folder does not existMessagingExceptionpublic Message[] search(SearchTerm term, Message[] msgs) throws MessagingException
search in class Folderterm - the search termmsgs - the messages to be searchedMessagingExceptionpublic boolean isSubscribed()
FolderThis method can be invoked on a closed folder.
isSubscribed in class Folderpublic void setSubscribed(boolean flag)
throws MessagingException
FolderThis method can be invoked on a closed folder.
setSubscribed in class FolderMessagingExceptionpublic Folder[] list(java.lang.String pattern) throws MessagingException
list in class Folderpattern - the match patternMessagingExceptionpublic Folder[] listSubscribed(java.lang.String pattern) throws MessagingException
listSubscribed in class Folderpattern - the match patternMessagingExceptionpublic Folder getParent() throws MessagingException
getParent in class FolderMessagingExceptionpublic Folder getFolder(java.lang.String name) throws MessagingException
getFolder in class Foldername - the name of the folderMessagingExceptionpublic char getSeparator()
throws MessagingException
getSeparator in class FolderMessagingExceptionpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic long getUIDValidity()
throws MessagingException
UIDFolderA client should compare this value against a UIDValidity value saved from a previous session to ensure that any cached UIDs are valid.
getUIDValidity in interface UIDFolderMessagingExceptionpublic Message getMessageByUID(long uid) throws MessagingException
UIDFoldernull if no such message exists.getMessageByUID in interface UIDFolderuid - the UID of the desired messageMessagingExceptionpublic Message[] getMessagesByUID(long start, long end) throws MessagingException
UIDFolderend parameter
to indicate the last available UID.getMessagesByUID in interface UIDFolderstart - the start UIDend - the end UIDMessagingExceptionpublic Message[] getMessagesByUID(long[] uids) throws MessagingException
UIDFoldernull is returned for that entry.
The returned array will be of the same size as the specified UIDs.
getMessagesByUID in interface UIDFolderuids - the UIDsMessagingExceptionpublic long getUID(Message message) throws MessagingException
UIDFoldergetUID in interface UIDFoldermessage - a message in this folderMessagingExceptionpublic int getUnreadMessageCount()
throws MessagingException
getUnreadMessageCount in class FolderMessagingExceptionFolder.getUnreadMessageCount()public int getDeletedMessageCount()
throws MessagingException
getDeletedMessageCount in class FolderFolderNotFoundException - if this folder does not existMessagingExceptionFolder.getDeletedMessageCount()public int getMessageCountByCriteria(java.lang.String criteria)
throws MessagingException
MessagingException