jec
Interface ExchangeConnectorInterface


public interface ExchangeConnectorInterface


Method Summary
 void accept(ExchangeEmailDTO email)
          Accept a meeting represented by an email
 void accept(ExchangeEmailDTO email, int type)
           
 void addContact(ExchangeContactDTO contact)
           
 void addEvent(ExchangeEventDTO event)
          This method creates an event and send meeting requests to the (which is a List of ExchangeEventAttendeeTDO) in the ExchangeEventDTO
 void addEvent(ExchangeEventDTO event, int meetingRequestSenderType)
          This method creates an event and send meeting requests to the (which is a List of ExchangeEventAttendeeTDO) in the ExchangeEventDTO
 void addPublicContact(ExchangeContactDTO contact)
           
 void addTask(ExchangeTaskDTO task)
           
 void authenticate()
          check authentication (after getting a connection)
 void createFolder(java.lang.String folderUrl, int type)
          Creates a new folder on exchange server.
 void createOrUpdateEmail(ExchangeEmailDTO email)
           
 void decline(ExchangeEmailDTO email)
          decline the meeting request
 void deleteAttachment(java.lang.String attachmentURL)
          remove an attachment from draft email, in most cases, located in the drafts folder.
 void deleteContact(java.lang.String uniqueIdForUrl)
           
 void deleteEmail(java.lang.String emailUniqueIdForUrl)
           
 void deleteEvent(java.lang.String uniqueIdForUrl)
           
 void deletePermanentlyItem(java.lang.String itemURL)
          Delete an item (Email, Task, Contact, Event) permanently using its URL
 void deleteTask(java.lang.String uniqueIdForUrl)
           
 java.util.ArrayList galFind(java.lang.String params)
          GAL find command that returns contacts from the Global Address List using the params
 AttachmentDTO[] getAttachments(java.lang.String itemUrl)
          get item attachment (email, calendar event, task)
 AttachmentInfoDTO[] getAttachmentsInfo(java.lang.String itemUrl)
          Get an item (email, event, task, contact) attachments info.
 ExchangeContactDTO getContactByUid(java.lang.String uid)
          Get contact using its UID
 ExchangeContactDTO getContactByUniqueIdForURL(java.lang.String uniqueIdForURL, boolean isPublicContact)
          get a contact using its uniqueIdForUrl
 ExchangeContactDTO getContactByURL(java.lang.String url)
          Get contact using its URL
 java.util.ArrayList getContacts()
          Gets all the contacts from a contact folder
 java.util.ArrayList getContacts(java.util.Date lastModificationDate4Search)
          Get contacts that are later then lastModificationDate4Search
 java.util.ArrayList getContacts(java.util.Date lastModificationDate4Search, int startRow, int endRow, Sorter sorter)
          Get contacts that are later then lastModificationDate4Search, from startRow to endRow, using Sorter.
 java.util.ArrayList getContacts(int startRow, int endRow)
          Get contacts using range filter
 java.util.ArrayList getContacts(int startRow, int endRow, Sorter sorter)
          Get contacts from startRow to endRow, using Sorter.
 java.util.ArrayList getContacts(Sorter sorter)
          Get contacts using Sorter.
 java.util.ArrayList getContactsByUid(java.lang.String uid)
          Returns an ArrayList of ExchangeContactDTO using the uid
 java.lang.String[] getContactsUIDs()
          This method return a String Array of all contacts UIDs.
 java.util.ArrayList getContactsWithFilter(Filter filter)
          Get contacts with filter.
 java.util.ArrayList getContactsWithFilter(Filter filter, int startRow, int endRow, Sorter sorter)
          Get contacts with filter, you can also set the start row and the end row for partitioning and a Sorter.
 java.util.ArrayList getDistributionList(java.lang.String url)
          Get Distribution list using its URL
 java.lang.String getDraftsFolderName()
          getting email drafts folder name
 java.util.ArrayList getEmailByUid(java.lang.String uid)
          get an email using its uid, in most cases the size of this ArrayList is 1, in some cases an email duplication causes this emails ArrayList size to be bigger then one.
 ExchangeEmailDTO getEmailByUniqueIdForURL(java.lang.String uniqueIdForURL)
          get email using its uniqueIdForURL
 ExchangeEmailDTO getEmailByURL(java.lang.String url)
          Get Email using its URL
 java.lang.String getEmailFolderName()
          Return the Emails folder used by the connector
 java.util.ArrayList getEmails()
          Get all emails.
 java.util.ArrayList getEmails(java.util.Date sinceDate)
          get all emails from sinceDate
 java.util.ArrayList getEmails(java.util.Date sinceDate, java.util.Date tillDate, java.util.HashSet fromEmailFilter, java.util.HashSet toEmailFilter, java.lang.String subjectFilter, int startIndex, int endIndex, int maxEmailsReturned, Sorter sorter)
          returns ArrayList of ExchangeEmailDTO.
 java.util.ArrayList getEmails(java.util.Date sinceDate, java.util.Date tillDate, java.util.HashSet fromEmailFilter, java.util.HashSet toEmailFilter, java.lang.String subjectFilter, int startIndex, int endIndex, int maxEmailsReturned, Sorter sorter, java.util.Date lastModificationDate4Search)
          returns ArrayList of ExchangeEmailDTO.
 java.util.ArrayList getEmails(java.util.Date sinceDate, java.util.Date tillDate, java.util.HashSet fromEmailFilter, java.util.HashSet toEmailFilter, java.lang.String subjectFilter, java.lang.String bodyFilter, int startIndex, int endIndex, int maxEmailsReturned, Sorter sorter, java.util.Date lastModificationDate4Search)
          returns ArrayList of ExchangeEmailDTO.
 java.util.ArrayList getEmails(java.util.Date sinceDate, java.util.Date tillDate, int startIndex, int endIndex)
          get emails with range support, use the startIndex and the endIndex to bring the selected part of the emails
 java.util.ArrayList getEmails(java.util.Date sinceReceivedDate, java.util.HashSet fromEmailFilter, java.util.HashSet toEmailFilter, int maxEmailsReturned)
           
 ExchangeEventDTO getEventByUid(java.lang.String uid)
          getting the event using the event uid field
 ExchangeEventDTO getEventByUniqueIdForURL(java.lang.String eventId)
           
 ExchangeEventDTO getEventByURL(java.lang.String url)
          Get Event using its URL
 int getEventHandlerType()
          possible types:
