jec
Interface ExchangeConnectorInterface


public interface ExchangeConnectorInterface


Method Summary
 void accept(ExchangeEmailDTO email)
          Accept a meeting represented by an email
 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 addPublicContact(ExchangeContactDTO contact)
           
 void addTask(ExchangeTaskDTO task)
           
 void authenticate()
          check authentication (after getting a connection)
 void createOrUpdateEmail(ExchangeEmailDTO email)
           
 void deleteContact(java.lang.String uniqueIdForUrl)
           
 void deleteEmail(java.lang.String emailUniqueIdForUrl)
           
 void deleteEvent(java.lang.String uniqueIdForUrl)
           
 void deleteTask(java.lang.String uniqueIdForUrl)
           
 java.util.ArrayList getContacts()
          Gets all the contacts from a contact folder
 java.lang.String getDraftsFolderName()
          getting email drafts folder name
 java.lang.String getEmailFolderName()
          Return the Emails folder used by the connector
 java.util.ArrayList getEmails(java.util.Date sinceReceivedDate, java.util.HashSet fromEmailFilter, java.util.HashSet toEmailFilter, int maxEmailsReturned)
           
 ExchangeEventDTO getEventById(java.lang.String eventId)
           
 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, 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 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 getRootFolders()
          Getting all root folders for the account.
 java.util.ArrayList getTasks()
           
 UserAvailabilityData getUserAvailabilityData(java.util.Date startDate, java.util.Date endDate, int intervalMins, ExchangeEventAttendeeDTO attendee)
          gets the users calander 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
 ExchangeEmailDTO parseEmailDTOFromEmailMsgFile(java.lang.String fileUrl)
          Parse email saved from Outlook to the file system using this method
 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 sentEmail(java.lang.String emailURL)
           
 void setAllDayEventTimeShifter(java.lang.String GMTTimeShift)
           
 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 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 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 setSendMeetingAcceptEmail(boolean sendMeetingAcceptEmail)
          set false to not send meeting acceptance email.
 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 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 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 updateContact(ExchangeContactDTO contact)
           
 void updateEvent(ExchangeEventDTO event)
           
 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

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
check authentication (after getting a connection)

Throws:
ExchangeGeneralException
AuthenticationException
ConnectException

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.


setAllDayEventTimeShifter

void setAllDayEventTimeShifter(java.lang.String GMTTimeShift)

getEventById

ExchangeEventDTO getEventById(java.lang.String eventId)
                              throws ExchangeGeneralException
Parameters:
eventId - 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 calander 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 spesifing 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

setSendMeetingAcceptEmail

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

Parameters:
sendMeetingAcceptEmail - 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