Class IcalHandler


  • public class IcalHandler
    extends Object
    Author:
    o.becherer, seba.wagner
    • Field Detail

      • ICAL_METHOD_REQUEST

        public static final net.fortuna.ical4j.model.property.Method ICAL_METHOD_REQUEST
        Creation of a new Event
      • ICAL_METHOD_CANCEL

        public static final net.fortuna.ical4j.model.property.Method ICAL_METHOD_CANCEL
      • ICAL_METHOD_REFRESH

        public static final net.fortuna.ical4j.model.property.Method ICAL_METHOD_REFRESH
    • Constructor Detail

      • IcalHandler

        public IcalHandler​(net.fortuna.ical4j.model.property.Method method)
        Constructor
        Parameters:
        method - (@see IcalHandler) constants
    • Method Detail

      • addNewMeeting

        public String addNewMeeting​(Date startDate,
                                    Date endDate,
                                    String name,
                                    List<Map<String,​String>> attendees,
                                    String description,
                                    Map<String,​String> organizer,
                                    String uid,
                                    String javaTzId)
        Parameters:
        startDate - use standard TimeZone!!
        endDate - use standard time zone!!
        name - meeting name
        attendees - List of attendees (use getAttendeeData to retrieve valid records)
        description - containing the meeting description
        organizer - organizer
        uid - (maybe null)
        javaTzId - ID of owner's java time zone
        Returns:
        UID of Meeting
      • getAttendeeData

        public Map<String,​String> getAttendeeData​(String emailAdress,
                                                        String displayName,
                                                        boolean chair)
        Use this function to build a valid record for the AttendeeList for addMeetings Generate a Attendee
        Parameters:
        emailAdress - - email of attendee
        displayName - - name of attendee
        chair - - is this organizer
        Returns:
        attendee data as Map
      • writeDataToFile

        public void writeDataToFile​(String _filerPath)
                             throws Exception
        Write iCal to File
        Parameters:
        _filerPath - - path to '*.ics' file
        Throws:
        Exception - - in case of error during writing to the file
      • getIcalAsByteArray

        public byte[] getIcalAsByteArray()
                                  throws Exception
        Get IcalBody as ByteArray
        Returns:
        - calendar in ICS format as byte[]
        Throws:
        Exception - - in case of error during writing to byte array
      • getICalDataAsString

        public String getICalDataAsString()
        Retrieving Data as String