ExchangeConstants.CALENDER_HANDLER_TYPE_REGULAR (default)
ExchangeConstants.CALENDER_HANDLER_TYPE_UPDATE_MEETING_REQ
 java.util.ArrayList getEvents(java.util.Date startDate, java.util.Date endDate)
          get all events from startDate to endDate.
 java.util.ArrayList getEvents(java.util.Date startDate, java.util.Date endDate, java.util.Date lastModificationDate4Search)
          Get events that are later then lastModificationDate4Search
 java.util.ArrayList getEvents(java.util.Date startDate, java.util.Date endDate, EventSearchCriteria eventSearchCriteria)
          get an event list according to search criteria
 java.util.ArrayList getEvents(java.util.Date startDate, java.util.Date endDate, int maxRows)
          get an event list
 java.util.ArrayList getEvents(java.util.Date startDate, java.util.Date endDate, Sorter sorter)
          Get events using Sorter
 java.util.ArrayList getEvents(java.util.Date startDate, java.util.Date endDate, Sorter sorter, java.util.Date lastModificationDate4Search)
          Get events using Sorter and lastModificationDate4Search used for sync.
 java.util.ArrayList getFolders(java.lang.String folderUrl)
           
 java.lang.String getFullTimezonStr4MeetingReq()
          this should be the String format: () /
example: (GMT+02.00) Israel/Jerusalem Standard Time
 java.util.ArrayList getPublicContacts()
           
 java.util.ArrayList getRecurrentEventsByUid(java.lang.String uid)
          Get events using the UID of one of the instances of a recurrent event will getting all recurrent event instances, occurrences, exceptions and master record.
 java.util.ArrayList getRootFolders()
          Getting all root folders for the account.
 ExchangeTaskDTO getTaskByUid(java.lang.String uid)
          get task using its UID
 ExchangeTaskDTO getTaskByUniqueIdForURL(java.lang.String taskUniqueIdForURL)
          get a task using it unique ID.
 ExchangeTaskDTO getTaskByURL(java.lang.String url)
          Get Task using its URL
 java.util.ArrayList getTasks()
           
 java.util.ArrayList getTasks(java.util.Date lastModificationDate4Search)
          Get tasks that are later then lastModificationDate4Search
 java.util.ArrayList getTasks(java.util.Date lastModificationDate4Search, int startIndex, int endIndex, Sorter sorter)
          Get tasks that are later then lastModificationDate4Search, with sorting and partitioning.
 java.util.ArrayList getTasks(Filter filter, int startIndex, int endIndex, Sorter sorter)
          get tasks using filter, sorter and partitioning
 UserAvailabilityData getUserAvailabilityData(java.util.Date startDate, java.util.Date endDate, int intervalMins, ExchangeEventAttendeeDTO attendee)
          gets the users calendar Availability Data between the startDate and the EndDate with the intervalMins, which determines sample rate.
 boolean isGetFullEmailStr()
          If True Email Handler set the full email String in the ExchangeEmailDTO
Depends on the number of emails returned, this can consume lots of memory.
 boolean isSendMeetingAcceptEmail()
          Is sending meeting acceptance email
 boolean isSmtpMeetingReqSSL()
          get meeting request SMTP secured/non secured
 java.lang.String moveItem(java.lang.String itemUrl, java.lang.String folderName)
          Move Item (email, event, task, contact) from its location (itemURL) to a folder.
 java.lang.String moveItemUsingDestinationURL(java.lang.String itemUrl, java.lang.String destinatioURL)
          Can be used to soft delete items from public folders (move to deleted items)
 ExchangeEmailDTO parseEmailDTOFromEmailMsgFile(java.lang.String fileUrl)
          Parse email saved from Outlook to the file system using this method
 void removeFromCalendar(ExchangeEmailDTO email)
          Handles a canceled meeting by activating a "remove from calendar" command.
 void sendEmail(ExchangeEmailDTO email)
          sends an email using the information in the ExchangeEmailDTO
 void sendMeetingRequest(ExchangeEventDTO exchangeEventDTO)
          Send a meetin request to the to person
 void sendMeetingRequest(ExchangeEventDTO event, int type)
          select the send type using ExchangeConstants.MEETING_REQUEST_SENDER_TYPE_SMTP
Or ExchangeConstants.MEETING_REQUEST_SENDER_TYPE_WEBDAV
 void sentEmail(java.lang.String emailURL)
           
 void setAutoOOFReply(java.lang.String autoOOFReply)
          Set the Out Of Office reply (also enables the auto reply)
 void setCalendarFolderName(java.lang.String calendarFolderName)
          In case your calendar folder name have a different name then Calendar
 void setContactsFolderName(java.lang.String contactsFolderName)
          In case your contacts folder name have a different name then Contacts
 void setDeletedFolderName(java.lang.String deletedFolderName)
          In case your Deleted folder name have a different name then Deleted Items
 void setDomain(java.lang.String domain)
           
 void setDraftsFolderName(java.lang.String draftsFolderName)
          setting email drafts folder name, this is needed is exchange is not English
 void setEmailFolderName(java.lang.String inboxFolderName)
          Setting email folder name, if not set using the default "inbox"
 void setEmailHandlerType(int emailHandlerType)
          set the Email Handler Type, for advanced use.
 void setEventHandlerType(int eventHandlerType)
          possible types:
