mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 03:02:22 -05:00
Caldav: improve event logging, include subject
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1378 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
0d7dd47db2
commit
d4a0a3e341
@ -1745,12 +1745,6 @@ public abstract class ExchangeSession {
|
||||
return etag;
|
||||
}
|
||||
|
||||
protected HttpException buildHttpException(Exception e) {
|
||||
String message = "Unable to get event " + getName() + " at " + permanentUrl + ": " + e.getMessage();
|
||||
LOGGER.warn(message);
|
||||
return new HttpException(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set item href.
|
||||
*
|
||||
@ -1950,6 +1944,7 @@ public abstract class ExchangeSession {
|
||||
*/
|
||||
public abstract class Event extends Item {
|
||||
protected String contentClass;
|
||||
protected String subject;
|
||||
protected VCalendar vCalendar;
|
||||
|
||||
/**
|
||||
@ -1980,6 +1975,12 @@ public abstract class ExchangeSession {
|
||||
return vCalendar.toString();
|
||||
}
|
||||
|
||||
protected HttpException buildHttpException(Exception e) {
|
||||
String message = "Unable to get event " + getName() + " subject: "+subject+" at " + permanentUrl + ": " + e.getMessage();
|
||||
LOGGER.warn(message);
|
||||
return new HttpException(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve item body from Exchange
|
||||
*
|
||||
@ -2208,6 +2209,7 @@ public abstract class ExchangeSession {
|
||||
// calendar CdoInstanceType
|
||||
ITEM_PROPERTIES.add("instancetype");
|
||||
ITEM_PROPERTIES.add("urlcompname");
|
||||
ITEM_PROPERTIES.add("subject");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1155,6 +1155,7 @@ public class DavExchangeSession extends ExchangeSession {
|
||||
permanentUrl = getPropertyIfExists(properties, "permanenturl");
|
||||
etag = getPropertyIfExists(properties, "etag");
|
||||
displayName = getPropertyIfExists(properties, "displayname");
|
||||
subject = getPropertyIfExists(properties, "subject");
|
||||
}
|
||||
|
||||
protected String getPermanentUrl() {
|
||||
@ -1262,7 +1263,7 @@ public class DavExchangeSession extends ExchangeSession {
|
||||
@Override
|
||||
public byte[] getEventContent() throws IOException {
|
||||
byte[] result;
|
||||
LOGGER.debug("Get event: " + permanentUrl);
|
||||
LOGGER.debug("Get event subject: "+subject+ " permanentUrl: " + permanentUrl);
|
||||
// try to get PR_INTERNET_CONTENT
|
||||
try {
|
||||
result = getICSFromInternetContentProperty();
|
||||
@ -1722,6 +1723,7 @@ public class DavExchangeSession extends ExchangeSession {
|
||||
EVENT_REQUEST_PROPERTIES.add("etag");
|
||||
EVENT_REQUEST_PROPERTIES.add("contentclass");
|
||||
EVENT_REQUEST_PROPERTIES.add("displayname");
|
||||
EVENT_REQUEST_PROPERTIES.add("subject");
|
||||
}
|
||||
|
||||
protected static final DavPropertyNameSet EVENT_REQUEST_PROPERTIES_NAME_SET = new DavPropertyNameSet();
|
||||
|
@ -884,6 +884,7 @@ public class EwsExchangeSession extends ExchangeSession {
|
||||
permanentUrl = response.get(Field.get("permanenturl").getResponseName());
|
||||
etag = response.get(Field.get("etag").getResponseName());
|
||||
displayName = response.get(Field.get("displayname").getResponseName());
|
||||
subject = response.get(Field.get("subject").getResponseName());
|
||||
itemName = response.get(Field.get("urlcompname").getResponseName());
|
||||
// workaround for missing urlcompname in Exchange 2010
|
||||
if (itemName == null) {
|
||||
@ -1021,6 +1022,7 @@ public class EwsExchangeSession extends ExchangeSession {
|
||||
EVENT_REQUEST_PROPERTIES.add("permanenturl");
|
||||
EVENT_REQUEST_PROPERTIES.add("etag");
|
||||
EVENT_REQUEST_PROPERTIES.add("displayname");
|
||||
EVENT_REQUEST_PROPERTIES.add("subject");
|
||||
EVENT_REQUEST_PROPERTIES.add("urlcompname");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user