javaicalendarical4j

Showing an event as "free" using ical4j


I am trying to generate an event invitation that is sent via E-Mail. Everything works so far. The only problem is that it is not shown as free. The standard is "conditional" (or whatever the third option in Outlook is, I can't switch mine to English currently) but I want it to be on free as standard so the event doesn't block other events. What is the way to do so? My ics looks like this currently:

BEGIN:VCALENDAR
PRODID:-//myProdId
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VEVENT
DTSTAMP:20210721T122442Z
DTSTART;VALUE=DATE:20210721
DTEND;VALUE=DATE:20210722
SUMMARY:test
CLASS:PRIVATE
UID:20210721142442216-uidGen@fe80:0:0:0:dd32:894f:88da:fde6%wlan0
PRIORITY:5
SEQUENCE:0
CREATED:20210721T122443Z
LAST-MODIFIED:20210721T122443Z
LOCATION:
ATTENDEE;CN=Test Client;RSVP=FALSE:test@test.com
DESCRIPTION:
ORGANIZER;CN=admin:admin@admin.com
BEGIN:VALARM
TRIGGER:-PT1H
ACTION:DISPLAY
DESCRIPTION:
END:VALARM
END:VEVENT
END:VCALENDAR

Solution

  • Have a look at the TRANSP property. It has two options: opaque is for events that block out time, transparent does not.

    https://ical4j.github.io/docs/ical4j/api/3.0.26/net/fortuna/ical4j/model/property/Transp.html