ExchangeConstants.CALENDER_HANDLER_TYPE_REGULAR (default)
ExchangeConstants.CALENDER_HANDLER_TYPE_UPDATE_MEETING_REQ
 void setFbaPath(java.lang.String fbaPath)
          set alternate fba path, the default is: /exchweb/bin/auth/owaauth.dll
 void setForceBmoveWhenDelete(boolean forceBmoveWhenDelete)
          This flag will force move to deleted items when deleting, also when the username and the account name are different.
 void setFullTimezonStr4MeetingReq(java.lang.String fullTimezonStr4MeetingReq)
          this should be the String format: () /
example: (GMT+02.00) Israel/Jerusalem Standard Time
 void setGetFullEmailStr(boolean getFullEmailStr)
          Does the Email Handler set the full email String in the ExchangeEmailDTO
default is false.
 void setGetOnlyUnreadEmails(boolean _getOnlyUnreadEmails)
          setting this param to true will force the connector to bring only the unread email messages from exchange, the default is false
 void setOptions(java.lang.String params)
          Set the Options (Signature, autoreplay, timezone etc)
 void setPublicContactsFolderName(java.lang.String folderName)
          set the Public Contacts folder name (the default is "Public Contacts")
 void setResponseTimeWaitSec(int responseTimeWaitSec)
           
 void setResponseTimeWaitStepIntervalsMS(int responseTimeWaitStepIntervalsMS)
           
 void setSendMeetingReqs(boolean sendMeetingReqs)
          setting this to false will cause the CalendarHandler to not sent meeting requests to the Attendees in the ExchangeEventDTO (default is true)
 void setSendMeetingResponseEmail(boolean sendMeetingAcceptEmail)
          set false to not send meeting acceptance email.
 void setSignature(java.lang.String signature)
          Set the signature.
 void setSmtpMeetingReqSSL(boolean smtpMeetingReqSSL)
          set meeting request SMTP secured/non secured
 void setSMTPPort(int smtpPort)
          Set the smtp port used for sending meeting request for example.
 void setTasksFolderName(java.lang.String tasksFolderName)
          In case your Tasks folder name have a different name then Tasks
 void setTimeZoneOverride(java.lang.String timeZone)
          use the GMT+02:00 annotation
 void setUseFba(boolean useFba)
          use forms-based-authentication, curretly supported only in emailHandler
 void setUseNTLMAuthentication(boolean useNtlm)
          set to true if your exchange server supports only NTLM authentication.
 void setUserDefinedFields(java.util.ArrayList userDefinedFields)
           
 void tentative(ExchangeEmailDTO email)
          tentative the meeting request
 void updateContact(ExchangeContactDTO contact)
           
 void updateEvent(ExchangeEventDTO event)
           
 void updateEventAsRecurrent(java.lang.String eventUrl, RecurrenceDTO recurrence)
          Update an event to be a recurrent event
 void updateEventDescription(ExchangeEventDTO a_exEvent)
          Update event text description only.
 void updatePublicContact(ExchangeContactDTO contact)
           
 void updateTask(ExchangeTaskDTO task)
           
 

Method Detail

addContact

void addContact(ExchangeContactDTO contact)
                throws ExchangeGeneralException
Parameters:
contact - ExchangeContactDTO
Throws:
ExchangeGeneralException

addEvent

void addEvent(ExchangeEventDTO event)
              throws ExchangeGeneralException
This method creates an event and send meeting requests to the (which is a List of ExchangeEventAttendeeTDO) in the ExchangeEventDTO

Parameters:
event - ExchangeEventDTO
Throws:
ExchangeGeneralException

addEvent

void addEvent(ExchangeEventDTO event,
              int meetingRequestSenderType)
              throws ExchangeGeneralException
This method creates an event and send meeting requests to the (which is a List of ExchangeEventAttendeeTDO) in the ExchangeEventDTO

Parameters:
event -
meetingRequestSenderType - 0: SMTP (Default), 1: WebDav
Throws:
ExchangeGeneralException

deleteContact

void deleteContact(java.lang.String uniqueIdForUrl)
                   throws ExchangeGeneralException
Parameters:
uniqueIdForUrl - String uniqueIdForUrl is the unique identifier of the contact resource.
Throws:
ExchangeException
ExchangeGeneralException

accept

void accept(ExchangeEmailDTO email)
            throws ExchangeGeneralException
Accept a meeting represented by an email

Parameters:
email - The email whose meeting you want to accept
Throws:
ExchangeGeneralException - elih: remove for jdk1.4 compilence

deleteEvent

void deleteEvent(java.lang.String uniqueIdForUrl)
                 throws ExchangeGeneralException
Parameters:
uniqueIdForUrl - String is the unique identifier of the event resource.
Throws:
ExchangeGeneralException

getContacts

java.util.ArrayList getContacts()
                                throws ExchangeGeneralException
Gets all the contacts from a contact folder

Returns:
ArrayList of ExchangeContactDTO
Throws:
ExchangeException
ExchangeGeneralException

getEmails

java.util.ArrayList getEmails(java.util.Date sinceReceivedDate,
                              java.util.HashSet fromEmailFilter,
                              java.util.HashSet toEmailFilter,
                              int maxEmailsReturned)
                              throws ExchangeGeneralException
Parameters:
dateReceived - Date
fromEmailFilter - HashSet
example:
HashSet fromEmailAddressFilter = null;
HashSet fromEmailAddressFilter = new HashSet();
fromEmailAddressFilter.put("pupy@gmail.com");
toEmailFilter - HashMap (the same as above)
maxAtATime - int
Returns:
ArrayList
Throws:
ExchangeGeneralException

deleteEmail

void deleteEmail(java.lang.String emailUniqueIdForUrl)
                 throws ExchangeGeneralException
Parameters:
emailUniqueIdForUrl - String the email message URL postfix (the Name before the .EML)
Throws:
ExchangeGeneralException

getEvents

java.util.ArrayList getEvents(java.util.Date startDate,
                              java.util.Date endDate,
                              int maxRows)
                              throws ExchangeGeneralException
get an event list

Parameters:
startDate - Date
endDate - Date
maxRows - int
Returns:
ArrayList of ExchageEventDTO
Throws:
ExchangeException
ExchangeGeneralException

