mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 19:22:22 -05:00
Caldav: additional VCalendar properties for rebuilt item: VALARM (reminder)
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1441 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
7619bb715d
commit
50fc71c7f1
@ -1307,10 +1307,11 @@ public class DavExchangeSession extends ExchangeSession {
|
|||||||
result = getICSFromItemProperties();
|
result = getICSFromItemProperties();
|
||||||
}
|
}
|
||||||
// debug code
|
// debug code
|
||||||
if (new String(result).indexOf("VTODO") < 0) {
|
/*if (new String(result).indexOf("VTODO") < 0) {
|
||||||
|
LOGGER.debug("Original body: " + new String(result));
|
||||||
result = getICSFromItemProperties();
|
result = getICSFromItemProperties();
|
||||||
LOGGER.debug("Rebuilt body: " + new String(result));
|
LOGGER.debug("Rebuilt body: " + new String(result));
|
||||||
}
|
}*/
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -1338,6 +1339,8 @@ public class DavExchangeSession extends ExchangeSession {
|
|||||||
davPropertyNameSet.add(Field.getPropertyName("sensitivity"));
|
davPropertyNameSet.add(Field.getPropertyName("sensitivity"));
|
||||||
davPropertyNameSet.add(Field.getPropertyName("alldayevent"));
|
davPropertyNameSet.add(Field.getPropertyName("alldayevent"));
|
||||||
davPropertyNameSet.add(Field.getPropertyName("busystatus"));
|
davPropertyNameSet.add(Field.getPropertyName("busystatus"));
|
||||||
|
davPropertyNameSet.add(Field.getPropertyName("reminderset"));
|
||||||
|
davPropertyNameSet.add(Field.getPropertyName("reminderdelta"));
|
||||||
|
|
||||||
PropFindMethod propFindMethod = new PropFindMethod(permanentUrl, davPropertyNameSet, 0);
|
PropFindMethod propFindMethod = new PropFindMethod(permanentUrl, davPropertyNameSet, 0);
|
||||||
try {
|
try {
|
||||||
@ -1405,6 +1408,18 @@ public class DavExchangeSession extends ExchangeSession {
|
|||||||
"1".equals(getPropertyIfExists(davPropertySet, "alldayevent")) ? "TRUE" : "FALSE");
|
"1".equals(getPropertyIfExists(davPropertySet, "alldayevent")) ? "TRUE" : "FALSE");
|
||||||
vEvent.setPropertyValue("X-MICROSOFT-CDO-BUSYSTATUS", getPropertyIfExists(davPropertySet, "busystatus"));
|
vEvent.setPropertyValue("X-MICROSOFT-CDO-BUSYSTATUS", getPropertyIfExists(davPropertySet, "busystatus"));
|
||||||
|
|
||||||
|
if ("1".equals(getPropertyIfExists(davPropertySet, "reminderset"))) {
|
||||||
|
VObject vAlarm = new VObject();
|
||||||
|
vAlarm.type = "VALARM";
|
||||||
|
vAlarm.setPropertyValue("ACTION", "DISPLAY");
|
||||||
|
vAlarm.setPropertyValue("DISPLAY", "Reminder");
|
||||||
|
String reminderdelta = getPropertyIfExists(davPropertySet, "reminderdelta");
|
||||||
|
VProperty vProperty = new VProperty("TRIGGER", "-PT"+reminderdelta+ 'M');
|
||||||
|
vProperty.addParam("VALUE", "DURATION");
|
||||||
|
vAlarm.addProperty(vProperty);
|
||||||
|
vEvent.addVObject(vAlarm);
|
||||||
|
}
|
||||||
|
|
||||||
localVCalendar.addVObject(vEvent);
|
localVCalendar.addVObject(vEvent);
|
||||||
result = localVCalendar.toString().getBytes("UTF-8");
|
result = localVCalendar.toString().getBytes("UTF-8");
|
||||||
} catch (MessagingException e) {
|
} catch (MessagingException e) {
|
||||||
|
@ -177,6 +177,9 @@ public class Field {
|
|||||||
createField(URN_SCHEMAS_CALENDAR, "rrule"); // DistinguishedPropertySetType.PublicStrings/urn:schemas:calendar:rrule/PtypMultipleString
|
createField(URN_SCHEMAS_CALENDAR, "rrule"); // DistinguishedPropertySetType.PublicStrings/urn:schemas:calendar:rrule/PtypMultipleString
|
||||||
createField(URN_SCHEMAS_CALENDAR, "exdate"); // DistinguishedPropertySetType.PublicStrings/urn:schemas:calendar:exdate/PtypMultipleTime
|
createField(URN_SCHEMAS_CALENDAR, "exdate"); // DistinguishedPropertySetType.PublicStrings/urn:schemas:calendar:exdate/PtypMultipleTime
|
||||||
|
|
||||||
|
createField(SCHEMAS_MAPI, "reminderset"); // PidLidReminderSet
|
||||||
|
createField(SCHEMAS_MAPI, "reminderdelta"); // PidLidReminderDelta
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
createField(SCHEMAS_MAPI, "allattendeesstring"); // PidLidAllAttendeesString
|
createField(SCHEMAS_MAPI, "allattendeesstring"); // PidLidAllAttendeesString
|
||||||
createField(SCHEMAS_MAPI, "required_attendees"); // PidLidRequiredAttendees
|
createField(SCHEMAS_MAPI, "required_attendees"); // PidLidRequiredAttendees
|
||||||
|
Loading…
Reference in New Issue
Block a user