|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hs.mail.imap.mailbox.DefaultMailboxManager
public class DefaultMailboxManager
| Constructor Summary | |
|---|---|
DefaultMailboxManager()
|
|
| Method Summary | |
|---|---|
void |
addEventListener(EventListener listener)
|
void |
addMessage(long ownerID,
MailMessage message,
String mailboxName)
Appends a message to the user's INBOX. |
void |
addSubscription(long userID,
long mailboxID,
String mailboxName)
Subscribe the user to the given mailbox. |
void |
appendMessage(long mailboxID,
Date internalDate,
javax.mail.Flags flags,
File file)
Appends a message to this mailbox. |
void |
copyMessage(long uid,
long mailboxID)
Copies a message to the given mailbox. |
Mailbox |
createMailbox(long ownerID,
String mailboxName)
Creates a new mailbox. |
void |
deleteMailbox(long ownerID,
long mailboxID,
boolean delete)
Delete or empty a mailbox from store. |
void |
deleteMessage(long uid)
Deletes the given message. |
void |
deleteSubscription(long userID,
String mailboxName)
Unsubscribes the user from the given mailbox. |
void |
destroy()
|
List<Long> |
expunge(long mailboxID)
Gets the UIDs of messages which has /Deleted flag. |
List<Mailbox> |
getChildren(long userID,
long ownerID,
String mailboxName,
boolean subscribed)
|
EventDispatcher |
getEventDispatcher()
|
javax.mail.Flags |
getFlags(long uid)
|
Map<String,String> |
getHeader(long physMessageID)
Gets the headers of the message. |
Map<String,String> |
getHeader(long physMessageID,
String[] fields)
Gets the headers of the message. |
Mailbox |
getMailbox(long ownerID,
String mailboxName)
Returns user's Mailbox with a given path |
List<Long> |
getMailboxIDList(String mailboxName)
|
FetchData |
getMessageFetchData(long uid)
|
List<Long> |
getMessageIDList(long mailboxID)
|
org.springframework.transaction.support.TransactionTemplate |
getTransactionTemplate()
|
boolean |
hasChildren(Mailbox mailbox)
Does the mailbox have inferior child mailboxes? |
boolean |
isSubscribed(long userID,
String mailboxName)
Check if given mailbox is subscribed to user |
boolean |
mailboxExists(long ownerID,
String mailboxName)
Check if given mailbox exists. |
void |
removeEventListener(EventListener listener)
|
void |
renameMailbox(Mailbox source,
String targetName)
Renames a mailbox. |
void |
resetRecent(long mailboxID)
|
List<Long> |
search(UidToMsnMapper map,
long mailboxID,
SearchKey key)
Searches for the messages matching the given query. |
void |
setFetchDataCache(net.sf.ehcache.Ehcache cache)
|
void |
setFlags(long uid,
javax.mail.Flags flags,
boolean replace,
boolean set)
Sets flags on this message. |
void |
setHeaderCache(net.sf.ehcache.Ehcache cache)
|
void |
setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultMailboxManager()
| Method Detail |
|---|
public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
public org.springframework.transaction.support.TransactionTemplate getTransactionTemplate()
public void setFetchDataCache(net.sf.ehcache.Ehcache cache)
public void setHeaderCache(net.sf.ehcache.Ehcache cache)
public EventDispatcher getEventDispatcher()
getEventDispatcher in interface MailboxManagerpublic void addEventListener(EventListener listener)
addEventListener in interface MailboxManagerpublic void removeEventListener(EventListener listener)
removeEventListener in interface MailboxManager
public Mailbox getMailbox(long ownerID,
String mailboxName)
MailboxManagerMailbox with a given path
getMailbox in interface MailboxManagerownerID - owner of the mailboxmailboxName - path to the mailbox
Mailbox
public boolean mailboxExists(long ownerID,
String mailboxName)
MailboxManager
mailboxExists in interface MailboxManagerownerID - owner of this mailboxmailboxName - the name of mailbox for checking existence
public List<Mailbox> getChildren(long userID,
long ownerID,
String mailboxName,
boolean subscribed)
getChildren in interface MailboxManagerpublic List<Long> getMailboxIDList(String mailboxName)
getMailboxIDList in interface MailboxManagerpublic boolean hasChildren(Mailbox mailbox)
MailboxManager
hasChildren in interface MailboxManagermailbox - ID of the mailbox
public List<Long> expunge(long mailboxID)
MailboxManager
expunge in interface MailboxManagermailboxID - ID of mailbox
public List<Long> search(UidToMsnMapper map,
long mailboxID,
SearchKey key)
MailboxManager
search in interface MailboxManagermap - UID to MSN converting mapmailboxID - ID of mailbox to searchkey - the search query
public Mailbox createMailbox(long ownerID,
String mailboxName)
MailboxManager
createMailbox in interface MailboxManagerownerID - owner of the mailboxmailboxName - the name of mailbox to create
Mailbox created
public void renameMailbox(Mailbox source,
String targetName)
MailboxManager
renameMailbox in interface MailboxManagersource - original mailboxtargetName - new name for the mailbox
public void deleteMailbox(long ownerID,
long mailboxID,
boolean delete)
MailboxManager
deleteMailbox in interface MailboxManagerownerID - ID of the user who owns the mailboxmailboxID - ID of the mailboxdelete - true when delete, false when empty
public boolean isSubscribed(long userID,
String mailboxName)
MailboxManager
isSubscribed in interface MailboxManageruserID - ID of user
public void addSubscription(long userID,
long mailboxID,
String mailboxName)
MailboxManager
addSubscription in interface MailboxManageruserID - ID of the usermailboxID - ID of the mailbox to subscribe
public void deleteSubscription(long userID,
String mailboxName)
MailboxManager
deleteSubscription in interface MailboxManagerpublic FetchData getMessageFetchData(long uid)
getMessageFetchData in interface MailboxManagerpublic javax.mail.Flags getFlags(long uid)
getFlags in interface MailboxManagerpublic List<Long> getMessageIDList(long mailboxID)
getMessageIDList in interface MailboxManager
public void addMessage(long ownerID,
MailMessage message,
String mailboxName)
MailboxManager
addMessage in interface MailboxManager
public void appendMessage(long mailboxID,
Date internalDate,
javax.mail.Flags flags,
File file)
throws IOException
MailboxManager
appendMessage in interface MailboxManagermailboxID - ID of mailbox to append a messageinternalDate - the time of addition to be setflags - optionally set these flags on created message, or null when no
additional flags should be setfile - the file containing the mail contents
IOExceptionpublic void deleteMessage(long uid)
MailboxManager
deleteMessage in interface MailboxManageruid - ID of the message to delete
public void copyMessage(long uid,
long mailboxID)
MailboxManager
copyMessage in interface MailboxManageruid - ID of the message to copymailboxID - ID of mailbox where message will be copiedpublic void resetRecent(long mailboxID)
resetRecent in interface MailboxManager
public void setFlags(long uid,
javax.mail.Flags flags,
boolean replace,
boolean set)
MailboxManager
setFlags in interface MailboxManageruid - ID of the message to set flagsflags - flags to be setreplace - true if to replaceset - true if to set, false to resetpublic Map<String,String> getHeader(long physMessageID)
getHeader in interface MailboxManagerphysMessageID - ID of the physical message
public Map<String,String> getHeader(long physMessageID,
String[] fields)
MailboxManager
getHeader in interface MailboxManagerphysMessageID - ID of the physical messagefields - Array of fields to retrieve
public void destroy()
throws Exception
destroy in interface org.springframework.beans.factory.DisposableBeanException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||