getEvents

java.util.ArrayList getEvents(java.util.Date startDate,
                              java.util.Date endDate,
                              EventSearchCriteria eventSearchCriteria)
                              throws ExchangeGeneralException
get an event list according to search criteria

Parameters:
startDate - Date
endDate - Date
maxRows - int
Returns:
ArrayList of ExchageEventDTO
Throws:
ExchangeException
ExchangeGeneralException

updateContact

void updateContact(ExchangeContactDTO contact)
                   throws ExchangeGeneralException
Parameters:
contact - ExchangeContactDTO
Throws:
ExchangeGeneralException

updateEvent

void updateEvent(ExchangeEventDTO event)
                 throws ExchangeGeneralException
Parameters:
event - ExchangeEventDTO
Throws:
ExchangeGeneralException

setResponseTimeWaitSec

void setResponseTimeWaitSec(int responseTimeWaitSec)
Parameters:
responseTimeWaitSec - int How much time to wait for exchange response (default is 20secs)

setResponseTimeWaitStepIntervalsMS

void setResponseTimeWaitStepIntervalsMS(int responseTimeWaitStepIntervalsMS)
Parameters:
responseTimeWaitStepIntervalsMS - int advanced param, recommend not to change.

setCalendarFolderName

void setCalendarFolderName(java.lang.String calendarFolderName)
In case your calendar folder name have a different name then Calendar

Parameters:
calendarFolderName -

setContactsFolderName

void setContactsFolderName(java.lang.String contactsFolderName)
In case your contacts folder name have a different name then Contacts

Parameters:
contactsFolderName -

setEmailFolderName

void setEmailFolderName(java.lang.String inboxFolderName)
Setting email folder name, if not set using the default "inbox"

Parameters:
emailFolderName -

setDeletedFolderName

void setDeletedFolderName(java.lang.String deletedFolderName)
In case your Deleted folder name have a different name then Deleted Items

Parameters:
deletedFolderName - String

setTasksFolderName

void setTasksFolderName(java.lang.String tasksFolderName)
In case your Tasks folder name have a different name then Tasks

Parameters:
tasksFolderName - String

authenticate

void authenticate()
                  throws ExchangeGeneralException,
                         AuthenticationException,
                         ConnectException,
                         HttpException
check authentication (after getting a connection)

Throws:
ExchangeGeneralException
AuthenticationException
ConnectException
HttpException

getTasks

java.util.ArrayList getTasks()
                             throws ExchangeGeneralException
Returns:
ArrayList of ExchangeTaskDTO
Throws:
ExchangeGeneralException

updateTask

void updateTask(ExchangeTaskDTO task)
                throws ExchangeGeneralException
Throws:
ExchangeGeneralException

addTask

void addTask(ExchangeTaskDTO task)
             throws ExchangeGeneralException
Parameters:
task - ExchangeTaskDTO
Throws:
ExchangeGeneralException

getPublicContacts

java.util.ArrayList getPublicContacts()
                                      throws ExchangeGeneralException
Returns:
ArrayList of ExchangeContactDTO
Throws:
ExchangeGeneralException

setPublicContactsFolderName

void setPublicContactsFolderName(java.lang.String folderName)
set the Public Contacts folder name (the default is "Public Contacts")

Parameters:
folderName - String

addPublicContact

void addPublicContact(ExchangeContactDTO contact)
                      throws ExchangeGeneralException
Parameters:
contact - ExchangeContactDTO
Throws:
ExchangeGeneralException -

make sure that the account you used to create the connector instance
have permission to do this operation.


updatePublicContact

void updatePublicContact(ExchangeContactDTO contact)
                         throws ExchangeGeneralException
Parameters:
contact - ExchangeContactDTO
Throws:
ExchangeGeneralException -

make sure that the account you used to create the connector instance
have permission to do this operation.


getEventByUniqueIdForURL

ExchangeEventDTO getEventByUniqueIdForURL(java.lang.String eventId)
                                          throws ExchangeGeneralException
Parameters:
UniqueIdForURL - String This is a URL based id.
Returns:
ExchangeEventDTO
Throws:
ExchangeGeneralException

setDomain

void setDomain(java.lang.String domain)

setUseFba

void setUseFba(boolean useFba)
use forms-based-authentication, curretly supported only in emailHandler

Parameters:
useFba - boolean

setFbaPath

void setFbaPath(java.lang.String fbaPath)
set alternate fba path, the default is: /exchweb/bin/auth/owaauth.dll

Parameters:
fbaPath - String

setGetOnlyUnreadEmails

void setGetOnlyUnreadEmails(boolean _getOnlyUnreadEmails)
setting this param to true will force the connector to bring only the unread email messages from exchange, the default is false

Parameters:
_getOnlyUnreadEmails - boolean

getUserAvailabilityData

UserAvailabilityData getUserAvailabilityData(java.util.Date startDate,
                                             java.util.Date endDate,
                                             int intervalMins,
                                             ExchangeEventAttendeeDTO attendee)
                                             throws ExchangeGeneralException
gets the users calendar Availability Data between the startDate and the EndDate with the intervalMins, which determines sample rate.

Parameters:
startDate - Date
endDate - Date
intervalMins - int
attendee - ExchangeEventAttendeeTDO
Returns:
UserAvailabilityData
Throws:
ExchangeGeneralException

sendMeetingRequest

void sendMeetingRequest(ExchangeEventDTO exchangeEventDTO)
                        throws ExchangeGeneralException
Send a meetin request to the to person

Parameters:
exchangeEventDTO - fill in the details of the meeting here
Throws:
ExchangeGeneralException

setSMTPPort

void setSMTPPort(int smtpPort)
Set the smtp port used for sending meeting request for example.

Parameters:
smtpPort - smtp port of exchange server in order to send for example meeting request.

createOrUpdateEmail

void createOrUpdateEmail(ExchangeEmailDTO email)
                         throws ExchangeGeneralException
