|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ImapService
Nested Class Summary | |
---|---|
static class |
ImapService.EmailBodyFormat
Helper enumeration to handle email body format text/html and text/plain for Alfresco/Share webapp |
Method Summary | |
---|---|
AlfrescoImapFolder |
createMailbox(AlfrescoImapUser user,
java.lang.String mailboxName)
Returns a reference to a newly created mailbox. |
void |
deleteMailbox(AlfrescoImapUser user,
java.lang.String mailboxName)
Deletes an existing MailBox. |
org.alfresco.service.cmr.repository.NodeRef |
extractAttachments(org.alfresco.service.cmr.repository.NodeRef parentFolder,
org.alfresco.service.cmr.repository.NodeRef messageFile,
javax.mail.internet.MimeMessage originalMessage)
Extract Attachments |
java.lang.String |
getDefaultEmailBodyTemplate(ImapService.EmailBodyFormat type)
Returns a template for email body. |
java.lang.String |
getDefaultFromAddress()
|
java.lang.String |
getDefaultToAddress()
|
javax.mail.Flags |
getFlags(FileInfo messageFileInfo)
Return flags that belong to the specified imap folder. |
AlfrescoImapFolder |
getFolder(AlfrescoImapUser user,
java.lang.String mailboxName)
Returns a reference to an existing Mailbox. |
boolean |
getImapServerEnabled()
Determines whether the IMAP server is enabled. |
org.alfresco.service.cmr.repository.NodeRef |
getMailboxRootRef(java.lang.String mailboxName,
java.lang.String userName)
Get root reference for the specified mailbox |
java.lang.String |
getRepositoryTemplatePath()
|
java.lang.String |
getShareApplicationContextUrl()
|
java.lang.String |
getWebApplicationContextUrl()
|
boolean |
isNodeInSitesLibrary(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Determine if provided node belongs to Sites. |
java.util.List |
listMailboxes(AlfrescoImapUser user,
java.lang.String mailboxPattern)
Returns an collection of mailboxes. |
java.util.List |
listSubscribedMailboxes(AlfrescoImapUser user,
java.lang.String mailboxPattern)
Returns an collection of subscribed mailboxes. |
void |
renameMailbox(AlfrescoImapUser user,
java.lang.String oldMailboxName,
java.lang.String newMailboxName)
Renames an existing mailbox. |
java.util.List |
searchMails(org.alfresco.service.cmr.repository.NodeRef contextNodeRef,
AlfrescoImapConst.ImapViewMode viewMode)
Search for emails in specified folder depend on view mode. |
void |
setFlag(FileInfo messageFileInfo,
javax.mail.Flags.Flag flag,
boolean value)
Set flag to the specified imapFolder. |
void |
setFlags(FileInfo messageFileInfo,
javax.mail.Flags flags,
boolean value)
Set flags to the specified imapFolder. |
void |
subscribe(AlfrescoImapUser user,
java.lang.String mailbox)
Subscribes a user to a mailbox. |
void |
unsubscribe(AlfrescoImapUser user,
java.lang.String mailbox)
Unsubscribes from a given mailbox. |
Method Detail |
---|
java.util.List listMailboxes(AlfrescoImapUser user, java.lang.String mailboxPattern)
user
- User making the requestmailboxPattern
- String name of a mailbox encoded in MUTF-7, possible including a wildcard.
java.util.List listSubscribedMailboxes(AlfrescoImapUser user, java.lang.String mailboxPattern)
user
- User making the requestmailboxPattern
- String name of a mailbox encoded in MUTF-7, possible including a wildcard.
AlfrescoImapFolder createMailbox(AlfrescoImapUser user, java.lang.String mailboxName)
user
- User making the request.mailboxName
- String name of the target encoded in MUTF-7,
void deleteMailbox(AlfrescoImapUser user, java.lang.String mailboxName)
user
- User making the request.mailboxName
- String name of the target encoded in MUTF-7,
com.icegreen.greenmail.store.FolderException
- if mailbox has a non-selectable store with childrenvoid renameMailbox(AlfrescoImapUser user, java.lang.String oldMailboxName, java.lang.String newMailboxName)
user
- User making the request.oldMailboxName
- String name of the existing folder encoded in MUTF-7,newMailboxName
- String target new name encoded in MUTF-7,AlfrescoImapFolder getFolder(AlfrescoImapUser user, java.lang.String mailboxName)
user
- User making the request.mailboxName
- String name of the target encoded in MUTF-7,.
org.alfresco.service.cmr.repository.NodeRef getMailboxRootRef(java.lang.String mailboxName, java.lang.String userName)
mailboxName
- mailbox name in IMAP client.userName
-
void subscribe(AlfrescoImapUser user, java.lang.String mailbox)
user
- User making the requestmailbox
- String representation of a mailbox name encoded in MUTF-7,.void unsubscribe(AlfrescoImapUser user, java.lang.String mailbox)
user
- User making the requestmailbox
- String representation of a mailbox name encoded in MUTF-7,.java.util.List searchMails(org.alfresco.service.cmr.repository.NodeRef contextNodeRef, AlfrescoImapConst.ImapViewMode viewMode)
contextNodeRef
- context folder for searchnamePattern
- name pattern for searchviewMode
- (ARCHIVE, MIXED or VIRTUAL)includeSubFolders
- includeSubFolders
javax.mail.Flags getFlags(FileInfo messageFileInfo)
messageInfo
- imap folder info.
void setFlags(FileInfo messageFileInfo, javax.mail.Flags flags, boolean value)
messageInfo
- FileInfo of imap Folder.flags
- flags to set.value
- value to set.void setFlag(FileInfo messageFileInfo, javax.mail.Flags.Flag flag, boolean value)
messageInfo
- FileInfo of imap Folderflag
- flag to set.value
- value value to set.java.lang.String getDefaultFromAddress()
java.lang.String getDefaultToAddress()
java.lang.String getRepositoryTemplatePath()
java.lang.String getWebApplicationContextUrl()
java.lang.String getShareApplicationContextUrl()
java.lang.String getDefaultEmailBodyTemplate(ImapService.EmailBodyFormat type)
"Data Dictionary > IMAP Templates >"
. This path should be set as the property of the "imapHelper" bean.
In this case it returns NodeRef.toString()
of the template. If there are no template in the repository it
returns a default template on the classpath.
Type
- one of the possible body types text/html and text/plain
boolean isNodeInSitesLibrary(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- nodeRef
org.alfresco.service.cmr.repository.NodeRef extractAttachments(org.alfresco.service.cmr.repository.NodeRef parentFolder, org.alfresco.service.cmr.repository.NodeRef messageFile, javax.mail.internet.MimeMessage originalMessage) throws java.io.IOException, javax.mail.MessagingException
parentFolder
- messageFile
- the node ref of the message.originalMessage
-
java.io.IOException
javax.mail.MessagingException
boolean getImapServerEnabled()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |