public class DefaultFolder extends IMAPFolder
IMAPFolder.FetchProfileItem, IMAPFolder.ProtocolCommand
attributes, availableFlags, exists, fullName, isNamespace, logger, messageCache, messageCacheLock, name, permanentFlags, protocol, separator, type, uidTable, UNKNOWN_SEPARATOR
HOLDS_FOLDERS, HOLDS_MESSAGES, mode, READ_ONLY, READ_WRITE, store
Modifier | Constructor and Description |
---|---|
protected |
DefaultFolder(IMAPStore store) |
Modifier and Type | Method and Description |
---|---|
void |
appendMessages(Message[] msgs)
Append the given messages into this folder.
|
boolean |
delete(boolean recurse)
Delete this folder.
|
Message[] |
expunge()
Expunge all messages marked as DELETED.
|
Folder |
getFolder(String name)
Get the named subfolder.
|
String |
getName()
Get the name of this folder.
|
Folder |
getParent()
Get this folder's parent.
|
boolean |
hasNewMessages()
Check whether this folder has new messages.
|
Folder[] |
list(String pattern)
List all subfolders matching the specified pattern.
|
Folder[] |
listSubscribed(String pattern)
List all subscribed subfolders matching the specified pattern.
|
boolean |
renameTo(Folder f)
Rename this folder.
|
addACL, addMessageCountListener, addMessages, addRights, appendUIDMessages, checkClosed, checkExists, checkOpened, checkRange, close, copyMessages, copyUIDMessages, create, doCommand, doCommandIgnoreFailure, doOptionalCommand, doProtocolCommand, exists, expunge, fetch, forceClose, getACL, getAttributes, getDeletedMessageCount, getEnvelopeCommand, getFullName, getHighestModSeq, getMessage, getMessageBySeqNumber, getMessageByUID, getMessageCount, getMessages, getMessagesBySeqNumbers, getMessagesByUID, getMessagesByUID, getMessagesByUIDChangedSince, getNewMessageCount, getPermanentFlags, getProtocol, getQuota, getSeparator, getSortedMessages, getSortedMessages, getStatusItem, getStoreProtocol, getType, getUID, getUIDNext, getUIDNotSticky, getUIDValidity, getUnreadMessageCount, handleResponse, id, idle, idle, isOpen, isSubscribed, keepConnectionAlive, listRights, moveMessages, moveUIDMessages, myRights, newIMAPMessage, open, open, releaseProtocol, releaseStoreProtocol, removeACL, removeRights, search, search, setFlags, setFlags, setFlags, setQuota, setSubscribed, throwClosedException
addConnectionListener, addFolderListener, addMessageChangedListener, close, finalize, getMessages, getMessages, getMode, getStore, getURLName, list, listSubscribed, notifyConnectionListeners, notifyFolderListeners, notifyFolderRenamedListeners, notifyMessageAddedListeners, notifyMessageChangedListeners, notifyMessageRemovedListeners, removeConnectionListener, removeFolderListener, removeMessageChangedListener, removeMessageCountListener, toString
protected DefaultFolder(IMAPStore store)
public String getName()
IMAPFolder
getName
in class IMAPFolder
public Folder getParent()
IMAPFolder
getParent
in class IMAPFolder
public Folder[] list(String pattern) throws MessagingException
IMAPFolder
list
in class IMAPFolder
pattern
- the match patternFolderNotFoundException
- if this folder does
not exist.MessagingException
- for other failuresFolder.listSubscribed(java.lang.String)
public Folder[] listSubscribed(String pattern) throws MessagingException
IMAPFolder
listSubscribed
in class IMAPFolder
pattern
- the match patternFolderNotFoundException
- if this folder does
not exist.MessagingException
- for other failuresFolder.list(java.lang.String)
public boolean hasNewMessages() throws MessagingException
IMAPFolder
hasNewMessages
in class IMAPFolder
FolderNotFoundException
- if this folder does
not exist.MessagingException
- for other failurespublic Folder getFolder(String name) throws MessagingException
IMAPFolder
getFolder
in class IMAPFolder
name
- name of the FolderMessagingException
- for failurespublic boolean delete(boolean recurse) throws MessagingException
IMAPFolder
delete
in class IMAPFolder
recurse
- also delete subfolders?FolderNotFoundException
- if this folder does
not existMessagingException
- for other failuresFolderEvent
public boolean renameTo(Folder f) throws MessagingException
IMAPFolder
renameTo
in class IMAPFolder
f
- a folder representing the new name for this FolderFolderNotFoundException
- if this folder does
not existMessagingException
- for other failuresFolderEvent
public void appendMessages(Message[] msgs) throws MessagingException
IMAPFolder
appendMessages
in class IMAPFolder
msgs
- array of Messages to be appendedFolderNotFoundException
- if this folder does
not exist.MessagingException
- if the append failed.public Message[] expunge() throws MessagingException
IMAPFolder
expunge
in class IMAPFolder
FolderNotFoundException
- if this folder does not
existMessagingException
- for other failuresMessage.isExpunged()
,
MessageCountEvent
Copyright © 2019 JBoss by Red Hat. All rights reserved.