Parameters:
email - ExchangeEmailDTO
Throws:
ExchangeGeneralException - use the setEmailFolderName for specifying the email folder.

sentEmail

void sentEmail(java.lang.String emailURL)
               throws ExchangeGeneralException
Parameters:
emailURL - String
Throws:
ExchangeGeneralException - send an email that already exist in exchange

getEmailFolderName

java.lang.String getEmailFolderName()
Return the Emails folder used by the connector

Returns:
String

sendEmail

void sendEmail(ExchangeEmailDTO email)
               throws ExchangeGeneralException
sends an email using the information in the ExchangeEmailDTO

Parameters:
email - ExchangeEmailDTO
Throws:
ExchangeGeneralException

deleteTask

void deleteTask(java.lang.String uniqueIdForUrl)
                throws ExchangeGeneralException
Parameters:
uniqueIdForUrl - String the task unique ID, this is the task name in the URL (without the EML end)
Throws:
ExchangeGeneralException

getEventHandlerType

int getEventHandlerType()
possible types:
ExchangeConstants.CALENDER_HANDLER_TYPE_REGULAR (default)
ExchangeConstants.CALENDER_HANDLER_TYPE_UPDATE_MEETING_REQ

Returns:
int

setEventHandlerType

void setEventHandlerType(int eventHandlerType)
possible types:
ExchangeConstants.CALENDER_HANDLER_TYPE_REGULAR (default)
ExchangeConstants.CALENDER_HANDLER_TYPE_UPDATE_MEETING_REQ

Parameters:
eventHandlerType - int

setSendMeetingReqs

void setSendMeetingReqs(boolean sendMeetingReqs)
setting this to false will cause the CalendarHandler to not sent meeting requests to the Attendees in the ExchangeEventDTO (default is true)

Parameters:
sendMeetingReqs - boolean

setGetFullEmailStr

void setGetFullEmailStr(boolean getFullEmailStr)
Does the Email Handler set the full email String in the ExchangeEmailDTO
default is false.

Parameters:
getFullEmailStr - boolean

isGetFullEmailStr

boolean isGetFullEmailStr()
If True Email Handler set the full email String in the ExchangeEmailDTO
Depends on the number of emails returned, this can consume lots of memory.
increase JVM Heap size if needed.

Returns:
boolean

isSendMeetingAcceptEmail

boolean isSendMeetingAcceptEmail()
Is sending meeting acceptance email

Returns:
boolean

setSendMeetingResponseEmail

void setSendMeetingResponseEmail(boolean sendMeetingAcceptEmail)
set false to not send meeting acceptance email. the default is true

Parameters:
sendMeetingResponseEmail - boolean

setFullTimezonStr4MeetingReq

void setFullTimezonStr4MeetingReq(java.lang.String fullTimezonStr4MeetingReq)
this should be the String format: () /
example: (GMT+02.00) Israel/Jerusalem Standard Time

Parameters:
fullTimezonStr4MeetingReq - String

getFullTimezonStr4MeetingReq

java.lang.String getFullTimezonStr4MeetingReq()
this should be the String format: () /
example: (GMT+02.00) Israel/Jerusalem Standard Time

Returns:
String

getDraftsFolderName

java.lang.String getDraftsFolderName()
getting email drafts folder name

Returns:
String

setDraftsFolderName

void setDraftsFolderName(java.lang.String draftsFolderName)
setting email drafts folder name, this is needed is exchange is not English

Parameters:
draftsFolderName - String

getRootFolders

java.util.ArrayList getRootFolders()
                                   throws ExchangeGeneralException
Getting all root folders for the account.

Returns:
ArrayList of FolderDTO
Throws:
ExchangeGeneralException

getFolders

java.util.ArrayList getFolders(java.lang.String folderUrl)
                               throws ExchangeGeneralException
Parameters:
folderUrl -
Returns:
ArrayList of FolderDTO
Throws:
ExchangeGeneralException

setUseNTLMAuthentication

void setUseNTLMAuthentication(boolean useNtlm)
set to true if your exchange server supports only NTLM authentication.
using NTLM can slow down the connector operations.
when using NTLM you need also to set the domain, use the method: setDomain(String domain)

Parameters:
useNtlm - boolean

setEmailHandlerType

void setEmailHandlerType(int emailHandlerType)
set the Email Handler Type, for advanced use.

Parameters:
emailHandlerType - int

setUserDefinedFields

void setUserDefinedFields(java.util.ArrayList userDefinedFields)
Parameters:
userDefinedFields - ArrayList of user defined fields names as Strings.

parseEmailDTOFromEmailMsgFile

ExchangeEmailDTO parseEmailDTOFromEmailMsgFile(java.lang.String fileUrl)
                                               throws ExchangeGeneralException
Parse email saved from Outlook to the file system using this method

Parameters:
fileUrl - URL to the email.msg file
Returns:
ExchangeEmailDTO
Throws:
ExchangeGeneralException

isSmtpMeetingReqSSL

boolean isSmtpMeetingReqSSL()
get meeting request SMTP secured/non secured

Returns:

setSmtpMeetingReqSSL

void setSmtpMeetingReqSSL(boolean smtpMeetingReqSSL)
set meeting request SMTP secured/non secured

Parameters:
smtpMeetingReqSSL -

sendMeetingRequest

void sendMeetingRequest(ExchangeEventDTO event,
                        int type)
                        throws ExchangeGeneralException
select the send type using ExchangeConstants.MEETING_REQUEST_SENDER_TYPE_SMTP
Or ExchangeConstants.MEETING_REQUEST_SENDER_TYPE_WEBDAV

Parameters:
event -
type - ExchangeConstants.MEETING_REQUEST_SENDER_TYPE_SMTP
Or ExchangeConstants.MEETING_REQUEST_SENDER_TYPE_WEBDAV
Throws:
ExchangeGeneralException

accept

void accept(ExchangeEmailDTO email,
            int type)
            throws ExchangeGeneralException
