Class ExchangeMailReader
java.lang.Object
de.muehlencord.shared.network.mail.exchange.ExchangeMailReader
- All Implemented Interfaces:
MailReader
- Author:
- Joern Muehlencord (joern@muehlencord.de)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect()connects to the mailboxvoidcopyMessage(MailMessage mm, String sourceFolder, String destFolder) copies the given message from the source folder to the destination foldervoiddisconnects from mailboxreturns the default folderreturns the folder, if folder path is a valid path to an existing folderintgetMessageCount(String holdFolder) returns the amount of message in the given foldergetMessages(String folderName) retrieves the list of messages stored in the given foldergetMessages(String folderName, int start, int end) retrieves the list of messages stored in the given foldergetSubFolder(String sourceFolder) returns the list of subfolders of the specified source foldervoidmoveMessage(MailMessage mm, String sourceFolder, String destFolder) moves the given message from the source folder to the destination foldervoidsetSeenFlag(String folder, MailMessage mm, boolean flagValue) marks the messages as seen
-
Constructor Details
-
Method Details
-
connect
Description copied from interface:MailReaderconnects to the mailbox- Specified by:
connectin interfaceMailReader- Throws:
MailReaderConnectionException- if he connection cannot be established
-
disconnect
public void disconnect()Description copied from interface:MailReaderdisconnects from mailbox- Specified by:
disconnectin interfaceMailReader
-
getDefaultFolder
Description copied from interface:MailReaderreturns the default folder- Specified by:
getDefaultFolderin interfaceMailReader- Returns:
- the default folder
- Throws:
MailReaderException- if the folder cannot be retrieved
-
getSubFolder
Description copied from interface:MailReaderreturns the list of subfolders of the specified source folder- Specified by:
getSubFolderin interfaceMailReader- Parameters:
sourceFolder- the folder to return the folder list for- Returns:
- the list of subfolders of the specified source folder
- Throws:
MailReaderException- if the folder list cannot be retrieved
-
getFolder
Description copied from interface:MailReaderreturns the folder, if folder path is a valid path to an existing folder- Specified by:
getFolderin interfaceMailReader- Parameters:
folderPath- the folder to return- Returns:
- the folder, if folder path is a valid path to an existing folder
- Throws:
MailReaderException- if the folder cannot be found
-
getMessageCount
Description copied from interface:MailReaderreturns the amount of message in the given folder- Specified by:
getMessageCountin interfaceMailReader- Parameters:
holdFolder- the folder to return the amount of messages for- Returns:
- the amount of message in the given folder
- Throws:
MailReaderException- if the folder cannot be accessed or the amount of messages cannot be determined
-
getMessages
Description copied from interface:MailReaderretrieves the list of messages stored in the given folder- Specified by:
getMessagesin interfaceMailReader- Parameters:
folderName- the folder to search return the emails for- Returns:
- list of messages stored in the given folder
- Throws:
MailReaderException- if the message list cannot be retrieved
-
getMessages
public List<MailMessage> getMessages(String folderName, int start, int end) throws MailReaderException Description copied from interface:MailReaderretrieves the list of messages stored in the given folder- Specified by:
getMessagesin interfaceMailReader- Parameters:
folderName- the folder to search return the emails forstart- the number of the first messageend- the number of the last message- Returns:
- list of messages stored in the given folder
- Throws:
MailReaderException- if the message list cannot be retrieved
-
getConfiguration
-