Interface SignupCalendarHelper


  • public interface SignupCalendarHelper
    Helper to create and modify CalendarEventEdit and VEvent objects from meetings and timeslots.
    Author:
    Steve Swinsburg (steve.swinsburg@gmail.com)
    • Method Detail

      • generateEvent

        CalendarEventEdit generateEvent​(SignupMeeting m)
        Create a simple CalendarEventEdit object for an overall meeting. Does not include any timeslots.
        Parameters:
        m - signup meeting.
        Returns:
      • generateEvent

        CalendarEventEdit generateEvent​(SignupMeeting m,
                                        SignupTimeslot ts)
        Create a simple CalendarEventEdit object for a specific timeslot.
        Parameters:
        m - signup meeting. Needed since it stores the main pieces of data liketitle/description/location etc.
        ts - the actual timeslot.
        Returns:
      • generateVEventForTimeslot

        net.fortuna.ical4j.model.component.VEvent generateVEventForTimeslot​(SignupMeeting meeting,
                                                                            SignupTimeslot ts)
        Create a VEvent for a timeslot. Checks if it exists in the given timeslot already (can be transient)
        Parameters:
        meeting - overall SignupMeeting
        ts - SignupTimeslot we need VEvent for
        Returns:
      • generateVEventForMeeting

        net.fortuna.ical4j.model.component.VEvent generateVEventForMeeting​(SignupMeeting meeting)
        Create a VEvent for an overall meeting, no timeslots are included. Checks if it exists in the given meeting already (can be transient)
        Parameters:
        meeting - overall SignupMeeting
        Returns:
      • createCalendarFile

        String createCalendarFile​(List<net.fortuna.ical4j.model.component.VEvent> vevents)
        Create a calendar for a list of VEvents and return the path to the file
        Parameters:
        vevents - List of VEvents
        Returns:
        a path to the calendar file
      • createCalendarFile

        String createCalendarFile​(List<net.fortuna.ical4j.model.component.VEvent> vevents,
                                  String method)
        Create a calendar for a list of VEvents and return the path to the file
        Parameters:
        vevents - List of VEvents
        method - The ITIP method for the calendar, e.g. "REQUEST"
        Returns:
        a path to the calendar file
      • cancelVEvent

        net.fortuna.ical4j.model.component.VEvent cancelVEvent​(net.fortuna.ical4j.model.component.VEvent vevent)
        Cancel an event
        Parameters:
        vevent - VEvent to cancel
        Returns:
        the updated VEvent
      • addUsersToVEvent

        net.fortuna.ical4j.model.component.VEvent addUsersToVEvent​(net.fortuna.ical4j.model.component.VEvent vevent,
                                                                   Set<User> users)
        Add the list of Users to the VEvent as attendees
        Parameters:
        vevent - VEvent to modify
        users - List of Users to add
        Returns:
      • addAttendeesToVEvent

        net.fortuna.ical4j.model.component.VEvent addAttendeesToVEvent​(net.fortuna.ical4j.model.component.VEvent vevent,
                                                                       Set<SignupAttendee> attendees)
        Add the list of SignupAttendees to the VEvent as attendees
        Parameters:
        vevent - VEvent to modify
        attendees - List of Attendees to add
        Returns:
      • isIcsEnabled

        boolean isIcsEnabled()
        Is ICS calendar generation enabled in the external calendaring service?
        Returns:
        true/false