public abstract class ExchangeClientBase extends Object implements IExchangeClientBase
Provides the abstract base class to MS Exchange Server access.
Constructor and Description |
---|
ExchangeClientBase() |
Modifier and Type | Method and Description |
---|---|
abstract String |
appendMessage(String folder,
MailMessage message)
Uploads the mail message to the specified folder
|
abstract String |
appendMessage(String folder,
MailMessage message,
boolean markAsSent)
Uploads the mail message to the specified folder
|
void |
backup(ExchangeFolderInfoCollection folders,
OutputStream stream,
int options)
Backups the content of the specified folders
|
abstract void |
backup(ExchangeFolderInfoCollection folders,
String fileName,
int options)
Backups the content of the specified folders
|
abstract String |
createContact(MapiContact contact)
Creates a contact item in the Exchange store.
|
abstract ExchangeFolderInfo |
createFolder(String parentFolderUri,
String name)
Creates the new folder with the specified name in the specified parent folder.
|
abstract void |
deleteContact(MapiContact contact)
Deletes the contact.
|
abstract void |
deleteContact(String id)
Deletes the contact.
|
abstract void |
deleteFolder(String folderUri)
Deletes the folder
|
abstract void |
deleteMessage(String messageUri)
Deletes the mail message.
|
void |
dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
protected void |
dispose(boolean disposing)
Releases unmanaged and - optionally - managed resources
|
abstract Attachment |
fetchAttachment(String attachmentUri)
Fetches the attachment
|
abstract MailMessage |
fetchMessage(String messageUri)
Fetches the message.
|
boolean |
folderExists(String parentFolderUri,
String folderName)
Checks whether the specified folder exists.
|
abstract boolean |
folderExists(String parentFolderUri,
String folderName,
ExchangeFolderInfo[] folder)
Checks whether the specified folder exists.
|
abstract com.aspose.ms.System.Net.ICredentials |
getCredentials()
Gets or sets the credentials.
|
abstract ExchangeMailboxInfo |
getMailboxInfo()
Gets the mailbox info.
|
abstract ExchangeMailboxInfo |
getMailboxInfo(String mailbox)
Gets the mailbox information
|
abstract long |
getMailboxSize()
Gets the size of the mailbox.
|
abstract long |
getMailboxSize(String mailbox)
Gets the size of the mailbox
|
abstract String |
getMailboxUri()
Gets or sets the mailbox uri.
|
abstract com.aspose.ms.System.Net.WebProxy |
getProxy()
Gets or sets the proxy.
|
abstract int |
getTimeout()
Gets or sets the number of milliseconds to wait before the operation times out.
|
abstract String |
getVersionInfo()
Returns exchange server version info
|
abstract MapiContact[] |
listContacts(String folderUri)
Lists contacts located in the specified folder on server
|
abstract MapiContactCollection |
listMailboxes()
Lists mailboxes.
|
ExchangeMessageInfoCollection |
listMessages(String folder)
Lists the messages.
|
abstract ExchangeMessageInfoCollection |
listMessages(String folder,
int maxNumberOfMessages,
int options)
Lists the messages.
|
ExchangeMessageInfoCollection |
listMessagesByMaxNumberOfMessages(String folder,
int maxNumberOfMessages)
Lists the messages.
|
abstract ExchangeMessageInfoCollection |
listMessagesByOption(String folder,
int options)
Lists the messages.
|
abstract ExchangeFolderInfoCollection |
listPublicFolders()
Gets collection of public folders from root public folder
|
ExchangeFolderInfoCollection |
listSubFolders(ExchangeFolderInfo parentFolder)
Gets collection of child public folders from parent
|
abstract ExchangeFolderInfoCollection |
listSubFolders(String parentFolderUri)
Gets collection of child folders from parent
|
abstract MapiContactCollection |
resolveContact(String unresolvedEntry)
Resolves ambiguous mailbox names.
|
void |
restore(InputStream stream,
ExchangeFolderInfoCollection folders,
int options)
Restores the specified exchange folders from the given personal storage.
|
void |
restore(InputStream stream,
int options)
Restores exchange folders from the given personal storage.
|
abstract void |
restore(PersonalStorage pst,
ExchangeFolderInfoCollection folders,
int options)
Restores the specified exchange folders from the given personal storage.
|
abstract void |
restore(PersonalStorage pst,
int options)
Restores exchange folders from the given personal storage.
|
abstract void |
restore(String fileName,
ExchangeFolderInfoCollection folders,
int options)
Restores the specified exchange folders from the specified personal storage file.
|
abstract void |
restore(String fileName,
int options)
Restores exchange folders from the specified personal storage file.
|
void |
saveMessage(String messageUri,
OutputStream stream)
Saves the message.
|
abstract void |
saveMessage(String messageUri,
String path)
Saves the message.
|
abstract void |
send(MailMessage message)
Sends the specified message.
|
abstract void |
setCredentials(com.aspose.ms.System.Net.ICredentials value)
Gets or sets the credentials.
|
abstract void |
setMailboxUri(String value)
Gets or sets the mailbox uri.
|
abstract void |
setProxy(com.aspose.ms.System.Net.WebProxy value)
Gets or sets the proxy.
|
abstract void |
setReadFlag(String messageUri)
Sets the read flag.
|
abstract void |
setTimeout(int value)
Gets or sets the number of milliseconds to wait before the operation times out.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
backupInternal, restoreInternal, restoreInternal, saveMessageInternal
public abstract com.aspose.ms.System.Net.WebProxy getProxy()
Gets or sets the proxy.
getProxy
in interface IExchangeClientBase
WebProxy
object.public abstract void setProxy(com.aspose.ms.System.Net.WebProxy value)
Gets or sets the proxy.
setProxy
in interface IExchangeClientBase
public abstract int getTimeout()
Gets or sets the number of milliseconds to wait before the operation times out. The default value is 100,000 milliseconds (100 seconds).
getTimeout
in interface IExchangeClientBase
public abstract void setTimeout(int value)
Gets or sets the number of milliseconds to wait before the operation times out. The default value is 100,000 milliseconds (100 seconds).
setTimeout
in interface IExchangeClientBase
public abstract com.aspose.ms.System.Net.ICredentials getCredentials()
Gets or sets the credentials.
getCredentials
in interface IExchangeClientBase
ICredentials
object.public abstract void setCredentials(com.aspose.ms.System.Net.ICredentials value)
Gets or sets the credentials.
setCredentials
in interface IExchangeClientBase
public abstract String getMailboxUri()
Gets or sets the mailbox uri.
getMailboxUri
in interface IExchangeClientBase
String
object.public abstract void setMailboxUri(String value)
Gets or sets the mailbox uri.
setMailboxUri
in interface IExchangeClientBase
public abstract ExchangeMailboxInfo getMailboxInfo()
Gets the mailbox info.
Value: The mailbox info.getMailboxInfo
in interface IExchangeClientBase
ExchangeMailboxInfo
object.public abstract long getMailboxSize()
Gets the size of the mailbox.
getMailboxSize
in interface IExchangeClientBase
public abstract long getMailboxSize(String mailbox)
Gets the size of the mailbox
getMailboxSize
in interface IExchangeClientBase
mailbox
- A mailbox.public abstract ExchangeMailboxInfo getMailboxInfo(String mailbox)
Gets the mailbox information
getMailboxInfo
in interface IExchangeClientBase
mailbox
- A mailbox to read from.ExchangeMailboxInfo
that represents mailbox informationpublic ExchangeMessageInfoCollection listMessages(String folder)
Lists the messages.
listMessages
in interface IExchangeClientBase
folder
- The folder.ExchangeMessageInfoCollection
public abstract ExchangeMessageInfoCollection listMessagesByOption(String folder, int options)
Lists the messages.
listMessagesByOption
in interface IExchangeClientBase
folder
- The folder.options
- Specifies the settings of listingExchangeMessageInfoCollection
public ExchangeMessageInfoCollection listMessagesByMaxNumberOfMessages(String folder, int maxNumberOfMessages)
Lists the messages.
listMessagesByMaxNumberOfMessages
in interface IExchangeClientBase
folder
- The folder.maxNumberOfMessages
- Maximum number of messagesExchangeMessageInfoCollection
public abstract ExchangeMessageInfoCollection listMessages(String folder, int maxNumberOfMessages, int options)
Lists the messages.
listMessages
in interface IExchangeClientBase
folder
- The folder.maxNumberOfMessages
- Maximum number of messagesoptions
- Specifies the settings of listingExchangeMessageInfoCollection
public abstract void saveMessage(String messageUri, String path)
Saves the message.
saveMessage
in interface IExchangeClientBase
messageUri
- The message URI.path
- The path to save message.public void saveMessage(String messageUri, OutputStream stream)
Saves the message.
saveMessage
in interface IExchangeClientBase
messageUri
- The message URI.stream
- The stream.public abstract void send(MailMessage message)
Sends the specified message.
send
in interface IExchangeClientBase
message
- The message.public abstract void setReadFlag(String messageUri)
Sets the read flag.
setReadFlag
in interface IExchangeClientBase
messageUri
- The message URI.public abstract MailMessage fetchMessage(String messageUri)
Fetches the message.
fetchMessage
in interface IExchangeClientBase
messageUri
- The message URI.public abstract void deleteMessage(String messageUri)
Deletes the mail message.
deleteMessage
in interface IExchangeClientBase
messageUri
- The message uri.public abstract void deleteContact(MapiContact contact)
Deletes the contact.
deleteContact
in interface IExchangeClientBase
contact
- Contact for deletingpublic abstract void deleteContact(String id)
Deletes the contact.
deleteContact
in interface IExchangeClientBase
id
- The contact identifier.public void dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
dispose
in interface com.aspose.ms.System.IDisposable
public abstract MapiContact[] listContacts(String folderUri)
Lists contacts located in the specified folder on server
listContacts
in interface IExchangeClientBase
folderUri
- The URI of folderMapiContact
that represents contact informationpublic abstract ExchangeFolderInfoCollection listPublicFolders()
Gets collection of public folders from root public folder
listPublicFolders
in interface IExchangeClientBase
ExchangeFolderInfoCollection
that contains subfolders from the root public folderpublic abstract ExchangeFolderInfoCollection listSubFolders(String parentFolderUri)
Gets collection of child folders from parent
listSubFolders
in interface IExchangeClientBase
parentFolderUri
- The uri of the parent folderExchangeFolderInfoCollection
that contains subfolders from the parent folderpublic ExchangeFolderInfoCollection listSubFolders(ExchangeFolderInfo parentFolder)
Gets collection of child public folders from parent
listSubFolders
in interface IExchangeClientBase
parentFolder
- The parent ExchangeFolderInfo
ExchangeFolderInfoCollection
that contains subfolders from the parent folderpublic abstract String appendMessage(String folder, MailMessage message)
Uploads the mail message to the specified folder
appendMessage
in interface IExchangeClientBase
folder
- A folder to which message is uploadedmessage
- A message to uploadpublic abstract String appendMessage(String folder, MailMessage message, boolean markAsSent)
Uploads the mail message to the specified folder
appendMessage
in interface IExchangeClientBase
folder
- An uri of folder to which message is uploadedmessage
- A message to uploadmarkAsSent
- A value indicating whether the message should be appended as a sent message or a draft.public abstract Attachment fetchAttachment(String attachmentUri)
Fetches the attachment
fetchAttachment
in interface IExchangeClientBase
attachmentUri
- The attachment uriAttachment
that represents fetched attachmentpublic abstract ExchangeFolderInfo createFolder(String parentFolderUri, String name)
Creates the new folder with the specified name in the specified parent folder.
createFolder
in interface IExchangeClientBase
parentFolderUri
- An uri of parent folder.name
- A name of folder to be created.ArgumentException
- parentFolderUri
or name
is null
or empty
.public abstract void deleteFolder(String folderUri)
Deletes the folder
deleteFolder
in interface IExchangeClientBase
folderUri
- The folder Uripublic boolean folderExists(String parentFolderUri, String folderName)
Checks whether the specified folder exists.
folderExists
in interface IExchangeClientBase
parentFolderUri
- An uri of parent folder.folderName
- A folder name.true
if the specified folder exists in the specified parent folder; otherwise, false
.ArgumentException
- parentFolderUri
or folderName
is null
or empty
public abstract boolean folderExists(String parentFolderUri, String folderName, ExchangeFolderInfo[] folder)
Checks whether the specified folder exists.
folderExists
in interface IExchangeClientBase
parentFolderUri
- An uri of parent folder.folderName
- A folder name.folder
- A ExchangeFolderInfo
that represents the found folder information, if folder exists.true
if the specified folder exists in the specified parent folder; otherwise, false
.public abstract void backup(ExchangeFolderInfoCollection folders, String fileName, int options)
Backups the content of the specified folders
backup
in interface IExchangeClientBase
folders
- A folders to backupfileName
- A path to the presonal storage fileoptions
- A backup optionspublic void backup(ExchangeFolderInfoCollection folders, OutputStream stream, int options)
Backups the content of the specified folders
backup
in interface IExchangeClientBase
folders
- A folders to backupstream
- A stream to write intooptions
- A backup optionspublic abstract void restore(String fileName, int options)
Restores exchange folders from the specified personal storage file.
restore
in interface IExchangeClientBase
fileName
- A path to personal storage file.options
- Restore options.public void restore(InputStream stream, int options)
Restores exchange folders from the given personal storage.
restore
in interface IExchangeClientBase
stream
- A stream containing personal storage.options
- Restore options.public abstract void restore(PersonalStorage pst, int options)
Restores exchange folders from the given personal storage.
restore
in interface IExchangeClientBase
pst
- A personal storage containing the backuped imap folders.options
- Restore options.public abstract void restore(String fileName, ExchangeFolderInfoCollection folders, int options)
Restores the specified exchange folders from the specified personal storage file.
restore
in interface IExchangeClientBase
fileName
- A path to personal storage file.folders
- A folders to be restored.options
- Restore options.public void restore(InputStream stream, ExchangeFolderInfoCollection folders, int options)
Restores the specified exchange folders from the given personal storage.
restore
in interface IExchangeClientBase
stream
- A stream containing personal storage.folders
- A folders to be restored.options
- Restore options.public abstract void restore(PersonalStorage pst, ExchangeFolderInfoCollection folders, int options)
Restores the specified exchange folders from the given personal storage.
restore
in interface IExchangeClientBase
pst
- A personal storage containing the backuped exchange folders.folders
- A folders to be restored.options
- Restore options.public abstract MapiContactCollection listMailboxes()
Lists mailboxes.
listMailboxes
in interface IExchangeClientBase
MapiContactCollection
that represents contact information.public abstract MapiContactCollection resolveContact(String unresolvedEntry)
Resolves ambiguous mailbox names.
resolveContact
in interface IExchangeClientBase
unresolvedEntry
- A name of contact to resolve.MapiContactCollection
that represents contacts information.public abstract String createContact(MapiContact contact)
Creates a contact item in the Exchange store.
createContact
in interface IExchangeClientBase
contact
- Contact itempublic abstract String getVersionInfo()
Returns exchange server version info
getVersionInfo
in interface IExchangeClientBase
protected void dispose(boolean disposing)
Releases unmanaged and - optionally - managed resources
disposing
- true
to release both managed and unmanaged resources; false
to release only unmanaged resources.Copyright (c) 2008-2016 Aspose Pty Ltd. All Rights Reserved.