Parameters:
email -
type - ExchangeConstants.MEETING_ACCEPT_SENDER_TYPE_SMTP, ExchangeConstants.MEETING_ACCEPT_SENDER_TYPE_WEBDAV
Throws:
ExchangeGeneralException

decline

void decline(ExchangeEmailDTO email)
             throws ExchangeGeneralException
decline the meeting request

Parameters:
email -
Throws:
ExchangeGeneralException

tentative

void tentative(ExchangeEmailDTO email)
               throws ExchangeGeneralException
tentative the meeting request

Parameters:
email -
Throws:
ExchangeGeneralException

removeFromCalendar

void removeFromCalendar(ExchangeEmailDTO email)
                        throws ExchangeGeneralException
Handles a canceled meeting by activating a "remove from calendar" command.

Parameters:
email -
Throws:
ExchangeGeneralException

getEventByUid

ExchangeEventDTO getEventByUid(java.lang.String uid)
                               throws ExchangeGeneralException
getting the event using the event uid field

Parameters:
uid -
Returns:
Throws:
ExchangeGeneralException

createFolder

void createFolder(java.lang.String folderUrl,
                  int type)
                  throws ExchangeGeneralException
Creates a new folder on exchange server.

Parameters:
folderUrl -
type - FOLDER_TYPE_MAIL, FOLDER_TYPE_CALENDAR, FOLDER_TYPE_TASK
Throws:
ExchangeGeneralException

getEmails

java.util.ArrayList getEmails(java.util.Date sinceDate)
                              throws ExchangeGeneralException
get all emails from sinceDate

Parameters:
sinceDate -
Returns:
Throws:
ExchangeGeneralException

getEvents

java.util.ArrayList getEvents(java.util.Date startDate,
                              java.util.Date endDate)
                              throws ExchangeGeneralException
get all events from startDate to endDate.
exchange return error message if the time between start and end date is bigger then 2 years.

Parameters:
startDate -
endDate -
Returns:
Throws:
ExchangeGeneralException

getAttachments

AttachmentDTO[] getAttachments(java.lang.String itemUrl)
                               throws ExchangeGeneralException
get item attachment (email, calendar event, task)

Parameters:
itemUrl - to get the itemUrl use the method itemDTO.getUrl()
Returns:
Throws:
ExchangeGeneralException

getEmailByUid

java.util.ArrayList getEmailByUid(java.lang.String uid)
                                  throws ExchangeGeneralException
get an email using its uid, in most cases the size of this ArrayList is 1, in some cases an email duplication causes this emails ArrayList size to be bigger then one.

Parameters:
uid -
Returns:
ExchangeEmailDTO ArrayList
Throws:
ExchangeGeneralException

getEmails

java.util.ArrayList getEmails(java.util.Date sinceDate,
                              java.util.Date tillDate,
                              int startIndex,
                              int endIndex)
                              throws ExchangeGeneralException
get emails with range support, use the startIndex and the endIndex to bring the selected part of the emails

Parameters:
sinceDate -
tillDate -
startIndex -
endIndex -
Returns:
Throws:
ExchangeGeneralException

updateEventAsRecurrent

void updateEventAsRecurrent(java.lang.String eventUrl,
                            RecurrenceDTO recurrence)
                            throws ExchangeGeneralException
Update an event to be a recurrent event

Parameters:
eventUrl -
recurrence -
Throws:
ExchangeGeneralException

getContactByUniqueIdForURL

ExchangeContactDTO getContactByUniqueIdForURL(java.lang.String uniqueIdForURL,
                                              boolean isPublicContact)
                                              throws ExchangeGeneralException
get a contact using its uniqueIdForUrl

Parameters:
uniqueIdForURL -
isPublicContact -
Returns:
Throws:
ExchangeGeneralException

getEmails

java.util.ArrayList getEmails(java.util.Date sinceDate,
                              java.util.Date tillDate,
                              java.util.HashSet fromEmailFilter,
                              java.util.HashSet toEmailFilter,
                              java.lang.String subjectFilter,
                              int startIndex,
                              int endIndex,
                              int maxEmailsReturned,
                              Sorter sorter)
                              throws ExchangeGeneralException
returns ArrayList of ExchangeEmailDTO.

Parameters:
sinceDate -
tillDate -
fromEmailFilter - can be null, filters by from
toEmailFilter - can be null, filters by to set
subjectFilter - can be null, this filter is only for exact match
startIndex -
endIndex -
maxEmailsReturned -
sorter -
Returns:
ArrayList of ExchangeEmailDTO
Throws:
ExchangeGeneralException

getTaskByUniqueIdForURL

ExchangeTaskDTO getTaskByUniqueIdForURL(java.lang.String taskUniqueIdForURL)
                                        throws ExchangeGeneralException
get a task using it unique ID.

Parameters:
taskUniqueIdForURL - String that represent the task unique Id
Returns:
ExchangeTaskDTO
Throws:
ExchangeGeneralException

getEvents

java.util.ArrayList getEvents(java.util.Date startDate,
                              java.util.Date endDate,
                              java.util.Date lastModificationDate4Search)
                              throws ExchangeGeneralException
Get events that are later then lastModificationDate4Search

Parameters:
startDate -
endDate -
lastModificationDate4Search -
Returns:
Throws:
ExchangeGeneralException

getContacts

java.util.ArrayList getContacts(java.util.Date lastModificationDate4Search)
                                throws ExchangeGeneralException
Get contacts that are later then lastModificationDate4Search

Parameters:
lastModificationDate4Search -
Returns:
Throws:
ExchangeGeneralException

getContacts

java.util.ArrayList getContacts(int startRow,
                                int endRow)
                                throws ExchangeGeneralException
Get contacts using range filter

Parameters:
startRow -
endRow -
Returns:
Throws:
ExchangeGeneralException

getEmails

java.util.ArrayList getEmails(java.util.Date sinceDate,
                              java.util.Date tillDate,
                              java.util.HashSet fromEmailFilter,
                              java.util.HashSet toEmailFilter,
                              java.lang.String subjectFilter,
                              int startIndex,
                              int endIndex,
                              int maxEmailsReturned,
                              Sorter sorter,
                              java.util.Date lastModificationDate4Search)
                              throws ExchangeGeneralException
