public abstract class ExchangeSession extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ExchangeSession.AttributeCondition
Attribute condition.
|
static interface |
ExchangeSession.Condition
Exchange search filter.
|
class |
ExchangeSession.Contact
Contact object
|
static class |
ExchangeSession.ContactPhoto
Contact picture
|
class |
ExchangeSession.Event
Calendar event object.
|
class |
ExchangeSession.Folder
Exchange folder with IMAP properties
|
static class |
ExchangeSession.FreeBusy
Exchange to iCalendar Free/Busy parser.
|
static class |
ExchangeSession.Item
Generic folder item.
|
static class |
ExchangeSession.ItemResult
Event result object to hold HTTP status and event etag from an event creation/update.
|
class |
ExchangeSession.Message
Exchange message.
|
static class |
ExchangeSession.MessageList
Message list, includes a single messsage cache
|
static class |
ExchangeSession.MonoCondition
Single search filter condition.
|
static class |
ExchangeSession.MultiCondition
Multiple condition.
|
static class |
ExchangeSession.NotCondition
Not condition.
|
static class |
ExchangeSession.Operator |
Modifier and Type | Field and Description |
---|---|
protected static String |
ADDRESSBOOK |
protected String |
alias |
protected static String |
CALENDAR |
static Set<String> |
CONTACT_ATTRIBUTES
Full Contact attribute list
|
static String |
CONTACTS
Contacts folder logical name
|
protected String |
currentMailboxPath
Lower case Caldav path to current user mailbox.
|
protected static Set<String> |
DISTRIBUTION_LIST_ATTRIBUTES |
protected static String |
DRAFTS |
protected String |
email |
protected static int |
FREE_BUSY_INTERVAL |
static SimpleTimeZone |
GMT_TIMEZONE
Reference GMT timezone to format dates
|
protected static Set<String> |
IMAP_MESSAGE_ATTRIBUTES |
protected static String |
INBOX |
protected static String |
JUNK |
protected String |
lastSentMessageId |
protected static org.apache.log4j.Logger |
LOGGER |
protected static String |
LOWER_CASE_INBOX |
protected static String |
MAILBOX_BASE |
protected String |
mailPath
Base user mailboxes path (used to select folder)
|
protected static String |
MIXED_CASE_INBOX |
protected static Set<String> |
POP_MESSAGE_ATTRIBUTES |
protected static String |
PUBLIC_ROOT |
protected String |
publicFolderUrl |
protected String |
rootPath |
protected static String |
SENDMSG |
protected static String |
SENT |
protected String |
serverVersion |
protected static List<String> |
SPECIAL |
protected static String |
TASKS |
protected static String |
TRASH |
protected static Set<String> |
UID_MESSAGE_ATTRIBUTES |
protected static String |
UNSENT |
protected String |
userName |
protected VObject |
vTimezone |
protected static String |
YYYY_MM_DD_HH_MM_SS |
protected static String |
YYYY_MM_DD_T_HHMMSS_Z |
Constructor and Description |
---|
ExchangeSession() |
Modifier and Type | Method and Description |
---|---|
abstract ExchangeSession.MultiCondition |
and(ExchangeSession.Condition... condition)
And search filter.
|
protected abstract ExchangeSession.Contact |
buildContact(String folderPath,
String itemName,
Map<String,String> properties,
String etag,
String noneMatch) |
protected abstract void |
buildSessionInfo(URI uri) |
abstract void |
close()
Close session.
|
abstract ExchangeSession.Condition |
contains(String attributeName,
String value)
Contains condition.
|
protected String |
convertBDayToZulu(String value) |
protected void |
convertContactProperties(Map<String,String> properties,
String[] contactProperties,
List<String> values) |
String |
convertFlagsToKeywords(HashSet<String> flags)
Convert IMAP flags to keyword value.
|
String |
convertFlagToKeyword(String value)
Convert IMAP flag to keyword value.
|
protected String |
convertItemNameToEML(String itemName)
convert vcf extension to EML.
|
String |
convertKeywordToFlag(String value)
Convert keyword value to IMAP flag.
|
protected void |
convertResentHeader(javax.mail.internet.MimeMessage mimeMessage,
String headerName) |
protected String |
convertZuluDateToBday(String value) |
abstract void |
copyMessage(ExchangeSession.Message message,
String targetFolder)
Copy message to target folder
|
void |
copyMessages(List<ExchangeSession.Message> messages,
String targetFolder) |
int |
createCalendarFolder(String folderName,
Map<String,String> properties)
Create Exchange calendar folder.
|
void |
createContactFolder(String folderName,
Map<String,String> properties)
Create Exchange contact folder.
|
abstract int |
createFolder(String folderName,
String folderClass,
Map<String,String> properties)
Create Exchange folder with given folder class.
|
abstract ExchangeSession.Message |
createMessage(String folderPath,
String messageName,
HashMap<String,String> properties,
javax.mail.internet.MimeMessage mimeMessage)
Create message in specified folder.
|
void |
createMessageFolder(String folderName)
Create Exchange message folder.
|
protected ExchangeSession.ItemResult |
createOrUpdateContact(String folderPath,
String itemName,
String itemBody,
String etag,
String noneMatch) |
ExchangeSession.ItemResult |
createOrUpdateItem(String folderPath,
String itemName,
String itemBody,
String etag,
String noneMatch)
Create or update item (event or contact) on the Exchange server
|
protected String |
decodeKeyword(String keyword) |
abstract void |
deleteFolder(String folderName)
Delete Exchange folder.
|
abstract void |
deleteItem(String folderPath,
String itemName)
Delete event named itemName in folder
|
abstract void |
deleteMessage(ExchangeSession.Message message)
Delete Exchange message.
|
protected String |
encodeKeyword(String keyword) |
abstract ExchangeSession.Condition |
exists(String attributeName)
Exists condition.
|
abstract String |
formatSearchDate(Date date)
Format date to exchange search format.
|
abstract Map<String,ExchangeSession.Contact> |
galFind(ExchangeSession.Condition condition,
Set<String> returningAttributes,
int sizeLimit)
Search global address list
|
ExchangeSession.ContactPhoto |
getADPhoto(String email)
Retrieve contact photo from AD
|
String |
getAlias()
Get current user alias
|
String |
getAliasFromLogin()
Get current Exchange alias name from login name
|
List<ExchangeSession.Contact> |
getAllContacts(String folderPath,
boolean includeDistList)
Search contacts in provided folder.
|
List<ExchangeSession.Event> |
getAllEvents(String folderPath)
Search calendar events in provided folder.
|
ExchangeSession.MessageList |
getAllMessageUidAndSize(String folderName)
Return folder message list with id and size only (for POP3 listener).
|
protected List<javax.mail.internet.InternetAddress> |
getAllRecipients(javax.mail.internet.MimeMessage mimeMessage) |
protected abstract ExchangeSession.Condition |
getCalendarItemCondition(ExchangeSession.Condition dateCondition) |
abstract ExchangeSession.ContactPhoto |
getContactPhoto(ExchangeSession.Contact contact)
Retrieve contact photo attached to contact
|
protected abstract byte[] |
getContent(ExchangeSession.Message message)
Get raw MIME message content
|
String |
getEmail()
Get current user email
|
abstract List<ExchangeSession.Event> |
getEventMessages(String folderPath)
Search calendar messages in provided folder.
|
protected static SimpleDateFormat |
getExchangeDateFormat(String value) |
protected static SimpleDateFormat |
getExchangeZuluDateFormat() |
protected static SimpleDateFormat |
getExchangeZuluDateFormatMillisecond() |
ExchangeSession.Folder |
getFolder(String folderPath)
Get folder object.
|
ExchangeSession.FreeBusy |
getFreebusy(String attendee,
String startDateValue,
String endDateValue)
Get freebusy info for attendee between start and end date.
|
protected abstract String |
getFreeBusyData(String attendee,
String start,
String end,
int interval)
Get freebusy data string from Exchange.
|
abstract ExchangeSession.Item |
getItem(String folderPath,
String itemName)
Get item named eventName in folder
|
protected abstract Set<String> |
getItemProperties() |
protected ExchangeSession.Condition |
getPastDelayCondition(String attribute) |
protected ExchangeSession.Condition |
getRangeCondition(String timeRangeStart,
String timeRangeEnd) |
String |
getServerVersion()
Get server version (Exchange2003, Exchange2007 or Exchange2010)
|
List<ExchangeSession.Folder> |
getSubCalendarFolders(String folderName,
boolean recursive)
Search calendar folders under given folder.
|
List<ExchangeSession.Folder> |
getSubFolders(String folderName,
boolean recursive,
boolean wildcard)
Search mail and generic folders under given folder.
|
abstract List<ExchangeSession.Folder> |
getSubFolders(String folderName,
ExchangeSession.Condition condition,
boolean recursive)
Search folders under given folder matching filter.
|
protected static SimpleDateFormat |
getVcardBdayFormat() |
VObject |
getVTimezone()
Load and return current user OWA timezone.
|
static SimpleDateFormat |
getZuluDateFormat()
Return standard zulu date formatter.
|
abstract ExchangeSession.Condition |
gt(String attributeName,
String value)
Greater than condition.
|
abstract ExchangeSession.Condition |
gte(String attributeName,
String value)
Greater than or equals condition.
|
abstract ExchangeSession.Condition |
headerIsEqualTo(String headerName,
String value)
MIME header equals condition.
|
protected abstract ExchangeSession.ItemResult |
internalCreateOrUpdateEvent(String folderPath,
String itemName,
String contentClass,
String icsBody,
String etag,
String noneMatch) |
protected abstract ExchangeSession.Folder |
internalGetFolder(String folderName) |
abstract ExchangeSession.Condition |
isEqualTo(String attributeName,
int value)
Equals condition.
|
abstract ExchangeSession.Condition |
isEqualTo(String attributeName,
String value)
Equals condition.
|
boolean |
isExpired()
Test if the session expired.
|
abstract ExchangeSession.Condition |
isFalse(String attributeName)
Is false condition.
|
abstract boolean |
isMainCalendar(String folderPath)
Test if folderPath is main calendar.
|
abstract ExchangeSession.Condition |
isNull(String attributeName)
Is null condition.
|
abstract boolean |
isSharedFolder(String folderPath)
Test if folderPath is inside user mailbox.
|
abstract ExchangeSession.Condition |
isTrue(String attributeName)
Is true condition.
|
protected abstract void |
loadVtimezone() |
abstract ExchangeSession.Condition |
lt(String attributeName,
String value)
Lower than condition.
|
abstract ExchangeSession.Condition |
lte(String attributeName,
String value)
Lower than or equals condition.
|
abstract void |
moveFolder(String folderName,
String targetName)
Move folder to target name.
|
abstract void |
moveItem(String sourcePath,
String targetPath)
Move item from source path to target path.
|
abstract void |
moveMessage(ExchangeSession.Message message,
String targetFolder)
Move message to target folder
|
void |
moveMessages(List<ExchangeSession.Message> messages,
String targetFolder) |
protected abstract void |
moveToTrash(ExchangeSession.Message message) |
abstract ExchangeSession.Condition |
not(ExchangeSession.Condition condition)
Not search filter.
|
abstract ExchangeSession.MultiCondition |
or(ExchangeSession.Condition... condition)
Or search filter.
|
protected static Date |
parseDate(String dateString) |
abstract void |
processItem(String folderPath,
String itemName)
Mark event processed named eventName in folder
|
protected void |
purgeOldestFolderMessages(String folderPath,
int keepDelay) |
void |
purgeOldestTrashAndSentMessages()
Delete oldest messages in trash.
|
boolean |
refreshFolder(ExchangeSession.Folder currentFolder)
Check folder ctag and reload messages as needed.
|
protected String |
replaceIcal4Principal(String value)
Replace iCal4 (Snow Leopard) principal paths with mailto expression
|
abstract List<ExchangeSession.Contact> |
searchContacts(String folderPath,
Set<String> attributes,
ExchangeSession.Condition condition,
int maxCount)
Search contacts in provided folder matching the search query.
|
List<ExchangeSession.Event> |
searchEvents(String folderPath,
ExchangeSession.Condition filter)
Search calendar events in provided folder.
|
abstract List<ExchangeSession.Event> |
searchEvents(String folderPath,
Set<String> attributes,
ExchangeSession.Condition condition)
Search calendar events or messages in provided folder matching the search query.
|
List<ExchangeSession.Event> |
searchEvents(String folderPath,
String timeRangeStart,
String timeRangeEnd)
Search events between start and end.
|
List<ExchangeSession.Event> |
searchEventsOnly(String folderPath,
String timeRangeStart,
String timeRangeEnd)
Search events between start and end, exclude tasks.
|
ExchangeSession.MessageList |
searchMessages(String folderPath)
Get all folder messages.
|
ExchangeSession.MessageList |
searchMessages(String folderName,
ExchangeSession.Condition condition)
Search folder for messages matching conditions, with attributes needed by IMAP listener.
|
abstract ExchangeSession.MessageList |
searchMessages(String folderName,
Set<String> attributes,
ExchangeSession.Condition condition)
Search folder for messages matching conditions, with given attributes.
|
List<ExchangeSession.Event> |
searchTasksOnly(String folderPath)
Search tasks only (VTODO).
|
abstract int |
sendEvent(String icsBody)
Build and send the MIME message for the provided ICS event.
|
void |
sendMessage(List<String> rcptToRecipients,
javax.mail.internet.MimeMessage mimeMessage)
Send message in reader to recipients.
|
abstract void |
sendMessage(javax.mail.internet.MimeMessage mimeMessage)
Send Mime message.
|
abstract ExchangeSession.Condition |
startsWith(String attributeName,
String value)
Starts with condition.
|
abstract int |
updateFolder(String folderName,
Map<String,String> properties)
Update Exchange folder properties.
|
abstract void |
updateMessage(ExchangeSession.Message message,
Map<String,String> properties)
Update given properties on message.
|
protected static final org.apache.log4j.Logger LOGGER
public static final SimpleTimeZone GMT_TIMEZONE
protected static final int FREE_BUSY_INTERVAL
protected static final String PUBLIC_ROOT
protected static final String CALENDAR
protected static final String TASKS
public static final String CONTACTS
protected static final String ADDRESSBOOK
protected static final String INBOX
protected static final String LOWER_CASE_INBOX
protected static final String MIXED_CASE_INBOX
protected static final String SENT
protected static final String SENDMSG
protected static final String DRAFTS
protected static final String TRASH
protected static final String JUNK
protected static final String UNSENT
protected String publicFolderUrl
protected String mailPath
protected String rootPath
protected String email
protected String alias
protected String currentMailboxPath
protected String userName
protected String serverVersion
protected static final String YYYY_MM_DD_HH_MM_SS
protected static final String YYYY_MM_DD_T_HHMMSS_Z
protected String lastSentMessageId
protected static final String MAILBOX_BASE
protected VObject vTimezone
public abstract void close()
public abstract String formatSearchDate(Date date)
date
- date objectpublic static SimpleDateFormat getZuluDateFormat()
protected static SimpleDateFormat getVcardBdayFormat()
protected static SimpleDateFormat getExchangeDateFormat(String value)
protected static SimpleDateFormat getExchangeZuluDateFormat()
protected static SimpleDateFormat getExchangeZuluDateFormatMillisecond()
protected static Date parseDate(String dateString) throws ParseException
ParseException
public boolean isExpired() throws NoRouteToHostException, UnknownHostException
NoRouteToHostException
- on errorUnknownHostException
- on errorprotected abstract void buildSessionInfo(URI uri) throws IOException
IOException
public abstract ExchangeSession.Message createMessage(String folderPath, String messageName, HashMap<String,String> properties, javax.mail.internet.MimeMessage mimeMessage) throws IOException
folderPath
- Exchange folder pathmessageName
- message nameproperties
- message properties (flags)mimeMessage
- MIME messageIOException
- when unable to create messagepublic abstract void updateMessage(ExchangeSession.Message message, Map<String,String> properties) throws IOException
message
- Exchange messageproperties
- Webdav properties mapIOException
- on errorpublic abstract void deleteMessage(ExchangeSession.Message message) throws IOException
message
- Exchange messageIOException
- on errorprotected abstract byte[] getContent(ExchangeSession.Message message) throws IOException
message
- Exchange messageIOException
- on errorpublic ExchangeSession.MessageList getAllMessageUidAndSize(String folderName) throws IOException
folderName
- Exchange folder nameIOException
- on errorpublic ExchangeSession.MessageList searchMessages(String folderPath) throws IOException
folderPath
- Exchange folder nameIOException
- on errorpublic ExchangeSession.MessageList searchMessages(String folderName, ExchangeSession.Condition condition) throws IOException
folderName
- Exchange folder namecondition
- search filterIOException
- on errorpublic abstract ExchangeSession.MessageList searchMessages(String folderName, Set<String> attributes, ExchangeSession.Condition condition) throws IOException
folderName
- Exchange folder nameattributes
- requested Webdav attributescondition
- search filterIOException
- on errorpublic String getServerVersion()
public abstract ExchangeSession.MultiCondition and(ExchangeSession.Condition... condition)
condition
- search conditionspublic abstract ExchangeSession.MultiCondition or(ExchangeSession.Condition... condition)
condition
- search conditionspublic abstract ExchangeSession.Condition not(ExchangeSession.Condition condition)
condition
- search conditionpublic abstract ExchangeSession.Condition isEqualTo(String attributeName, String value)
attributeName
- logical Exchange attribute namevalue
- attribute valuepublic abstract ExchangeSession.Condition isEqualTo(String attributeName, int value)
attributeName
- logical Exchange attribute namevalue
- attribute valuepublic abstract ExchangeSession.Condition headerIsEqualTo(String headerName, String value)
headerName
- MIME header namevalue
- attribute valuepublic abstract ExchangeSession.Condition gte(String attributeName, String value)
attributeName
- logical Exchange attribute namevalue
- attribute valuepublic abstract ExchangeSession.Condition gt(String attributeName, String value)
attributeName
- logical Exchange attribute namevalue
- attribute valuepublic abstract ExchangeSession.Condition lt(String attributeName, String value)
attributeName
- logical Exchange attribute namevalue
- attribute valuepublic abstract ExchangeSession.Condition lte(String attributeName, String value)
attributeName
- logical Exchange attribute namevalue
- attribute valuepublic abstract ExchangeSession.Condition contains(String attributeName, String value)
attributeName
- logical Exchange attribute namevalue
- attribute valuepublic abstract ExchangeSession.Condition startsWith(String attributeName, String value)
attributeName
- logical Exchange attribute namevalue
- attribute valuepublic abstract ExchangeSession.Condition isNull(String attributeName)
attributeName
- logical Exchange attribute namepublic abstract ExchangeSession.Condition exists(String attributeName)
attributeName
- logical Exchange attribute namepublic abstract ExchangeSession.Condition isTrue(String attributeName)
attributeName
- logical Exchange attribute namepublic abstract ExchangeSession.Condition isFalse(String attributeName)
attributeName
- logical Exchange attribute namepublic List<ExchangeSession.Folder> getSubFolders(String folderName, boolean recursive, boolean wildcard) throws IOException
folderName
- Exchange folder namerecursive
- deep search if trueIOException
- on errorpublic List<ExchangeSession.Folder> getSubCalendarFolders(String folderName, boolean recursive) throws IOException
folderName
- Exchange folder namerecursive
- deep search if trueIOException
- on errorpublic abstract List<ExchangeSession.Folder> getSubFolders(String folderName, ExchangeSession.Condition condition, boolean recursive) throws IOException
folderName
- Exchange folder namecondition
- search filterrecursive
- deep search if trueIOException
- on errorpublic void purgeOldestTrashAndSentMessages() throws IOException
IOException
- when unable to purge messagesprotected void purgeOldestFolderMessages(String folderPath, int keepDelay) throws IOException
IOException
protected void convertResentHeader(javax.mail.internet.MimeMessage mimeMessage, String headerName) throws javax.mail.MessagingException
javax.mail.MessagingException
public void sendMessage(List<String> rcptToRecipients, javax.mail.internet.MimeMessage mimeMessage) throws IOException, javax.mail.MessagingException
rcptToRecipients
- recipients listmimeMessage
- mime messageIOException
- on errorjavax.mail.MessagingException
- on errorprotected List<javax.mail.internet.InternetAddress> getAllRecipients(javax.mail.internet.MimeMessage mimeMessage) throws javax.mail.MessagingException
javax.mail.MessagingException
public abstract void sendMessage(javax.mail.internet.MimeMessage mimeMessage) throws IOException, javax.mail.MessagingException
mimeMessage
- MIME messageIOException
- on errorjavax.mail.MessagingException
- on errorpublic ExchangeSession.Folder getFolder(String folderPath) throws IOException
folderPath
- folder pathIOException
- on errorprotected abstract ExchangeSession.Folder internalGetFolder(String folderName) throws IOException
IOException
public boolean refreshFolder(ExchangeSession.Folder currentFolder) throws IOException
currentFolder
- current folderIOException
- on errorpublic void createMessageFolder(String folderName) throws IOException
folderName
- logical folder nameIOException
- on errorpublic int createCalendarFolder(String folderName, Map<String,String> properties) throws IOException
folderName
- logical folder nameproperties
- folder propertiesIOException
- on errorpublic void createContactFolder(String folderName, Map<String,String> properties) throws IOException
folderName
- logical folder nameproperties
- folder propertiesIOException
- on errorpublic abstract int createFolder(String folderName, String folderClass, Map<String,String> properties) throws IOException
folderName
- logical folder namefolderClass
- folder classproperties
- folder propertiesIOException
- on errorpublic abstract int updateFolder(String folderName, Map<String,String> properties) throws IOException
folderName
- logical folder nameproperties
- folder propertiesIOException
- on errorpublic abstract void deleteFolder(String folderName) throws IOException
folderName
- logical folder nameIOException
- on errorpublic abstract void copyMessage(ExchangeSession.Message message, String targetFolder) throws IOException
message
- Exchange messagetargetFolder
- target folderIOException
- on errorpublic void copyMessages(List<ExchangeSession.Message> messages, String targetFolder) throws IOException
IOException
public abstract void moveMessage(ExchangeSession.Message message, String targetFolder) throws IOException
message
- Exchange messagetargetFolder
- target folderIOException
- on errorpublic void moveMessages(List<ExchangeSession.Message> messages, String targetFolder) throws IOException
IOException
public abstract void moveFolder(String folderName, String targetName) throws IOException
folderName
- current folder name/pathtargetName
- target folder name/pathIOException
- on errorpublic abstract void moveItem(String sourcePath, String targetPath) throws IOException
sourcePath
- item source pathtargetPath
- item target pathIOException
- on errorprotected abstract void moveToTrash(ExchangeSession.Message message) throws IOException
IOException
public String convertKeywordToFlag(String value)
value
- keyword valuepublic String convertFlagToKeyword(String value)
value
- IMAP flagpublic String convertFlagsToKeywords(HashSet<String> flags)
flags
- IMAP flagspublic List<ExchangeSession.Contact> getAllContacts(String folderPath, boolean includeDistList) throws IOException
folderPath
- Exchange folder pathincludeDistList
- include distribution listsIOException
- on errorpublic abstract List<ExchangeSession.Contact> searchContacts(String folderPath, Set<String> attributes, ExchangeSession.Condition condition, int maxCount) throws IOException
folderPath
- Exchange folder pathattributes
- requested attributescondition
- Exchange search querymaxCount
- maximum item countIOException
- on errorpublic abstract List<ExchangeSession.Event> getEventMessages(String folderPath) throws IOException
folderPath
- Exchange folder pathIOException
- on errorpublic List<ExchangeSession.Event> getAllEvents(String folderPath) throws IOException
folderPath
- Exchange folder pathIOException
- on errorprotected abstract ExchangeSession.Condition getCalendarItemCondition(ExchangeSession.Condition dateCondition)
protected ExchangeSession.Condition getPastDelayCondition(String attribute)
protected ExchangeSession.Condition getRangeCondition(String timeRangeStart, String timeRangeEnd) throws IOException
IOException
public List<ExchangeSession.Event> searchEvents(String folderPath, String timeRangeStart, String timeRangeEnd) throws IOException
folderPath
- Exchange folder pathtimeRangeStart
- date range start in zulu formattimeRangeEnd
- date range start in zulu formatIOException
- on errorpublic List<ExchangeSession.Event> searchEventsOnly(String folderPath, String timeRangeStart, String timeRangeEnd) throws IOException
folderPath
- Exchange folder pathtimeRangeStart
- date range start in zulu formattimeRangeEnd
- date range start in zulu formatIOException
- on errorpublic List<ExchangeSession.Event> searchTasksOnly(String folderPath) throws IOException
folderPath
- Exchange folder pathIOException
- on errorpublic List<ExchangeSession.Event> searchEvents(String folderPath, ExchangeSession.Condition filter) throws IOException
folderPath
- Exchange folder pathfilter
- search filterIOException
- on errorpublic abstract List<ExchangeSession.Event> searchEvents(String folderPath, Set<String> attributes, ExchangeSession.Condition condition) throws IOException
folderPath
- Exchange folder pathattributes
- requested attributescondition
- Exchange search queryIOException
- on errorprotected String convertItemNameToEML(String itemName)
itemName
- item namepublic abstract ExchangeSession.Item getItem(String folderPath, String itemName) throws IOException
folderPath
- Exchange folder pathitemName
- event nameIOException
- on errorpublic abstract ExchangeSession.ContactPhoto getContactPhoto(ExchangeSession.Contact contact) throws IOException
contact
- address book contactIOException
- on errorpublic ExchangeSession.ContactPhoto getADPhoto(String email)
email
- address book contactpublic abstract void deleteItem(String folderPath, String itemName) throws IOException
folderPath
- Exchange folder pathitemName
- item nameIOException
- on errorpublic abstract void processItem(String folderPath, String itemName) throws IOException
folderPath
- Exchange folder pathitemName
- item nameIOException
- on errorprotected String replaceIcal4Principal(String value)
value
- attendee value or ics linepublic abstract int sendEvent(String icsBody) throws IOException
icsBody
- event in iCalendar formatIOException
- on errorpublic ExchangeSession.ItemResult createOrUpdateItem(String folderPath, String itemName, String itemBody, String etag, String noneMatch) throws IOException
folderPath
- Exchange folder pathitemName
- event nameitemBody
- event body in iCalendar formatetag
- previous event etag to detect concurrent updatesnoneMatch
- if-none-match header valueIOException
- on errorprotected void convertContactProperties(Map<String,String> properties, String[] contactProperties, List<String> values)
protected ExchangeSession.ItemResult createOrUpdateContact(String folderPath, String itemName, String itemBody, String etag, String noneMatch) throws IOException
IOException
protected abstract ExchangeSession.Contact buildContact(String folderPath, String itemName, Map<String,String> properties, String etag, String noneMatch) throws IOException
IOException
protected abstract ExchangeSession.ItemResult internalCreateOrUpdateEvent(String folderPath, String itemName, String contentClass, String icsBody, String etag, String noneMatch) throws IOException
IOException
public String getAliasFromLogin()
public abstract boolean isSharedFolder(String folderPath)
folderPath
- absolute folder pathpublic abstract boolean isMainCalendar(String folderPath) throws IOException
folderPath
- absolute folder pathIOException
public String getEmail()
public String getAlias()
public abstract Map<String,ExchangeSession.Contact> galFind(ExchangeSession.Condition condition, Set<String> returningAttributes, int sizeLimit) throws IOException
condition
- search filterreturningAttributes
- returning attributessizeLimit
- size limitIOException
- on errorprotected abstract String getFreeBusyData(String attendee, String start, String end, int interval) throws IOException
attendee
- attendee email addressstart
- start date in Exchange zulu formatend
- end date in Exchange zulu formatinterval
- freebusy interval in minutesIOException
- on errorpublic ExchangeSession.FreeBusy getFreebusy(String attendee, String startDateValue, String endDateValue) throws IOException
attendee
- attendee emailstartDateValue
- start dateendDateValue
- end dateIOException
- on errorpublic VObject getVTimezone()
protected abstract void loadVtimezone()
Copyright © 2001–2024 MickaĆ«l Guessant. All rights reserved.