|
|
@ -134,7 +134,7 @@ public class BaseAppointment implements Appointment { |
|
|
|
sb.append(contentLine(SUMMARY,title())); |
|
|
|
sb.append(contentLine(SUMMARY,title())); |
|
|
|
sb.append(contentLine(DESCRIPTION,description())); |
|
|
|
sb.append(contentLine(DESCRIPTION,description())); |
|
|
|
coords().map(Coords::icalFormat).map(geo -> contentLine(GEO,geo)).ifPresent(sb::append); |
|
|
|
coords().map(Coords::icalFormat).map(geo -> contentLine(GEO,geo)).ifPresent(sb::append); |
|
|
|
if (!location().isBlank()) sb.append(contentLine(LOCATION,location())); |
|
|
|
location().map(loc -> contentLine(LOCATION,loc)).ifPresent(sb::append); |
|
|
|
for (var attachment : attachments()) sb.append(contentLine("ATTACH;FMTYPE=%s".formatted(attachment.mime()),attachment.url().toString())); |
|
|
|
for (var attachment : attachments()) sb.append(contentLine("ATTACH;FMTYPE=%s".formatted(attachment.mime()),attachment.url().toString())); |
|
|
|
for (var link : links) sb.append(contentLine("ATTACH;TITLE="+paramText(link.desciption()),link.url().toString())); |
|
|
|
for (var link : links) sb.append(contentLine("ATTACH;TITLE="+paramText(link.desciption()),link.url().toString())); |
|
|
|
sb.append(contentLine("CLASS","PUBLIC")); |
|
|
|
sb.append(contentLine("CLASS","PUBLIC")); |
|
|
@ -156,7 +156,7 @@ public class BaseAppointment implements Appointment { |
|
|
|
json.put("description", description()); |
|
|
|
json.put("description", description()); |
|
|
|
json.put("end", end().map(end -> end.format(DATE_TIME)).orElse(null)); |
|
|
|
json.put("end", end().map(end -> end.format(DATE_TIME)).orElse(null)); |
|
|
|
json.put("id", id()); |
|
|
|
json.put("id", id()); |
|
|
|
json.put("location", location()); |
|
|
|
json.put("location", location().orElse(null)); |
|
|
|
json.put("start", start().format(DATE_TIME)); |
|
|
|
json.put("start", start().format(DATE_TIME)); |
|
|
|
json.put("tags", tags()); |
|
|
|
json.put("tags", tags()); |
|
|
|
json.put("title", title()); |
|
|
|
json.put("title", title()); |
|
|
@ -166,8 +166,8 @@ public class BaseAppointment implements Appointment { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public String location() { |
|
|
|
public Optional<String> location() { |
|
|
|
return location; |
|
|
|
return nullable(location); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|