returns ArrayList of ExchangeEmailDTO.

Parameters:
sinceDate -
tillDate -
fromEmailFilter - can be null, filters by from
toEmailFilter - can be null, filters by to set
subjectFilter - can be null, this filter is only for exact match
startIndex -
endIndex -
maxEmailsReturned -
sorter -
lastModificationDate4Search - Get emails that are later then lastModificationDate4Search (Sync filter)
Returns:
ArrayList of ExchangeEmailDTO
Throws:
ExchangeGeneralException

getEvents

java.util.ArrayList getEvents(java.util.Date startDate,
                              java.util.Date endDate,
                              Sorter sorter,
                              java.util.Date lastModificationDate4Search)
                              throws ExchangeGeneralException
Get events using Sorter and lastModificationDate4Search used for sync.

Parameters:
startDate -
endDate -
sorter -
lastModificationDate4Search -
Returns:
Throws:
ExchangeGeneralException

getEvents

java.util.ArrayList getEvents(java.util.Date startDate,
                              java.util.Date endDate,
                              Sorter sorter)
                              throws ExchangeGeneralException
Get events using Sorter

Parameters:
startDate -
endDate -
sorter -
Returns:
Throws:
ExchangeGeneralException

getContacts

java.util.ArrayList getContacts(java.util.Date lastModificationDate4Search,
                                int startRow,
                                int endRow,
                                Sorter sorter)
                                throws ExchangeGeneralException
Get contacts that are later then lastModificationDate4Search, from startRow to endRow, using Sorter.

Parameters:
lastModificationDate4Search -
startRow -
endRow -
sorter -
Returns:
Throws:
ExchangeGeneralException

getContacts

java.util.ArrayList getContacts(Sorter sorter)
                                throws ExchangeGeneralException
Get contacts using Sorter.

Parameters:
sorter -
Returns:
Throws:
ExchangeGeneralException

getContacts

java.util.ArrayList getContacts(int startRow,
                                int endRow,
                                Sorter sorter)
                                throws ExchangeGeneralException
Get contacts from startRow to endRow, using Sorter.

Parameters:
startRow -
endRow -
sorter -
Returns:
Throws:
ExchangeGeneralException

setOptions

void setOptions(java.lang.String params)
                throws ExchangeGeneralException
Set the Options (Signature, autoreplay, timezone etc)

Parameters:
params - should be set in the following format:
Cmd=options&autoaddsignature=1&enableautosignature=on&http%3A%2F%2Fschemas.microsoft.com%2Fexchange%2Fsignaturetext=Test+User+Sig&dlsignaturemodified=1
Throws:
ExchangeGeneralException

setAutoOOFReply

void setAutoOOFReply(java.lang.String autoOOFReply)
                     throws ExchangeGeneralException
Set the Out Of Office reply (also enables the auto reply)

Parameters:
autoOOFReply -
Throws:
ExchangeGeneralException

setSignature

void setSignature(java.lang.String signature)
                  throws ExchangeGeneralException
Set the signature.

Parameters:
signature -
Throws:
ExchangeGeneralException

getDistributionList

java.util.ArrayList getDistributionList(java.lang.String url)
                                        throws ExchangeGeneralException
Get Distribution list using its URL

Parameters:
url -
Returns:
ArrayList of DistributionListMemberDTO
Throws:
ExchangeGeneralException

moveItem

java.lang.String moveItem(java.lang.String itemUrl,
                          java.lang.String folderName)
                          throws ExchangeGeneralException
Move Item (email, event, task, contact) from its location (itemURL) to a folder.

Parameters:
itemUrl - Full Item URL e.g http(s):///exchange///item.eml
folderName - folder name e.g: inbox, internal_folder/my_calender
Returns:
moved Item URL
Throws:
ExchangeGeneralException

getEmails

java.util.ArrayList getEmails()
                              throws ExchangeGeneralException
Get all emails. if the folder is not set (using the connector setFolder Method), the default is inbox.

Returns:
ArrayList of ExchangeEmailDTO
Throws:
ExchangeGeneralException

getContactsWithFilter

java.util.ArrayList getContactsWithFilter(Filter filter,
                                          int startRow,
                                          int endRow,
                                          Sorter sorter)
                                          throws ExchangeGeneralException
Get contacts with filter, you can also set the start row and the end row for partitioning and a Sorter.

Parameters:
filter -
startRow -
endRow -
sorter -
Returns:
ArrayList of ExchangeContactDTO
Throws:
ExchangeGeneralException

getContactsWithFilter

java.util.ArrayList getContactsWithFilter(Filter filter)
                                          throws ExchangeGeneralException
Get contacts with filter.

Parameters:
filter -
Returns:
ArrayList of ExchangeContactDTO
Throws:
ExchangeGeneralException

getEmailByURL

ExchangeEmailDTO getEmailByURL(java.lang.String url)
                               throws ExchangeGeneralException
Get Email using its URL

Parameters:
url -
Returns:
ExchangeEmailDTO
Throws:
ExchangeGeneralException

getEmailByUniqueIdForURL

ExchangeEmailDTO getEmailByUniqueIdForURL(java.lang.String uniqueIdForURL)
                                          throws ExchangeGeneralException
get email using its uniqueIdForURL

Parameters:
uniqueIdForURL -
Returns:
Throws:
ExchangeGeneralException

setForceBmoveWhenDelete

void setForceBmoveWhenDelete(boolean forceBmoveWhenDelete)
This flag will force move to deleted items when deleting, also when the username and the account name are different. In case the user does not have permission to the account and this flag is true, the operation will fail. The default is false.

Parameters:
forceBmoveWhenDelete -

galFind

java.util.ArrayList galFind(java.lang.String params)
                            throws ExchangeGeneralException
GAL find command that returns contacts from the Global Address List using the params

