public class AlfrescoImapHostManager extends Object implements com.icegreen.greenmail.imap.ImapHostManager
Constructor and Description |
---|
AlfrescoImapHostManager(ImapService imapService) |
Modifier and Type | Method and Description |
---|---|
com.icegreen.greenmail.store.MailFolder |
createMailbox(com.icegreen.greenmail.user.GreenMailUser user,
String mailboxName)
Returns a reference to a newly created mailbox.
|
void |
createPrivateMailAccount(com.icegreen.greenmail.user.GreenMailUser user)
Not supported.
|
void |
deleteMailbox(com.icegreen.greenmail.user.GreenMailUser user,
String mailboxName)
Deletes an existing MailBox.
|
List<?> |
getAllMessages()
Not supported.
|
com.icegreen.greenmail.store.MailFolder |
getFolder(com.icegreen.greenmail.user.GreenMailUser user,
String mailboxName)
Returns a reference to an existing Mailbox.
|
com.icegreen.greenmail.store.MailFolder |
getFolder(com.icegreen.greenmail.user.GreenMailUser user,
String mailboxName,
boolean mustExist)
Simply calls
getFolder(GreenMailUser, String) . |
char |
getHierarchyDelimiter()
Returns the hierarchy delimiter for mailboxes on this host.
|
com.icegreen.greenmail.store.MailFolder |
getInbox(com.icegreen.greenmail.user.GreenMailUser user)
Returns a reference to the user's INBOX.
|
Collection<com.icegreen.greenmail.store.MailFolder> |
listMailboxes(com.icegreen.greenmail.user.GreenMailUser user,
String mailboxPattern)
Returns an collection of mailboxes.
|
Collection<com.icegreen.greenmail.store.MailFolder> |
listSubscribedMailboxes(com.icegreen.greenmail.user.GreenMailUser user,
String mailboxPattern)
Returns an collection of subscribed mailboxes.
|
void |
renameMailbox(com.icegreen.greenmail.user.GreenMailUser user,
String oldMailboxName,
String newMailboxName)
Renames an existing mailbox.
|
void |
subscribe(com.icegreen.greenmail.user.GreenMailUser user,
String mailbox)
Subscribes a user to a mailbox.
|
void |
unsubscribe(com.icegreen.greenmail.user.GreenMailUser user,
String mailbox)
Unsubscribes from a given mailbox.
|
public AlfrescoImapHostManager(ImapService imapService)
imapService
- ImapServicepublic char getHierarchyDelimiter()
getHierarchyDelimiter
in interface com.icegreen.greenmail.imap.ImapHostManager
public Collection<com.icegreen.greenmail.store.MailFolder> listMailboxes(com.icegreen.greenmail.user.GreenMailUser user, String mailboxPattern) throws com.icegreen.greenmail.store.FolderException
listMailboxes
in interface com.icegreen.greenmail.imap.ImapHostManager
user
- User making the requestmailboxPattern
- String name of a mailbox possible including a wildcard.com.icegreen.greenmail.store.FolderException
public Collection<com.icegreen.greenmail.store.MailFolder> listSubscribedMailboxes(com.icegreen.greenmail.user.GreenMailUser user, String mailboxPattern) throws com.icegreen.greenmail.store.FolderException
listSubscribedMailboxes
in interface com.icegreen.greenmail.imap.ImapHostManager
user
- User making the requestmailboxPattern
- String name of a mailbox possible including a wildcard.com.icegreen.greenmail.store.FolderException
public void renameMailbox(com.icegreen.greenmail.user.GreenMailUser user, String oldMailboxName, String newMailboxName) throws com.icegreen.greenmail.store.FolderException, com.icegreen.greenmail.imap.AuthorizationException
renameMailbox
in interface com.icegreen.greenmail.imap.ImapHostManager
user
- User making the request.oldMailboxName
- String name of the existing foldernewMailboxName
- String target new namecom.icegreen.greenmail.store.FolderException
- if an existing folder with the new name.AlfrescoImapFolderException
- if user does not have rights to create the new mailbox.com.icegreen.greenmail.imap.AuthorizationException
public com.icegreen.greenmail.store.MailFolder createMailbox(com.icegreen.greenmail.user.GreenMailUser user, String mailboxName) throws com.icegreen.greenmail.imap.AuthorizationException, com.icegreen.greenmail.store.FolderException
createMailbox
in interface com.icegreen.greenmail.imap.ImapHostManager
user
- User making the request.mailboxName
- String name of the targetcom.icegreen.greenmail.store.FolderException
- if mailbox already existsAlfrescoImapFolderException
- if user does not have rights to create the new mailbox.com.icegreen.greenmail.imap.AuthorizationException
public void deleteMailbox(com.icegreen.greenmail.user.GreenMailUser user, String mailboxName) throws com.icegreen.greenmail.store.FolderException, com.icegreen.greenmail.imap.AuthorizationException
deleteMailbox
in interface com.icegreen.greenmail.imap.ImapHostManager
user
- User making the request.mailboxName
- String name of the targetcom.icegreen.greenmail.store.FolderException
- if mailbox has a non-selectable store with childrencom.icegreen.greenmail.imap.AuthorizationException
public com.icegreen.greenmail.store.MailFolder getFolder(com.icegreen.greenmail.user.GreenMailUser user, String mailboxName)
getFolder
in interface com.icegreen.greenmail.imap.ImapHostManager
user
- User making the request.mailboxName
- String name of the target.public com.icegreen.greenmail.store.MailFolder getFolder(com.icegreen.greenmail.user.GreenMailUser user, String mailboxName, boolean mustExist) throws com.icegreen.greenmail.store.FolderException
getFolder(GreenMailUser, String)
. Added to implement ImapHostManager
.getFolder
in interface com.icegreen.greenmail.imap.ImapHostManager
com.icegreen.greenmail.store.FolderException
public com.icegreen.greenmail.store.MailFolder getInbox(com.icegreen.greenmail.user.GreenMailUser user) throws com.icegreen.greenmail.store.FolderException
getInbox
in interface com.icegreen.greenmail.imap.ImapHostManager
user
- The user making the request.com.icegreen.greenmail.store.FolderException
public void createPrivateMailAccount(com.icegreen.greenmail.user.GreenMailUser user) throws com.icegreen.greenmail.store.FolderException
ImapHostManager
.createPrivateMailAccount
in interface com.icegreen.greenmail.imap.ImapHostManager
com.icegreen.greenmail.store.FolderException
public void subscribe(com.icegreen.greenmail.user.GreenMailUser user, String mailbox) throws com.icegreen.greenmail.store.FolderException
subscribe
in interface com.icegreen.greenmail.imap.ImapHostManager
user
- User making the requestmailbox
- String representation of a mailbox name.com.icegreen.greenmail.store.FolderException
public void unsubscribe(com.icegreen.greenmail.user.GreenMailUser user, String mailbox) throws com.icegreen.greenmail.store.FolderException
unsubscribe
in interface com.icegreen.greenmail.imap.ImapHostManager
user
- User making the requestmailbox
- String representation of a mailbox name.com.icegreen.greenmail.store.FolderException
public List<?> getAllMessages()
getAllMessages
in interface com.icegreen.greenmail.imap.ImapHostManager
Copyright © 2005–2017 Alfresco Software. All rights reserved.