Package com.ettrema.http

Examples of com.ettrema.http.SchedulingResponseItem


            String line = nextLine(r);
            while (line != null) {
                if (line.startsWith("ORGANIZER:")) {
                    organiser = line.substring(line.lastIndexOf(":"));
                } else if (line.startsWith("ATTENDEE:")) {
                    SchedulingResponseItem item = processAttendeeLine(line, organiser);
                    respItems.add(item);
                }
                line = nextLine(r);
            }
            return respItems;
View Full Code Here


        System.out.println("processAttendeeLine: " + line);
        String attendeeName = line.substring(line.lastIndexOf(":")+1);
        System.out.println("process user: " + attendeeName);
        TCalDavPrincipal attendee = TResourceFactory.findUser(attendeeName);
        if (attendee == null) {
            return new SchedulingResponseItem(attendeeName, ITip.StatusResponse.RS_INVALID_37, null);
        } else {
            String ical = "";
            ical += "BEGIN:VCALENDAR\n";
            ical += "VERSION:2.0\n";
            ical += "PRODID:-//Example Corp.//CalDAV Server//EN\n";
            ical += "METHOD:REPLY\n";
            ical += "BEGIN:VFREEBUSY\n";
            ical += "UID:4FD3AD926350\n";
            ical += "DTSTAMP:20090602T200733Z\n";
            ical += "DTSTART:20090602T000000Z\n";
            ical += "DTEND:20090604T000000Z\n";
            ical += "ORGANIZER;CN=\"" + organiser + "\":mailto:" + organiser + "\n"// TODO: should be organiser user
            ical += "ATTENDEE;CN=\"" + attendeeName + "\":mailto:" + attendeeName + "\n";
            ical += "FREEBUSY;FBTYPE=BUSY:20090602T110000Z/20090602T120000Z\n";
            ical += "FREEBUSY;FBTYPE=BUSY:20090603T170000Z/20090603T180000Z\n";
            ical += "END:VFREEBUSY\n";
            ical += "END:VCALENDAR\n";

            return new SchedulingResponseItem(attendeeName, ITip.StatusResponse.RS_SUCCESS_20, ical);
        }
    }
View Full Code Here

TOP

Related Classes of com.ettrema.http.SchedulingResponseItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.