Parameters:
params - for example: "fn=test", where fn is First Name.
Returns:
Throws:
ExchangeGeneralException

getRecurrentEventsByUid

java.util.ArrayList getRecurrentEventsByUid(java.lang.String uid)
                                            throws ExchangeGeneralException
Get events using the UID of one of the instances of a recurrent event will getting all recurrent event instances, occurrences, exceptions and master record.

Parameters:
uid -
Returns:
Throws:
ExchangeGeneralException

getTasks

java.util.ArrayList getTasks(java.util.Date lastModificationDate4Search)
                             throws ExchangeGeneralException
Get tasks that are later then lastModificationDate4Search

Parameters:
lastModificationDate4Search -
Returns:
Throws:
ExchangeGeneralException

getTasks

java.util.ArrayList getTasks(Filter filter,
                             int startIndex,
                             int endIndex,
                             Sorter sorter)
                             throws ExchangeGeneralException
get tasks using filter, sorter and partitioning

Parameters:
filter -
startIndex -
endIndex -
sorter -
Returns:
Throws:
ExchangeGeneralException

getTasks

java.util.ArrayList getTasks(java.util.Date lastModificationDate4Search,
                             int startIndex,
                             int endIndex,
                             Sorter sorter)
                             throws ExchangeGeneralException
Get tasks that are later then lastModificationDate4Search, with sorting and partitioning.

Parameters:
lastModificationDate4Search -
startIndex -
endIndex -
sorter -
Returns:
Throws:
ExchangeGeneralException

getTaskByUid

ExchangeTaskDTO getTaskByUid(java.lang.String uid)
                             throws ExchangeGeneralException
get task using its UID

Parameters:
uid -
Returns:
Throws:
ExchangeGeneralException

setTimeZoneOverride

void setTimeZoneOverride(java.lang.String timeZone)
use the GMT+02:00 annotation

Parameters:
timeZone -

getContactByUid

ExchangeContactDTO getContactByUid(java.lang.String uid)
                                   throws ExchangeGeneralException
Get contact using its UID

Parameters:
uid -
Returns:
Throws:
ExchangeGeneralException

getContactByURL

ExchangeContactDTO getContactByURL(java.lang.String url)
                                   throws ExchangeGeneralException
Get contact using its URL

Parameters:
url -
Returns:
Throws:
ExchangeGeneralException

getEventByURL

ExchangeEventDTO getEventByURL(java.lang.String url)
                               throws ExchangeGeneralException
Get Event using its URL

Parameters:
url -
Returns:
Throws:
ExchangeGeneralException

getTaskByURL

ExchangeTaskDTO getTaskByURL(java.lang.String url)
                             throws ExchangeGeneralException
Get Task using its URL

Parameters:
url -
Returns:
Throws:
ExchangeGeneralException

deleteAttachment

void deleteAttachment(java.lang.String attachmentURL)
                      throws ExchangeGeneralException
remove an attachment from draft email, in most cases, located in the drafts folder. This method will work only on exchange 2003 sp1

Parameters:
attachmentURL -
Throws:
ExchangeGeneralException

getAttachmentsInfo

AttachmentInfoDTO[] getAttachmentsInfo(java.lang.String itemUrl)
                                       throws ExchangeGeneralException
Get an item (email, event, task, contact) attachments info. This method does not retrieve the attachment content.

Parameters:
itemUrl -
Returns:
Throws:
ExchangeGeneralException

deletePermanentlyItem

void deletePermanentlyItem(java.lang.String itemURL)
                           throws ExchangeGeneralException
Delete an item (Email, Task, Contact, Event) permanently using its URL

Parameters:
itemURL -
Throws:
ExchangeGeneralException

getContactsUIDs

java.lang.String[] getContactsUIDs()
                                   throws ExchangeGeneralException
This method return a String Array of all contacts UIDs. This is useful when synchronizing contacts.

Returns:
String Array of all contacts UIDs
Throws:
ExchangeGeneralException

getContactsByUid

java.util.ArrayList getContactsByUid(java.lang.String uid)
                                     throws ExchangeGeneralException
Returns an ArrayList of ExchangeContactDTO using the uid

Parameters:
uid -
Returns:
Throws:
ExchangeGeneralException

updateEventDescription

void updateEventDescription(ExchangeEventDTO a_exEvent)
                            throws ExchangeGeneralException
Update event text description only.

Parameters:
a_exEvent -
Throws:
ExchangeGeneralException

moveItemUsingDestinationURL

java.lang.String moveItemUsingDestinationURL(java.lang.String itemUrl,
                                             java.lang.String destinatioURL)
                                             throws ExchangeGeneralException
Can be used to soft delete items from public folders (move to deleted items)

Parameters:
itemUrl -
destinatioURL -
Returns:
Throws:
ExchangeGeneralException

getEmails

java.util.ArrayList getEmails(java.util.Date sinceDate,
                              java.util.Date tillDate,
                              java.util.HashSet fromEmailFilter,
                              java.util.HashSet toEmailFilter,
                              java.lang.String subjectFilter,
                              java.lang.String bodyFilter,
                              int startIndex,
                              int endIndex,
                              int maxEmailsReturned,
                              Sorter sorter,
                              java.util.Date lastModificationDate4Search)
                              throws ExchangeGeneralException
returns ArrayList of ExchangeEmailDTO.

Parameters:
sinceDate -
tillDate -
fromEmailFilter - can be null, filters by from
toEmailFilter - can be null, filters by to set
subjectFilter - can be null, this filter can also be partial is using the "jec_partial:" prefix (see getEmailsUsingSubjectFilterExample())
bodyFilter - can be null, this filter can also be partial is using the "jec_partial:" prefix (see getEmailsUsingBodyFilterExample())
startIndex -
endIndex -
maxEmailsReturned -
sorter -
lastModificationDate4Search - Get emails that are later then lastModificationDate4Search (Sync filter)
Returns:
ArrayList of ExchangeEmailDTO
Throws:
ExchangeGeneralException