|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MessagingMessageAccess
MessagingMessageAccess - Provides access to message storage.
| Method Summary | |
|---|---|
void |
appendMessages(java.lang.String folder,
MessagingMessage[] messages)
Appends specified messages to given folder. |
java.util.List<java.lang.String> |
copyMessages(java.lang.String sourceFolder,
java.lang.String destFolder,
java.lang.String[] messageIds,
boolean fast)
Copies specified messages from source folder to destination folder. |
void |
deleteMessages(java.lang.String folder,
java.lang.String[] messageIds,
boolean hardDelete)
Deletes specified messages in folder. |
java.util.List<MessagingMessage> |
getAllMessages(java.lang.String folder,
IndexRange indexRange,
MessagingField sortField,
OrderDirection order,
MessagingField... fields)
A convenience method to get all messages located in given folder. |
MessagingPart |
getAttachment(java.lang.String folder,
java.lang.String messageId,
java.lang.String sectionId)
Gets the message's attachment identified through given section identifier. |
MessagingMessage |
getMessage(java.lang.String folder,
java.lang.String id,
boolean peek)
Gets the message associated with specified identifier. |
java.util.List<MessagingMessage> |
getMessages(java.lang.String folder,
java.lang.String[] messageIds,
MessagingField[] fields)
Gets the messages located in given folder whose identifier matches specified identifier. |
java.util.List<java.lang.String> |
moveMessages(java.lang.String sourceFolder,
java.lang.String destFolder,
java.lang.String[] messageIds,
boolean fast)
Moves specified messages from source folder to destination folder. |
MessagingMessage |
perform(MessagingMessage message,
java.lang.String action)
Performs specified action to given message and either returns resulting message or null if no further user interaction
is required. |
MessagingMessage |
perform(java.lang.String action)
Performs specified action and either returns resulting message or null if no further user interaction is required. |
MessagingMessage |
perform(java.lang.String folder,
java.lang.String id,
java.lang.String action)
Performs specified action to the message identified by given arguments and either returns resulting message or null if
no further user interaction is required. |
MessagingContent |
resolveContent(java.lang.String folder,
java.lang.String id,
java.lang.String referenceId)
This method resolves a @see ReferenceContent id. |
java.util.List<MessagingMessage> |
searchMessages(java.lang.String folder,
IndexRange indexRange,
MessagingField sortField,
OrderDirection order,
SearchTerm<?> searchTerm,
MessagingField[] fields)
Searches for messages located in given folder. |
void |
updateMessage(MessagingMessage message,
MessagingField[] fields)
Updates specified fields of given message. |
| Method Detail |
|---|
MessagingMessage getMessage(java.lang.String folder,
java.lang.String id,
boolean peek)
throws MessagingException
folder - The folder identifierid - The identifierpeek - true to peek message content (meaning any mechanisms to mark content as read disabled); otherwise
false
MessagingException - If message cannot be returned
java.util.List<MessagingMessage> getMessages(java.lang.String folder,
java.lang.String[] messageIds,
MessagingField[] fields)
throws MessagingException
The returned instances of MailMessage are pre-filled with specified fields through argument fields.
If any mail ID is invalid, null is returned for that entry.
folder - The folder identifiermessageIds - The message identifiersfields - The fields to pre-fill in returned instances of MessagingMessage
MessagingException - If message could not be returned
java.util.List<MessagingMessage> searchMessages(java.lang.String folder,
IndexRange indexRange,
MessagingField sortField,
OrderDirection order,
SearchTerm<?> searchTerm,
MessagingField[] fields)
throws MessagingException
List is returned. This method's
purpose is to return filtered messages' information for a fast list view. Therefore this method's fields
parameter should only contain instances of MessagingField which are marked as [low cost]. Otherwise pre-filling of
returned messages may take a long time and does no more fit to generate a fast list view.
Note that sorting needs not to be supported by underlying mailing system. This can be done on application side, too.
Same is for search, but in most cases it's faster to search on mailing system, but this heavily depends on how mails are accessed.
folder - The folder fullnameindexRange - The index range specifying the desired sub-list in sorted list; may be null to obtain complete list.
Range begins at the specified start index and extends to the message at index end - 1. Thus the length of the
range is end - start.sortField - The sort fieldorder - Whether ascending or descending sort ordersearchTerm - The search term to filter messages; may be null to obtain all messagesfields - The fields to pre-fill in returned instances of MessagingMessage
MessagingMessage
MessagingException - If messages cannot be returned
MessagingPart getAttachment(java.lang.String folder,
java.lang.String messageId,
java.lang.String sectionId)
throws MessagingException
folder - The folder fullnamemessageId - The message identifiersectionId - The attachment's section identifier
MessagingPart instance
MessagingException - If no attachment can be found whose sequence ID matches given section identifier.
void updateMessage(MessagingMessage message,
MessagingField[] fields)
throws MessagingException
message - The messagefields - The fields to update
MessagingException - If update operation fails
void appendMessages(java.lang.String folder,
MessagingMessage[] messages)
throws MessagingException
folder - The folder to append tomessages - The messages to append.
MessagingException - If appending messages fails
java.util.List<java.lang.String> copyMessages(java.lang.String sourceFolder,
java.lang.String destFolder,
java.lang.String[] messageIds,
boolean fast)
throws MessagingException
If no mail could be found for a given message identifier, the corresponding value in returned array of String is
null.
sourceFolder - The source folder identifierdestFolder - The destination folder identifiermessageIds - The message identifiersfast - true for fast copy (meaning no identifiers of corresponding messages in destination folder); otherwise
false
true;
then null is returned.
MessagingException - If copy operation fails
java.util.List<java.lang.String> moveMessages(java.lang.String sourceFolder,
java.lang.String destFolder,
java.lang.String[] messageIds,
boolean fast)
throws MessagingException
If no mail could be found for a given message identifier, the corresponding value in returned array of String is
null.
sourceFolder - The source folder identifierdestFolder - The destination folder identifiermessageIds - The message identifiersfast - true for fast move (meaning no identifiers of corresponding messages in destination folder); otherwise
false
true;
then null is returned.
MessagingException - If move operation fails
void deleteMessages(java.lang.String folder,
java.lang.String[] messageIds,
boolean hardDelete)
throws MessagingException
folder - The folder to delete inmessageIds - The message identifiershardDelete - true to perform a hard-delete; otherwise false to backup in default location
MessagingException - If delete operation fails
java.util.List<MessagingMessage> getAllMessages(java.lang.String folder,
IndexRange indexRange,
MessagingField sortField,
OrderDirection order,
MessagingField... fields)
throws MessagingException
If any messaging ID is invalid, null is returned for that entry.
folder - The folder identifierindexRange - The index range specifying the desired sub-list in sorted list; may be null to obtain complete list.
Range begins at the specified start index and extends to the message at index end - 1. Thus the length of the
range is end - start.sortField - The sort fieldorder - Whether ascending or descending sort orderfields - The fields to pre-fill in returned instances of MessagingMessage
MessagingMessage
MessagingException - If returning all messages fails
MessagingMessage perform(java.lang.String folder,
java.lang.String id,
java.lang.String action)
throws MessagingException
null if
no further user interaction is required.
folder - The folder identifierid - The message identifieraction - The action to perform
null if requested action yields no resulting message (meaning no further user
interaction required)
MessagingException - If performing specified action fails or action is not applicable for this perform() method
MessagingMessage perform(java.lang.String action)
throws MessagingException
null if no further user interaction is required.
action - The action to perform
null if requested action yields no resulting message (meaning no further user
interaction required)
MessagingException - If performing specified action fails or action is not applicable for this perform() method
MessagingMessage perform(MessagingMessage message,
java.lang.String action)
throws MessagingException
null if no further user interaction
is required.
message - The message to processaction - The action to perform
null if requested action yields no resulting message (meaning no further user
interaction required)
MessagingException - If performing specified action fails or action is not applicable for this perform() method
MessagingContent resolveContent(java.lang.String folder,
java.lang.String id,
java.lang.String referenceId)
throws MessagingException
ReferenceContent id.
folder - The folder identifierid - The message identifierreferenceId - the reference identifier
MessagingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||