Frage

I am making an application that creates multiple VEvents and it also needs to be able to update and cancel. Everywhere where I searched for this information, no one actually showed any code with Java, just explained in words what need to be done. So I did what I think should be right. And below is what I got. First I created VEvents and than I tried to delete them, but when I opened ics file the calendar still showed those VEvents. What do you think is wrong? And how can I accomplish what I need? Also my application is not concerned with sending invitation or something like that, those events should only be showed in the calendar who opens the file.

BEGIN:VCALENDAR
PRODID:-//Ben Fortuna//iCal4j 1.0//EN
VERSION:2.0
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTAMP:20140327T221422Z
DTSTART:20140402T060000
DURATION:PT1H
SUMMARY:jTextField2
SEQUENCE:0
DESCRIPTION:description
UID:jTextField21
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20140327T221422Z
DTSTART:20140403T060000
DURATION:PT1H
SUMMARY:jTextField2
SEQUENCE:0
DESCRIPTION:description
UID:jTextField22
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20140327T221422Z
DTSTART:20140404T060000
DURATION:PT1H
SUMMARY:jTextField2
SEQUENCE:0
DESCRIPTION:description
UID:jTextField23
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20140327T221422Z
UID:jTextField21
STATUS:CANCELLED
SEQUENCE:1
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20140327T221422Z
UID:jTextField22
STATUS:CANCELLED
SEQUENCE:1
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20140327T221422Z
UID:jTextField23
STATUS:CANCELLED
SEQUENCE:1
END:VEVENT
END:VCALENDAR
War es hilfreich?

Lösung

How is this icalendar stream going to be propagated to the clients ?

If it is just an ics file stored on some web server that calendar client subscribe to using HTTP GET, then clients will typically poll for changes in the file. Events which are no longer part of that stream will implicitly disappear.

If the iCalendar stream is going to be used by clients in some other way (e.g. via email), please specify how.

In any case, having a single stream with the same event (same UID) multiple times in different state is not the way to propagate changes.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top