@Component public class IcalUtils extends Object
| コンストラクタと説明 |
|---|
IcalUtils() |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
Date |
addTimetoDate(Date date,
int field,
int amount)
Adds a specified amount of time to a Date.
|
net.fortuna.ical4j.model.Calendar |
parseAppointmentstoCalendar(List<org.apache.openmeetings.db.entity.calendar.Appointment> appointments,
Long ownerId)
Parses a List of Appointments into a VCALENDAR component.
|
net.fortuna.ical4j.model.Calendar |
parseAppointmenttoCalendar(org.apache.openmeetings.db.entity.calendar.Appointment appointment)
Methods to parse Appointment to iCalendar according RFC 2445
|
org.apache.openmeetings.db.entity.calendar.Appointment |
parseCalendartoAppointment(org.apache.openmeetings.db.entity.calendar.Appointment a,
net.fortuna.ical4j.model.Calendar calendar,
String etag)
Updating Appointments which already exist, by parsing the Calendar.
|
org.apache.openmeetings.db.entity.calendar.Appointment |
parseCalendartoAppointment(net.fortuna.ical4j.model.Calendar calendar,
String href,
String etag,
org.apache.openmeetings.db.entity.calendar.OmCalendar omCalendar)
Parses the Calendar from the CalDAV server, to a new Appointment.
|
List<org.apache.openmeetings.db.entity.calendar.Appointment> |
parseCalendartoAppointments(net.fortuna.ical4j.model.Calendar calendar,
Long ownerId)
Parses a Calendar with multiple VEvents into Appointments
|
Date |
parseDate(net.fortuna.ical4j.model.Property dt,
TimeZone timeZone)
Convenience function to parse date from
Property to
Date |
Date |
parseDate(String str,
String[] patterns,
TimeZone _timeZone)
Adapted from DateUtils to support Timezones, and parse ical dates into
Date. |
TimeZone |
parseTimeZone(net.fortuna.ical4j.model.Calendar calendar,
org.apache.openmeetings.db.entity.user.User owner)
Parses the VTimezone Component of the given Calendar.
|
public org.apache.openmeetings.db.entity.calendar.Appointment parseCalendartoAppointment(net.fortuna.ical4j.model.Calendar calendar,
String href,
String etag,
org.apache.openmeetings.db.entity.calendar.OmCalendar omCalendar)
calendar - iCalendar Representation.href - Location of the Calendar on the serveretag - ETag of the calendar.omCalendar - The Parent OmCalendar, to which the Appointment belongs.public List<org.apache.openmeetings.db.entity.calendar.Appointment> parseCalendartoAppointments(net.fortuna.ical4j.model.Calendar calendar, Long ownerId)
calendar - Calendar to ParseownerId - Owner of the AppointmentsList of Appointmentspublic org.apache.openmeetings.db.entity.calendar.Appointment parseCalendartoAppointment(org.apache.openmeetings.db.entity.calendar.Appointment a,
net.fortuna.ical4j.model.Calendar calendar,
String etag)
a - Appointment to be updated.calendar - iCalendar Representation.etag - The ETag of the calendar.public TimeZone parseTimeZone(net.fortuna.ical4j.model.Calendar calendar, org.apache.openmeetings.db.entity.user.User owner)
calendar - Calendar to parseowner - Owner of the Calendarpublic Date parseDate(net.fortuna.ical4j.model.Property dt, TimeZone timeZone)
Property to
Datedt - DATE-TIME Property from which we parse.timeZone - Timezone of the Date.Date representation of the iCalendar value.public Date parseDate(String str, String[] patterns, TimeZone _timeZone)
Date.
Note: Replace FastDateFormat to java.time, when shifting to Java 8 or higher.str - Date representation in String.patterns - Patterns to parse the date againsttimeZone - Timezone of the Date.java.util.Date representation of string or
null if the Date could not be parsed.public Date addTimetoDate(Date date, int field, int amount)
date - Date to which time is addedfield - Date Field to which the Amount is addedamount - Amount to be Addedpublic net.fortuna.ical4j.model.Calendar parseAppointmenttoCalendar(org.apache.openmeetings.db.entity.calendar.Appointment appointment)
throws Exception
appointment - to be converted to iCalendarExceptionpublic net.fortuna.ical4j.model.Calendar parseAppointmentstoCalendar(List<org.apache.openmeetings.db.entity.calendar.Appointment> appointments, Long ownerId) throws Exception
appointments - List of Appointments for the CalendarownerId - Owner of the AppointmentsExceptionCopyright © 2012–2017 Apache Software Foundation. All rights reserved.