Package davmail.exchange.dav
Class DavExchangeSession
java.lang.Object
davmail.exchange.ExchangeSession
davmail.exchange.dav.DavExchangeSession
Webdav Exchange adapter.
Compatible with Exchange 2003 and 2007 with webdav available.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classclassclassprotected static enumprotected static classclassprotected static classprotected static classprotected static classNested classes/interfaces inherited from class davmail.exchange.ExchangeSession
ExchangeSession.Condition, ExchangeSession.ContactPhoto, ExchangeSession.Folder, ExchangeSession.FreeBusy, ExchangeSession.Item, ExchangeSession.ItemResult, ExchangeSession.MessageList, ExchangeSession.Operator -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final longprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected static final longprotected static final longprotected static final org.apache.jackrabbit.webdav.property.DavPropertyNameSetprotected static final org.apache.jackrabbit.webdav.property.DavPropertyNameSetprotected Stringprotected StringVarious standard mail boxes UrlsCommon item propertiesprotected Stringprotected Stringprotected booleanprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected static final Stringprotected static final org.apache.jackrabbit.webdav.property.DavPropertyNameSetFields inherited from class davmail.exchange.ExchangeSession
ADDRESSBOOK, alias, ARCHIVE, CALENDAR, CONTACT_ATTRIBUTES, CONTACTS, currentMailboxPath, DISTRIBUTION_LIST_ATTRIBUTES, DRAFTS, email, FORWARD, FORWARDED_ICON, FREE_BUSY_INTERVAL, GMT_TIMEZONE, IMAP_MESSAGE_ATTRIBUTES, INBOX, JUNK, lastRcptToRecipients, lastSentMessageId, LOGGER, LOWER_CASE_INBOX, MAILBOX_BASE, mailPath, MIXED_CASE_INBOX, POP_MESSAGE_ATTRIBUTES, PUBLIC_ROOT, publicFolderUrl, REPLIED_ICON, REPLYTOALL, REPLYTOSENDER, rootPath, SENDMSG, SENT, serverVersion, SPECIAL, TASKS, TRASH, UID_MESSAGE_ATTRIBUTES, UNSENT, userName, vTimezone, YYYY_MM_DD_HH_MM_SS, YYYY_MM_DD_T_HHMMSS_Z -
Constructor Summary
ConstructorsConstructorDescriptionDavExchangeSession(HttpClientAdapter httpClientAdapter, URI uri, String userName) -
Method Summary
Modifier and TypeMethodDescriptionand(ExchangeSession.Condition... condition) And search filter.protected DavExchangeSession.ContactbuildContact(String folderPath, String itemName, Map<String, String> properties, String etag, String noneMatch) voidbuildEmail(String hostName) Determine user email through various means.protected ExchangeSession.FolderbuildFolder(org.apache.jackrabbit.webdav.MultiStatusResponse entity) protected voidbuildGalfindContact(DavExchangeSession.Contact contact, Map<String, String> response) protected voidbuildMailPath(URI uri) protected DavExchangeSession.MessagebuildMessage(org.apache.jackrabbit.webdav.MultiStatusResponse responseEntity) protected List<org.apache.jackrabbit.webdav.property.PropEntry> buildProperties(Map<String, String> properties) voidbuildSessionInfo(URI uri) protected voidvoidclose()Close session.Contains condition.protected StringconvertDateFromExchange(String exchangeDateValue) protected StringconvertDateFromExchangeToTaskDate(String exchangeDateValue) protected StringconvertPriorityFromExchange(String exchangeImportanceValue) protected StringconvertPriorityToExchange(String vTodoPriorityValue) protected StringconvertTaskDateToZulu(String value) voidcopyMessage(ExchangeSession.Message message, String targetFolder) Copy message to target folderprotected voidcopyMessage(String sourceUrl, String targetFolder) intCreate Exchange folder with given folder class.createMessage(String folderPath, String messageName, HashMap<String, String> properties, javax.mail.internet.MimeMessage mimeMessage) Create message in specified folder.voiddeleteFolder(String folderPath) Delete Exchange folder.voiddeleteItem(String folderPath, String itemName) Delete event named itemName in foldervoiddeleteMessage(ExchangeSession.Message message) Delete Exchange message.protected StringencodeAndFixUrl(String url) sometimes permanenturis inside items are wrong after an Exchange version migration need to restore base uri to actual public Exchange uriExists condition.protected voidfixClientHost(URI currentUri) formatSearchDate(Date date) Format date to exchange search format.galFind(ExchangeSession.Condition condition, Set<String> returningAttributes, int sizeLimit) Search global address listvoidgalLookup(DavExchangeSession.Contact contact) Get extended address book information for person with gallookup.Get user alias from mailbox display name over Webdav.protected byte[]getBinaryPropertyIfExists(org.apache.jackrabbit.webdav.property.DavPropertySet properties, String alias) protected StringgetCalendarEmail(String folderPath) Get email from current calendarprotected ExchangeSession.ConditiongetCalendarItemCondition(ExchangeSession.Condition dateCondition) Build base path for cmd commands (galfind, gallookup).getContactPhoto(ExchangeSession.Contact contact) Retrieve contact photo attached to contactprotected byte[]getContent(ExchangeSession.Message message) Get raw MIME message contentprotected InputStreamprotected doublegetDoublePropertyIfExists(org.apache.jackrabbit.webdav.property.DavPropertySet properties, String alias) Get user email from global address list (galfind).protected voidHttpClient4 conversion.getEventMessages(String folderPath) Search calendar messages in provided folder.protected StringgetFolderName(String url) getFolderPath(String folderPath) Convert logical or relative folder path to exchange folder path.protected StringgetFreeBusyData(String attendee, String start, String end, int interval) Get freebusy data string from Exchange.protected intgetIntPropertyIfExists(org.apache.jackrabbit.webdav.property.DavPropertySet properties, String alias) Get item named eventName in folderprotected StringgetItemProperty(String permanentUrl, String propertyName) protected longgetLongPropertyIfExists(org.apache.jackrabbit.webdav.property.DavPropertySet properties, String alias) protected StringGet current Exchange alias name from mailbox nameprotected StringExchange 2003: get mailPath from welcome pageprotected StringgetPropertyIfExists(org.apache.jackrabbit.webdav.property.DavPropertySet properties, String alias) getSubFolders(String folderPath, ExchangeSession.Condition condition, boolean recursive) Search folders under given folder matching filter.protected Stringprotected StringgetTimezoneNameFromRoamingDictionary(byte[] roamingdictionary) protected StringgetURIPropertyIfExists(org.apache.jackrabbit.webdav.property.DavPropertySet properties, String alias) protected StringgetURLPropertyIfExists(org.apache.jackrabbit.webdav.property.DavPropertySet properties, String alias) protected voidGreater than condition.Greater than or equals condition.headerIsEqualTo(String headerName, String value) MIME header equals condition.internalCreateOrUpdateEvent(String folderPath, String itemName, String contentClass, String icsBody, String etag, String noneMatch) protected ExchangeSession.FolderinternalGetFolder(String folderPath) Equals condition.Equals condition.booleanTest if the session expired.Is false condition.booleanisMainCalendar(String folderPath) Test if folderPath is main calendar.Is null condition.booleanisSharedFolder(String folderPath) Test if folderPath is inside user mailbox.Is true condition.protected voidcreate a fake event to get VTIMEZONE bodyLower than condition.Lower than or equals condition.voidmoveFolder(String folderPath, String targetPath) Move folder to target name.voidMove item from source path to target path.protected voidmoveItem(org.apache.jackrabbit.webdav.client.methods.HttpMove httpMove) voidmoveMessage(ExchangeSession.Message message, String targetFolder) Move message to target folderprotected voidmoveMessage(String sourceUrl, String targetFolder) protected voidmoveToTrash(ExchangeSession.Message message) protected booleanneedGalLookup(String searchAttributeName, Set<String> returningAttributes) not(ExchangeSession.Condition condition) Not search filter.or(ExchangeSession.Condition... condition) Or search filter.protected DateparseDateFromExchange(String exchangeDateValue) voidprocessItem(String folderPath, String itemName) Mark event processed named eventName in foldersearchContacts(String folderPath, Set<String> attributes, ExchangeSession.Condition condition, int maxCount) Search contacts in provided folder matching the search query.searchEvents(String folderPath, Set<String> attributes, ExchangeSession.Condition condition) Search calendar events or messages in provided folder matching the search query.protected org.apache.jackrabbit.webdav.MultiStatusResponse[]searchItems(String folderPath, Set<String> attributes, ExchangeSession.Condition condition, DavExchangeSession.FolderQueryTraversal folderQueryTraversal, int maxCount) searchMessages(String folderPath, Set<String> attributes, ExchangeSession.Condition condition) Search folder for messages matching conditions, with given attributes.intBuild and send the MIME message for the provided ICS event.voidsendMessage(byte[] messageBody) Send message.voidsendMessage(javax.mail.internet.MimeMessage mimeMessage) Send Mime message.startsWith(String attributeName, String value) Starts with condition.intupdateFolder(String folderPath, Map<String, String> properties) Update Exchange folder properties.voidupdateMessage(ExchangeSession.Message message, Map<String, String> properties) Update given properties on message.Methods inherited from class davmail.exchange.ExchangeSession
clearVTimezone, convertBDayToZulu, convertClassFromExchange, convertContactProperties, convertFlagsToKeywords, convertFlagToKeyword, convertItemNameToEML, convertKeywordToFlag, convertResentHeader, convertZuluDateToBday, copyMessages, createCalendarFolder, createContactFolder, createMessageFolder, createOrUpdateContact, createOrUpdateItem, decodeKeyword, encodeKeyword, getADPhoto, getAlias, getAliasFromLogin, getAllContacts, getAllEvents, getAllMessageUidAndSize, getAllRecipients, getContactPhoneField, getEmail, getExchangeDateFormat, getExchangeZuluDateFormat, getExchangeZuluDateFormatMillisecond, getFolder, getFreebusy, getPastDelayCondition, getRangeCondition, getServerVersion, getSubCalendarFolders, getSubContactFolders, getSubfolderPath, getSubFolders, getTimezoneId, getVcardBdayFormat, getVTimezone, getZuluDateFormat, moveMessages, parseDate, purgeOldestFolderMessages, purgeOldestTrashAndSentMessages, refreshFolder, searchEvents, searchEvents, searchEventsOnly, searchMessages, searchMessages, searchTasksOnly, sendMessage, supportsPeopleSearch
-
Field Details
-
WELL_KNOWN_FOLDERS
protected static final org.apache.jackrabbit.webdav.property.DavPropertyNameSet WELL_KNOWN_FOLDERS -
inboxUrl
Various standard mail boxes Urls -
deleteditemsUrl
-
sentitemsUrl
-
sendmsgUrl
-
draftsUrl
-
calendarUrl
-
tasksUrl
-
contactsUrl
-
outboxUrl
-
inboxName
-
deleteditemsName
-
sentitemsName
-
sendmsgName
-
draftsName
-
calendarName
-
tasksName
-
contactsName
-
outboxName
-
USERS
- See Also:
-
FOLDER_PROPERTIES
-
FOLDER_PROPERTIES_NAME_SET
protected static final org.apache.jackrabbit.webdav.property.DavPropertyNameSet FOLDER_PROPERTIES_NAME_SET -
ITEM_PROPERTIES
Common item properties -
EVENT_REQUEST_PROPERTIES
-
EVENT_REQUEST_PROPERTIES_NAME_SET
protected static final org.apache.jackrabbit.webdav.property.DavPropertyNameSet EVENT_REQUEST_PROPERTIES_NAME_SET -
ENCODING_PREFERENCE
protected static final long ENCODING_PREFERENCE- See Also:
-
ENCODING_MIME
protected static final long ENCODING_MIME- See Also:
-
BODY_ENCODING_TEXT_AND_HTML
protected static final long BODY_ENCODING_TEXT_AND_HTML- See Also:
-
restoreHostName
protected boolean restoreHostName -
importanceToPriorityMap
-
priorityToImportanceMap
-
-
Constructor Details
-
DavExchangeSession
public DavExchangeSession(HttpClientAdapter httpClientAdapter, URI uri, String userName) throws IOException - Throws:
IOException
-
-
Method Details
-
getEmailAndAliasFromOptions
protected void getEmailAndAliasFromOptions()HttpClient4 conversion. TODO: move up to ExchangeSession -
isExpired
Description copied from class:ExchangeSessionTest if the session expired.- Overrides:
isExpiredin classExchangeSession- Returns:
- true if this session expired
- Throws:
IOException- on transport-level network error
-
getFolderPath
Convert logical or relative folder path to exchange folder path.- Parameters:
folderPath- folder name- Returns:
- folder path
-
isMainCalendar
Test if folderPath is main calendar.- Specified by:
isMainCalendarin classExchangeSession- Parameters:
folderPath- absolute folder path- Returns:
- true if folderPath is a public or shared folder
-
getCalendarEmail
Description copied from class:ExchangeSessionGet email from current calendar- Specified by:
getCalendarEmailin classExchangeSession- Parameters:
folderPath- calendar folder path- Returns:
- calendar mailbox
- Throws:
IOException
-
getCmdBasePath
Build base path for cmd commands (galfind, gallookup).- Returns:
- cmd base path
-
galFind
- Throws:
IOException
-
galFind
public Map<String,ExchangeSession.Contact> galFind(ExchangeSession.Condition condition, Set<String> returningAttributes, int sizeLimit) throws IOException Description copied from class:ExchangeSessionSearch global address list- Specified by:
galFindin classExchangeSession- Parameters:
condition- search filterreturningAttributes- returning attributessizeLimit- size limit- Returns:
- matching contacts from gal
- Throws:
IOException- on error
-
needGalLookup
-
galLookup
Get extended address book information for person with gallookup. Does not work with Exchange 2007- Parameters:
contact- galfind contact
-
buildGalfindContact
-
getFreeBusyData
protected String getFreeBusyData(String attendee, String start, String end, int interval) throws IOException Description copied from class:ExchangeSessionGet freebusy data string from Exchange.- Specified by:
getFreeBusyDatain classExchangeSession- Parameters:
attendee- attendee email addressstart- start date in Exchange zulu formatend- end date in Exchange zulu formatinterval- freebusy interval in minutes- Returns:
- freebusy data or null
- Throws:
IOException- on error
-
buildSessionInfo
- Specified by:
buildSessionInfoin classExchangeSession- Throws:
DavMailException
-
getMailpathFromWelcomePage
Exchange 2003: get mailPath from welcome page- Parameters:
uri- current uri- Returns:
- mail path from body
-
buildMailPath
- Throws:
DavMailAuthenticationException
-
buildEmail
Determine user email through various means.- Parameters:
hostName- Exchange server host name for last failover
-
getAliasFromMailboxDisplayName
Get user alias from mailbox display name over Webdav.- Returns:
- user alias
-
getMailboxPath
Get current Exchange alias name from mailbox name- Returns:
- user name
-
getEmail
Get user email from global address list (galfind).- Parameters:
alias- user alias- Returns:
- user email
-
getURIPropertyIfExists
protected String getURIPropertyIfExists(org.apache.jackrabbit.webdav.property.DavPropertySet properties, String alias) throws IOException - Throws:
IOException
-
getFolderName
-
fixClientHost
-
checkPublicFolder
protected void checkPublicFolder() -
getWellKnownFolders
- Throws:
DavMailException
-
and
Description copied from class:ExchangeSessionAnd search filter.- Specified by:
andin classExchangeSession- Parameters:
condition- search conditions- Returns:
- condition
-
or
Description copied from class:ExchangeSessionOr search filter.- Specified by:
orin classExchangeSession- Parameters:
condition- search conditions- Returns:
- condition
-
not
Description copied from class:ExchangeSessionNot search filter.- Specified by:
notin classExchangeSession- Parameters:
condition- search condition- Returns:
- condition
-
isEqualTo
Description copied from class:ExchangeSessionEquals condition.- Specified by:
isEqualToin classExchangeSession- Parameters:
attributeName- logical Exchange attribute namevalue- attribute value- Returns:
- condition
-
isEqualTo
Description copied from class:ExchangeSessionEquals condition.- Specified by:
isEqualToin classExchangeSession- Parameters:
attributeName- logical Exchange attribute namevalue- attribute value- Returns:
- condition
-
headerIsEqualTo
Description copied from class:ExchangeSessionMIME header equals condition.- Specified by:
headerIsEqualToin classExchangeSession- Parameters:
headerName- MIME header namevalue- attribute value- Returns:
- condition
-
gte
Description copied from class:ExchangeSessionGreater than or equals condition.- Specified by:
gtein classExchangeSession- Parameters:
attributeName- logical Exchange attribute namevalue- attribute value- Returns:
- condition
-
lte
Description copied from class:ExchangeSessionLower than or equals condition.- Specified by:
ltein classExchangeSession- Parameters:
attributeName- logical Exchange attribute namevalue- attribute value- Returns:
- condition
-
lt
Description copied from class:ExchangeSessionLower than condition.- Specified by:
ltin classExchangeSession- Parameters:
attributeName- logical Exchange attribute namevalue- attribute value- Returns:
- condition
-
gt
Description copied from class:ExchangeSessionGreater than condition.- Specified by:
gtin classExchangeSession- Parameters:
attributeName- logical Exchange attribute namevalue- attribute value- Returns:
- condition
-
contains
Description copied from class:ExchangeSessionContains condition.- Specified by:
containsin classExchangeSession- Parameters:
attributeName- logical Exchange attribute namevalue- attribute value- Returns:
- condition
-
startsWith
Description copied from class:ExchangeSessionStarts with condition.- Specified by:
startsWithin classExchangeSession- Parameters:
attributeName- logical Exchange attribute namevalue- attribute value- Returns:
- condition
-
isNull
Description copied from class:ExchangeSessionIs null condition.- Specified by:
isNullin classExchangeSession- Parameters:
attributeName- logical Exchange attribute name- Returns:
- condition
-
exists
Description copied from class:ExchangeSessionExists condition.- Specified by:
existsin classExchangeSession- Parameters:
attributeName- logical Exchange attribute name- Returns:
- condition
-
isTrue
Description copied from class:ExchangeSessionIs true condition.- Specified by:
isTruein classExchangeSession- Parameters:
attributeName- logical Exchange attribute name- Returns:
- condition
-
isFalse
Description copied from class:ExchangeSessionIs false condition.- Specified by:
isFalsein classExchangeSession- Parameters:
attributeName- logical Exchange attribute name- Returns:
- condition
-
buildFolder
protected ExchangeSession.Folder buildFolder(org.apache.jackrabbit.webdav.MultiStatusResponse entity) throws IOException - Throws:
IOException
-
internalGetFolder
- Specified by:
internalGetFolderin classExchangeSession- Throws:
IOException
-
getSubFolders
public List<ExchangeSession.Folder> getSubFolders(String folderPath, ExchangeSession.Condition condition, boolean recursive) throws IOException Description copied from class:ExchangeSessionSearch folders under given folder matching filter.- Specified by:
getSubFoldersin classExchangeSession- Parameters:
folderPath- Exchange folder namecondition- search filterrecursive- deep search if true- Returns:
- list of folders
- Throws:
IOException- on error
-
createFolder
public int createFolder(String folderPath, String folderClass, Map<String, String> properties) throws IOExceptionDescription copied from class:ExchangeSessionCreate Exchange folder with given folder class.- Specified by:
createFolderin classExchangeSession- Parameters:
folderPath- logical folder namefolderClass- folder classproperties- folder properties- Returns:
- status
- Throws:
IOException- on error
-
updateFolder
Description copied from class:ExchangeSessionUpdate Exchange folder properties.- Specified by:
updateFolderin classExchangeSession- Parameters:
folderPath- logical folder nameproperties- folder properties- Returns:
- status
- Throws:
IOException- on error
-
deleteFolder
Description copied from class:ExchangeSessionDelete Exchange folder.- Specified by:
deleteFolderin classExchangeSession- Parameters:
folderPath- logical folder name- Throws:
IOException- on error
-
moveFolder
Description copied from class:ExchangeSessionMove folder to target name.- Specified by:
moveFolderin classExchangeSession- Parameters:
folderPath- current folder name/pathtargetPath- target folder name/path- Throws:
IOException- on error
-
moveItem
Description copied from class:ExchangeSessionMove item from source path to target path.- Specified by:
moveItemin classExchangeSession- Parameters:
sourcePath- item source pathtargetPath- item target path- Throws:
IOException- on error
-
moveItem
protected void moveItem(org.apache.jackrabbit.webdav.client.methods.HttpMove httpMove) throws IOException - Throws:
IOException
-
getPropertyIfExists
-
getURLPropertyIfExists
protected String getURLPropertyIfExists(org.apache.jackrabbit.webdav.property.DavPropertySet properties, String alias) throws IOException - Throws:
IOException
-
getIntPropertyIfExists
protected int getIntPropertyIfExists(org.apache.jackrabbit.webdav.property.DavPropertySet properties, String alias) -
getLongPropertyIfExists
protected long getLongPropertyIfExists(org.apache.jackrabbit.webdav.property.DavPropertySet properties, String alias) -
getDoublePropertyIfExists
protected double getDoublePropertyIfExists(org.apache.jackrabbit.webdav.property.DavPropertySet properties, String alias) -
getBinaryPropertyIfExists
protected byte[] getBinaryPropertyIfExists(org.apache.jackrabbit.webdav.property.DavPropertySet properties, String alias) -
buildMessage
protected DavExchangeSession.Message buildMessage(org.apache.jackrabbit.webdav.MultiStatusResponse responseEntity) throws IOException - Throws:
IOException
-
searchMessages
public ExchangeSession.MessageList searchMessages(String folderPath, Set<String> attributes, ExchangeSession.Condition condition) throws IOException Description copied from class:ExchangeSessionSearch folder for messages matching conditions, with given attributes.- Specified by:
searchMessagesin classExchangeSession- Parameters:
folderPath- Exchange folder nameattributes- requested Webdav attributescondition- search filter- Returns:
- message list
- Throws:
IOException- on error
-
searchContacts
public List<ExchangeSession.Contact> searchContacts(String folderPath, Set<String> attributes, ExchangeSession.Condition condition, int maxCount) throws IOException Description copied from class:ExchangeSessionSearch contacts in provided folder matching the search query.- Specified by:
searchContactsin classExchangeSession- Parameters:
folderPath- Exchange folder pathattributes- requested attributescondition- Exchange search querymaxCount- maximum item count- Returns:
- list of contacts
- Throws:
IOException- on error
-
getItemProperties
- Specified by:
getItemPropertiesin classExchangeSession
-
getEventMessages
Description copied from class:ExchangeSessionSearch calendar messages in provided folder.- Specified by:
getEventMessagesin classExchangeSession- Parameters:
folderPath- Exchange folder path- Returns:
- list of calendar messages as Event objects
- Throws:
IOException- on error
-
searchEvents
public List<ExchangeSession.Event> searchEvents(String folderPath, Set<String> attributes, ExchangeSession.Condition condition) throws IOException Description copied from class:ExchangeSessionSearch calendar events or messages in provided folder matching the search query.- Specified by:
searchEventsin classExchangeSession- Parameters:
folderPath- Exchange folder pathattributes- requested attributescondition- Exchange search query- Returns:
- list of calendar messages as Event objects
- Throws:
IOException- on error
-
getCalendarItemCondition
protected ExchangeSession.Condition getCalendarItemCondition(ExchangeSession.Condition dateCondition) - Specified by:
getCalendarItemConditionin classExchangeSession
-
searchItems
protected org.apache.jackrabbit.webdav.MultiStatusResponse[] searchItems(String folderPath, Set<String> attributes, ExchangeSession.Condition condition, DavExchangeSession.FolderQueryTraversal folderQueryTraversal, int maxCount) throws IOException - Throws:
IOException
-
getItem
Description copied from class:ExchangeSessionGet item named eventName in folder- Specified by:
getItemin classExchangeSession- Parameters:
folderPath- Exchange folder pathitemName- event name- Returns:
- event object
- Throws:
IOException- on error
-
getContactPhoto
public ExchangeSession.ContactPhoto getContactPhoto(ExchangeSession.Contact contact) throws IOException Description copied from class:ExchangeSessionRetrieve contact photo attached to contact- Specified by:
getContactPhotoin classExchangeSession- Parameters:
contact- address book contact- Returns:
- contact photo
- Throws:
IOException- on error
-
sendEvent
Description copied from class:ExchangeSessionBuild and send the MIME message for the provided ICS event.- Specified by:
sendEventin classExchangeSession- Parameters:
icsBody- event in iCalendar format- Returns:
- HTTP status
- Throws:
IOException- on error
-
deleteItem
Description copied from class:ExchangeSessionDelete event named itemName in folder- Specified by:
deleteItemin classExchangeSession- Parameters:
folderPath- Exchange folder pathitemName- item name- Throws:
IOException- on error
-
processItem
Description copied from class:ExchangeSessionMark event processed named eventName in folder- Specified by:
processItemin classExchangeSession- Parameters:
folderPath- Exchange folder pathitemName- item name- Throws:
IOException- on error
-
internalCreateOrUpdateEvent
public ExchangeSession.ItemResult internalCreateOrUpdateEvent(String folderPath, String itemName, String contentClass, String icsBody, String etag, String noneMatch) throws IOException - Specified by:
internalCreateOrUpdateEventin classExchangeSession- Throws:
IOException
-
loadVtimezone
protected void loadVtimezone()create a fake event to get VTIMEZONE body- Specified by:
loadVtimezonein classExchangeSession
-
getTimezoneIdFromExchange
-
getTimezoneNameFromRoamingDictionary
-
buildContact
protected DavExchangeSession.Contact buildContact(String folderPath, String itemName, Map<String, String> properties, String etag, String noneMatch) - Specified by:
buildContactin classExchangeSession
-
buildProperties
-
createMessage
public DavExchangeSession.Message createMessage(String folderPath, String messageName, HashMap<String, String> properties, javax.mail.internet.MimeMessage mimeMessage) throws IOExceptionCreate message in specified folder. Will overwrite an existing message with same messageName in the same folder- Specified by:
createMessagein classExchangeSession- Parameters:
folderPath- Exchange folder pathmessageName- message nameproperties- message properties (flags)mimeMessage- MIME message- Throws:
IOException- when unable to create message
-
updateMessage
public void updateMessage(ExchangeSession.Message message, Map<String, String> properties) throws IOExceptionDescription copied from class:ExchangeSessionUpdate given properties on message.- Specified by:
updateMessagein classExchangeSession- Parameters:
message- Exchange messageproperties- Webdav properties map- Throws:
IOException- on error
-
deleteMessage
Description copied from class:ExchangeSessionDelete Exchange message.- Specified by:
deleteMessagein classExchangeSession- Parameters:
message- Exchange message- Throws:
IOException- on error
-
sendMessage
Send message.- Parameters:
messageBody- MIME message body- Throws:
IOException- on error
-
sendMessage
Description copied from class:ExchangeSessionSend Mime message.- Specified by:
sendMessagein classExchangeSession- Parameters:
mimeMessage- MIME message- Throws:
IOException- on error
-
getContent
Description copied from class:ExchangeSessionGet raw MIME message content- Specified by:
getContentin classExchangeSession- Parameters:
message- Exchange message- Returns:
- message body
- Throws:
IOException- on error
-
encodeAndFixUrl
sometimes permanenturis inside items are wrong after an Exchange version migration need to restore base uri to actual public Exchange uri- Parameters:
url- input uri- Returns:
- fixed uri
- Throws:
IOException- on error
-
getContentInputStream
- Throws:
IOException
-
moveMessage
Description copied from class:ExchangeSessionMove message to target folder- Specified by:
moveMessagein classExchangeSession- Parameters:
message- Exchange messagetargetFolder- target folder- Throws:
IOException- on error
-
moveMessage
- Throws:
IOException
-
copyMessage
Description copied from class:ExchangeSessionCopy message to target folder- Specified by:
copyMessagein classExchangeSession- Parameters:
message- Exchange messagetargetFolder- target folder- Throws:
IOException- on error
-
copyMessage
- Throws:
IOException
-
moveToTrash
- Specified by:
moveToTrashin classExchangeSession- Throws:
IOException
-
getItemProperty
protected String getItemProperty(String permanentUrl, String propertyName) throws IOException, org.apache.jackrabbit.webdav.DavException - Throws:
IOExceptionorg.apache.jackrabbit.webdav.DavException
-
convertDateFromExchange
- Throws:
DavMailException
-
convertPriorityFromExchange
- Overrides:
convertPriorityFromExchangein classExchangeSession
-
convertPriorityToExchange
- Overrides:
convertPriorityToExchangein classExchangeSession
-
close
public void close()Description copied from class:ExchangeSessionClose session. Shutdown http client connection manager- Specified by:
closein classExchangeSession
-
formatSearchDate
Format date to exchange search format.- Specified by:
formatSearchDatein classExchangeSession- Parameters:
date- date object- Returns:
- formatted search date
-
convertTaskDateToZulu
-
convertDateFromExchangeToTaskDate
protected String convertDateFromExchangeToTaskDate(String exchangeDateValue) throws DavMailException - Throws:
DavMailException
-
parseDateFromExchange
- Throws:
DavMailException
-