|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdavmail.exchange.ExchangeSession
public abstract class ExchangeSession
Exchange session through Outlook Web Access (DAV)
| Nested Class Summary | |
|---|---|
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
|
| Field Summary | |
|---|---|
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 String |
DRAFTS
|
protected String |
email
|
protected static int |
FREE_BUSY_INTERVAL
|
static SimpleTimeZone |
GMT_TIMEZONE
Reference GMT timezone to format dates |
protected org.apache.commons.httpclient.HttpClient |
httpClient
|
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 String |
mailPath
Base user mailboxes path (used to select folder) |
protected static Set<String> |
PASSWORD_FIELDS
|
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 String |
TASKS
|
protected static Set<String> |
TOKEN_FIELDS
|
protected static String |
TRASH
|
protected static Set<String> |
UID_MESSAGE_ATTRIBUTES
|
protected static String |
UNSENT
|
protected static Set<String> |
USER_NAME_FIELDS
|
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 Summary | |
|---|---|
ExchangeSession(String url,
String userName,
String password)
Create an exchange session for the given URL. |
|
| Method Summary | |
|---|---|
abstract ExchangeSession.MultiCondition |
and(ExchangeSession.Condition... condition)
And search filter. |
protected org.apache.commons.httpclient.HttpMethod |
buildLogonMethod(org.apache.commons.httpclient.HttpClient httpClient,
org.apache.commons.httpclient.HttpMethod initmethod)
Try to find logon method path from logon form body. |
protected abstract void |
buildSessionInfo(org.apache.commons.httpclient.HttpMethod method)
|
protected void |
checkFormLoginQueryString(org.apache.commons.httpclient.HttpMethod logonMethod)
|
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 |
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 |
int |
createCalendarFolder(String folderName,
Map<String,String> properties)
Create Exchange calendar folder. |
int |
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 void |
createMessage(String folderPath,
String messageName,
HashMap<String,String> properties,
javax.mail.internet.MimeMessage mimeMessage)
Create message in specified folder. |
int |
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 |
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. |
abstract String |
formatSearchDate(Date date)
Format date to exchange search format. |
protected org.apache.commons.httpclient.HttpMethod |
formLogin(org.apache.commons.httpclient.HttpClient httpClient,
org.apache.commons.httpclient.HttpMethod initmethod,
String userName,
String password)
|
abstract Map<String,ExchangeSession.Contact> |
galFind(ExchangeSession.Condition condition,
Set<String> returningAttributes,
int sizeLimit)
Search global address list |
protected String |
getAbsoluteUri(org.apache.commons.httpclient.HttpMethod method,
String path)
|
String |
getAlias()
Get current user alias |
String |
getAliasFromLogin()
Get current Exchange alias name from login name |
List<ExchangeSession.Contact> |
getAllContacts(String folderPath)
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 |
protected void |
getEmailAndAliasFromOptions()
|
protected String |
getEmailSuffixFromHostname()
|
abstract List<ExchangeSession.Event> |
getEventMessages(String folderPath)
Search calendar messages in provided folder. |
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. |
org.apache.commons.httpclient.HttpClient |
getHttpClient()
Return internal HttpClient instance |
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)
|
protected String |
getScriptBasedFormURL(org.apache.commons.httpclient.HttpMethod initmethod,
String pathQuery)
|
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)
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 |
internalCreateOrUpdateContact(String folderPath,
String itemName,
Map<String,String> properties,
String etag,
String noneMatch)
|
protected abstract ExchangeSession.ItemResult |
internalCreateOrUpdateEvent(String folderPath,
String itemName,
String contentClass,
String icsBody,
String etag,
String noneMatch)
|
protected abstract ExchangeSession.Folder |
internalGetFolder(String folderName)
|
protected boolean |
isAuthenticated()
Look for session cookies. |
protected boolean |
isBasicAuthentication(org.apache.commons.httpclient.HttpClient httpClient,
String url)
Test authentication mode : form based or basic. |
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 |
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)
|
protected org.apache.commons.httpclient.HttpMethod |
postLogonMethod(org.apache.commons.httpclient.HttpClient httpClient,
org.apache.commons.httpclient.HttpMethod logonMethod,
String userName,
String password)
|
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. |
protected void |
setAuthFormFields(org.apache.commons.httpclient.HttpMethod logonMethod,
org.apache.commons.httpclient.HttpClient httpClient,
String password)
|
abstract ExchangeSession.Condition |
startsWith(String attributeName,
String value)
Starts with condition. |
protected org.apache.commons.httpclient.HttpMethod |
submitLanguageSelectionForm(org.apache.commons.httpclient.HttpMethod logonMethod)
|
protected void |
throwAuthenticationFailed()
|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.log4j.Logger LOGGER
public static final SimpleTimeZone GMT_TIMEZONE
protected static final Set<String> USER_NAME_FIELDS
protected static final Set<String> PASSWORD_FIELDS
protected static final Set<String> TOKEN_FIELDS
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 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 final org.apache.commons.httpclient.HttpClient httpClient
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 static final Set<String> POP_MESSAGE_ATTRIBUTES
protected static final Set<String> IMAP_MESSAGE_ATTRIBUTES
protected static final Set<String> UID_MESSAGE_ATTRIBUTES
protected String lastSentMessageId
public static final Set<String> CONTACT_ATTRIBUTES
protected VObject vTimezone
| Constructor Detail |
|---|
public ExchangeSession(String url,
String userName,
String password)
throws IOException
url - Exchange urluserName - user login namepassword - user password
IOException - on error| Method Detail |
|---|
public abstract String formatSearchDate(Date date)
date - date object
public static SimpleDateFormat getZuluDateFormat()
protected static SimpleDateFormat getVcardBdayFormat()
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 error
UnknownHostException - on error
protected boolean isBasicAuthentication(org.apache.commons.httpclient.HttpClient httpClient,
String url)
url - exchange base URLhttpClient - httpClient instance
protected String getAbsoluteUri(org.apache.commons.httpclient.HttpMethod method,
String path)
throws org.apache.commons.httpclient.URIException
org.apache.commons.httpclient.URIException
protected String getScriptBasedFormURL(org.apache.commons.httpclient.HttpMethod initmethod,
String pathQuery)
throws org.apache.commons.httpclient.URIException
org.apache.commons.httpclient.URIException
protected org.apache.commons.httpclient.HttpMethod buildLogonMethod(org.apache.commons.httpclient.HttpClient httpClient,
org.apache.commons.httpclient.HttpMethod initmethod)
throws IOException
httpClient - httpClient instanceinitmethod - form body http method
IOException - on error
protected org.apache.commons.httpclient.HttpMethod postLogonMethod(org.apache.commons.httpclient.HttpClient httpClient,
org.apache.commons.httpclient.HttpMethod logonMethod,
String userName,
String password)
throws IOException
IOException
protected void setAuthFormFields(org.apache.commons.httpclient.HttpMethod logonMethod,
org.apache.commons.httpclient.HttpClient httpClient,
String password)
throws IllegalArgumentException
IllegalArgumentException
protected org.apache.commons.httpclient.HttpMethod formLogin(org.apache.commons.httpclient.HttpClient httpClient,
org.apache.commons.httpclient.HttpMethod initmethod,
String userName,
String password)
throws IOException
IOException
protected org.apache.commons.httpclient.HttpMethod submitLanguageSelectionForm(org.apache.commons.httpclient.HttpMethod logonMethod)
throws IOException
IOExceptionprotected boolean isAuthenticated()
protected void checkFormLoginQueryString(org.apache.commons.httpclient.HttpMethod logonMethod)
throws DavMailAuthenticationException
DavMailAuthenticationException
protected void throwAuthenticationFailed()
throws DavMailAuthenticationException
DavMailAuthenticationException
protected abstract void buildSessionInfo(org.apache.commons.httpclient.HttpMethod method)
throws DavMailException
DavMailException
public abstract void 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 message
IOException - when unable to create message
public abstract void updateMessage(ExchangeSession.Message message,
Map<String,String> properties)
throws IOException
message - Exchange messageproperties - Webdav properties map
IOException - on error
public abstract void deleteMessage(ExchangeSession.Message message)
throws IOException
message - Exchange message
IOException - on error
protected abstract byte[] getContent(ExchangeSession.Message message)
throws IOException
message - Exchange message
IOException - on error
public ExchangeSession.MessageList getAllMessageUidAndSize(String folderName)
throws IOException
folderName - Exchange folder name
IOException - on error
public ExchangeSession.MessageList searchMessages(String folderPath)
throws IOException
folderPath - Exchange folder name
IOException - on error
public ExchangeSession.MessageList searchMessages(String folderName,
ExchangeSession.Condition condition)
throws IOException
folderName - Exchange folder namecondition - search filter
IOException - on error
public abstract ExchangeSession.MessageList searchMessages(String folderName,
Set<String> attributes,
ExchangeSession.Condition condition)
throws IOException
folderName - Exchange folder nameattributes - requested Webdav attributescondition - search filter
IOException - on errorpublic String getServerVersion()
public abstract ExchangeSession.MultiCondition and(ExchangeSession.Condition... condition)
condition - search conditions
public abstract ExchangeSession.MultiCondition or(ExchangeSession.Condition... condition)
condition - search conditions
public abstract ExchangeSession.Condition not(ExchangeSession.Condition condition)
condition - search condition
public abstract ExchangeSession.Condition isEqualTo(String attributeName,
String value)
attributeName - logical Exchange attribute namevalue - attribute value
public abstract ExchangeSession.Condition isEqualTo(String attributeName,
int value)
attributeName - logical Exchange attribute namevalue - attribute value
public abstract ExchangeSession.Condition headerIsEqualTo(String headerName,
String value)
headerName - MIME header namevalue - attribute value
public abstract ExchangeSession.Condition gte(String attributeName,
String value)
attributeName - logical Exchange attribute namevalue - attribute value
public abstract ExchangeSession.Condition gt(String attributeName,
String value)
attributeName - logical Exchange attribute namevalue - attribute value
public abstract ExchangeSession.Condition lt(String attributeName,
String value)
attributeName - logical Exchange attribute namevalue - attribute value
public abstract ExchangeSession.Condition lte(String attributeName,
String value)
attributeName - logical Exchange attribute namevalue - attribute value
public abstract ExchangeSession.Condition contains(String attributeName,
String value)
attributeName - logical Exchange attribute namevalue - attribute value
public abstract ExchangeSession.Condition startsWith(String attributeName,
String value)
attributeName - logical Exchange attribute namevalue - attribute value
public abstract ExchangeSession.Condition isNull(String attributeName)
attributeName - logical Exchange attribute name
public abstract ExchangeSession.Condition isTrue(String attributeName)
attributeName - logical Exchange attribute name
public abstract ExchangeSession.Condition isFalse(String attributeName)
attributeName - logical Exchange attribute name
public List<ExchangeSession.Folder> getSubFolders(String folderName,
boolean recursive)
throws IOException
folderName - Exchange folder namerecursive - deep search if true
IOException - on error
public List<ExchangeSession.Folder> getSubCalendarFolders(String folderName,
boolean recursive)
throws IOException
folderName - Exchange folder namerecursive - deep search if true
IOException - on error
public abstract List<ExchangeSession.Folder> getSubFolders(String folderName,
ExchangeSession.Condition condition,
boolean recursive)
throws IOException
folderName - Exchange folder namecondition - search filterrecursive - deep search if true
IOException - on error
public void purgeOldestTrashAndSentMessages()
throws IOException
IOException - when unable to purge messages
protected 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 message
IOException - on error
javax.mail.MessagingException - on error
protected 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 message
IOException - on error
javax.mail.MessagingException - on error
public ExchangeSession.Folder getFolder(String folderPath)
throws IOException
folderPath - folder path
IOException - on error
protected abstract ExchangeSession.Folder internalGetFolder(String folderName)
throws IOException
IOException
public boolean refreshFolder(ExchangeSession.Folder currentFolder)
throws IOException
currentFolder - current folder
IOException - on error
public int createMessageFolder(String folderName)
throws IOException
folderName - logical folder name
IOException - on error
public int createCalendarFolder(String folderName,
Map<String,String> properties)
throws IOException
folderName - logical folder nameproperties - folder properties
IOException - on error
public int createContactFolder(String folderName,
Map<String,String> properties)
throws IOException
folderName - logical folder nameproperties - folder properties
IOException - on error
public abstract int createFolder(String folderName,
String folderClass,
Map<String,String> properties)
throws IOException
folderName - logical folder namefolderClass - folder classproperties - folder properties
IOException - on error
public abstract int updateFolder(String folderName,
Map<String,String> properties)
throws IOException
folderName - logical folder nameproperties - folder properties
IOException - on error
public abstract void deleteFolder(String folderName)
throws IOException
folderName - logical folder name
IOException - on error
public abstract void copyMessage(ExchangeSession.Message message,
String targetFolder)
throws IOException
message - Exchange messagetargetFolder - target folder
IOException - on error
public abstract void moveMessage(ExchangeSession.Message message,
String targetFolder)
throws IOException
message - Exchange messagetargetFolder - target folder
IOException - on error
public abstract void moveFolder(String folderName,
String targetName)
throws IOException
folderName - current folder name/pathtargetName - target folder name/path
IOException - on error
public abstract void moveItem(String sourcePath,
String targetPath)
throws IOException
sourcePath - item source pathtargetPath - item target path
IOException - on error
protected abstract void moveToTrash(ExchangeSession.Message message)
throws IOException
IOExceptionpublic String convertKeywordToFlag(String value)
value - keyword value
public String convertFlagToKeyword(String value)
value - IMAP flag
protected abstract Set<String> getItemProperties()
public List<ExchangeSession.Contact> getAllContacts(String folderPath)
throws IOException
folderPath - Exchange folder path
IOException - on error
public 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 count
IOException - on error
public abstract List<ExchangeSession.Event> getEventMessages(String folderPath)
throws IOException
folderPath - Exchange folder path
IOException - on error
public List<ExchangeSession.Event> getAllEvents(String folderPath)
throws IOException
folderPath - Exchange folder path
IOException - 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 format
IOException - on error
public 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 format
IOException - on error
public List<ExchangeSession.Event> searchTasksOnly(String folderPath)
throws IOException
folderPath - Exchange folder path
IOException - on error
public List<ExchangeSession.Event> searchEvents(String folderPath,
ExchangeSession.Condition filter)
throws IOException
folderPath - Exchange folder pathfilter - search filter
IOException - on error
public abstract List<ExchangeSession.Event> searchEvents(String folderPath,
Set<String> attributes,
ExchangeSession.Condition condition)
throws IOException
folderPath - Exchange folder pathattributes - requested attributescondition - Exchange search query
IOException - on errorprotected String convertItemNameToEML(String itemName)
itemName - item name
public abstract ExchangeSession.Item getItem(String folderPath,
String itemName)
throws IOException
folderPath - Exchange folder pathitemName - event name
IOException - on error
public abstract ExchangeSession.ContactPhoto getContactPhoto(ExchangeSession.Contact contact)
throws IOException
contact - address book contact
IOException - on error
public abstract void deleteItem(String folderPath,
String itemName)
throws IOException
folderPath - Exchange folder pathitemName - item name
IOException - on error
public abstract void processItem(String folderPath,
String itemName)
throws IOException
folderPath - Exchange folder pathitemName - item name
IOException - on errorprotected String replaceIcal4Principal(String value)
value - attendee value or ics line
public abstract int sendEvent(String icsBody)
throws IOException
icsBody - event in iCalendar format
IOException - on error
public 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 value
IOException - on error
protected 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
IOExceptionprotected String convertZuluDateToBday(String value)
protected String convertBDayToZulu(String value)
protected abstract ExchangeSession.ItemResult internalCreateOrUpdateContact(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
IOExceptionpublic String getAliasFromLogin()
protected String getEmailSuffixFromHostname()
public abstract boolean isSharedFolder(String folderPath)
folderPath - absolute folder path
public abstract boolean isMainCalendar(String folderPath)
folderPath - absolute folder path
protected void getEmailAndAliasFromOptions()
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 limit
IOException - on error
protected 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 minutes
IOException - on error
public ExchangeSession.FreeBusy getFreebusy(String attendee,
String startDateValue,
String endDateValue)
throws IOException
attendee - attendee emailstartDateValue - start dateendDateValue - end date
IOException - on errorpublic VObject getVTimezone()
protected abstract void loadVtimezone()
public org.apache.commons.httpclient.HttpClient getHttpClient()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||