Caldav: switch back to contentclass to get calendarmessages over webdav

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1401 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-08-31 23:43:56 +00:00
parent 3b829cefdc
commit 6e6bdf80f6
3 changed files with 19 additions and 6 deletions

View File

@ -2245,12 +2245,7 @@ public abstract class ExchangeSession {
* @return list of calendar messages as Event objects
* @throws IOException on error
*/
public List<Event> getEventMessages(String folderPath) throws IOException {
return searchEvents(folderPath, ITEM_PROPERTIES,
and(or(isEqualTo("outlookmessageclass", "IPM.Schedule.Meeting.Request"),
isEqualTo("outlookmessageclass", "IPM.Schedule.Meeting.Canceled")),
or(isNull("processed"), isFalse("processed"))));
}
public abstract List<Event> getEventMessages(String folderPath) throws IOException;
/**
* Search calendar events in provided folder.

View File

@ -1684,6 +1684,17 @@ public class DavExchangeSession extends ExchangeSession {
return contacts;
}
/**
* @inheritDoc
*/
@Override
public List<ExchangeSession.Event> getEventMessages(String folderPath) throws IOException {
return searchEvents(folderPath, ITEM_PROPERTIES,
and(isEqualTo("contentclass", "urn:content-classes:calendarmessage"),
or(isNull("processed"), isFalse("processed"))));
}
@Override
public List<ExchangeSession.Event> searchEvents(String folderPath, Set<String> attributes, Condition condition) throws IOException {
List<ExchangeSession.Event> events = new ArrayList<ExchangeSession.Event>();

View File

@ -1079,6 +1079,13 @@ public class EwsExchangeSession extends ExchangeSession {
return contacts;
}
@Override
public List<ExchangeSession.Event> getEventMessages(String folderPath) throws IOException {
return searchEvents(folderPath, ITEM_PROPERTIES,
and(startsWith("outlookmessageclass", "IPM.Schedule.Meeting."),
or(isNull("processed"), isFalse("processed"))));
}
@Override
public List<ExchangeSession.Event> searchEvents(String folderPath, Set<String> attributes, Condition condition) throws IOException {
List<ExchangeSession.Event> events = new ArrayList<ExchangeSession.Event>();