|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.mail.Folder org.apache.geronimo.javamail.store.imap.IMAPFolder org.apache.geronimo.javamail.store.imap.IMAPRootFolder
public class IMAPRootFolder
An IMAP folder instance for the root of IMAP folder tree. This has some of the folder operations disabled.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.geronimo.javamail.store.imap.IMAPFolder |
---|
IMAPFolder.FetchProfileItem |
Field Summary |
---|
Fields inherited from class org.apache.geronimo.javamail.store.imap.IMAPFolder |
---|
availableFlags, cachedStatus, currentConnection, folderOpen, folderType, fullname, lastStatusTimeStamp, listInfo, maxSequenceNumber, messages, name, nextMessageID, permanentFlags, recentMessages, separator, session, statusCacheTimeout, subscribed, uidCache, uidNext, uidValidity, UNDETERMINED, unseenMessages |
Fields inherited from class javax.mail.Folder |
---|
HOLDS_FOLDERS, HOLDS_MESSAGES, mode, READ_ONLY, READ_WRITE, store |
Fields inherited from interface javax.mail.UIDFolder |
---|
LASTUID |
Constructor Summary | |
---|---|
IMAPRootFolder(IMAPStore store)
Create a default IMAPRootFolder attached to a specific Store instance. |
Method Summary | |
---|---|
void |
appendMessages(Message[] msgs)
Append the supplied messages to this folder. |
boolean |
create(int newType)
Create a new folder capable of containing subfolder and/or messages as determined by the type parameter. |
boolean |
delete(boolean recurse)
Delete this folder and possibly any subfolders. |
boolean |
exists()
Check to see if this folder physically exists in the store. |
Message[] |
expunge()
Permanently delete all supplied messages that have the DELETED flag set from the Store. |
int |
getDeletedMessagesCount()
|
Folder |
getFolder(String name)
Get the Folder determined by the supplied name; if the name is relative then it is interpreted relative to this folder. |
int |
getMessagesCount()
|
int |
getNewMessagesCount()
|
Folder |
getParent()
Return the parent for this folder; if the folder is at the root of a heirarchy this returns null. |
int |
getUnreadMessagesCount()
|
boolean |
hasNewMessages()
Check to see if this Folder conatins messages with the Flag.RECENT flag set. |
boolean |
rename(boolean recurse)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IMAPRootFolder(IMAPStore store)
store
- The Store instance this is the root for.Method Detail |
---|
public Folder getFolder(String name) throws MessagingException
getFolder
in class IMAPFolder
name
- the name of the folder to return
MessagingException
- if there was a problem accessing the storepublic Folder getParent()
IMAPFolder
getParent
in class IMAPFolder
public boolean exists() throws MessagingException
IMAPFolder
exists
in class IMAPFolder
MessagingException
- if there was a problem accessing the storepublic boolean hasNewMessages()
IMAPFolder
Flag.RECENT
flag set.
This can be used when the folder is closed to perform a light-weight check for new mail;
to perform an incremental check for new mail the folder must be opened.
hasNewMessages
in class IMAPFolder
public int getMessagesCount()
public int getNewMessagesCount()
public int getUnreadMessagesCount()
public int getDeletedMessagesCount()
public boolean create(int newType) throws MessagingException
IMAPFolder
CREATED FolderEvent
is sent to all FolderListeners registered with this Folder or with the Store.
create
in class IMAPFolder
newType
- the type, indicating if this folder should contain subfolders, messages or both
MessagingException
- if there was a problem accessing the storepublic boolean delete(boolean recurse) throws MessagingException
IMAPFolder
FolderEvent.DELETED
events are sent as appropriate.
If recurse is false, then the behaviour depends on the folder type and store
implementation as followd:
FolderEvent.DELETED
event is sent.FolderEvent.DELETED
event is sent; if the folder is not
empty then the delete fails and this method returns false.FolderEvent.DELETED
event is sent; if the folder does
contain subfolders then the implementation may choose from the following three
behaviors:
FolderEvent.DELETED
event, and then return true to indicate the delete was performed. Note this does
not delete the folder itself and the IMAPFolder.exists()
operation for this folder
will return true
delete
in class IMAPFolder
recurse
- whether subfolders should be recursively deleted as well
MessagingException
- if there was a problem accessing the storepublic boolean rename(boolean recurse) throws MessagingException
MessagingException
public void appendMessages(Message[] msgs) throws MessagingException
IMAPFolder
MessageCountEvent
is sent
to all listeners registered with this folder when all messages have been appended.
If the array contains a previously expunged message, it must be re-appended to the Store
and implementations must not abort this operation.
appendMessages
in class IMAPFolder
msgs
- The array of messages to append to the folder.
MessagingException
- if there was a problem accessing the storepublic Message[] expunge() throws MessagingException
IMAPFolder
MessageCountEvent
event is sent to all listeners with this folder. The expunge
may cause the indices of all messaged that remain in the folder to change.
expunge
in class IMAPFolder
MessagingException
- if there was a problem accessing the store
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |