public interface Store
Mailboxes
stored on this server.Modifier and Type | Method and Description |
---|---|
MailFolder |
createMailbox(MailFolder parent,
java.lang.String mailboxName,
boolean selectable)
Creates a mailbox under the supplied parent with the given name.
|
void |
deleteMailbox(MailFolder folder)
Deletes the supplied mailbox from the store.
|
java.util.Collection |
getChildren(MailFolder parent) |
MailFolder |
getMailbox(MailFolder parent,
java.lang.String mailboxName)
Looks up a child mailbox of the supplied parent with the name given.
|
MailFolder |
getMailbox(java.lang.String qualifiedMailboxName)
Retrieves a mailbox based on a fully qualified name.
|
java.util.Collection |
listMailboxes(java.lang.String searchPattern)
Lists all of the mailboxes in the store which have a name
matching the supplied search pattern.
|
void |
renameMailbox(MailFolder existingFolder,
java.lang.String newName)
Renames the mailbox with the new name.
|
MailFolder |
setSelectable(MailFolder folder,
boolean selectable)
Tells the store to make the supplied mailbox selectable or not (able to store
messages).
|
MailFolder getMailbox(java.lang.String qualifiedMailboxName)
qualifiedMailboxName
- null
if not.MailFolder getMailbox(MailFolder parent, java.lang.String mailboxName)
parent
- The parent mailboxmailboxName
- The name of the child to lookupnull
if not found.java.util.Collection getChildren(MailFolder parent)
parent
- A mailbox from this store.MailFolder
instances, which
are the children of the supplied parent.MailFolder createMailbox(MailFolder parent, java.lang.String mailboxName, boolean selectable) throws FolderException
parent
- A mailbox from this store.mailboxName
- The name of the mailbox to create.selectable
- If true
, the mailbox will be created to store messages.FolderException
- If the mailbox couldn't be created.MailFolder setSelectable(MailFolder folder, boolean selectable)
folder
- The mailbox to modify.selectable
- Whether this mailbox should be able to store messages.void deleteMailbox(MailFolder folder) throws FolderException
folder
- A mailbox from this store.FolderException
- If the mailbox couldn't be deleted.void renameMailbox(MailFolder existingFolder, java.lang.String newName) throws FolderException
existingFolder
- A mailbox from this store.newName
- The new name for the mailbox.FolderException
- If the mailbox couldn't be renamedjava.util.Collection listMailboxes(java.lang.String searchPattern) throws FolderException
Valid wildcards are: '*' - matches any number of characters, including the hierarchy delimiter '%' - matches any number of characters, but not the hierarchy delimiter
searchPattern
- The pattern to match mailboxesFolderException
- If the list operation failed