/** * Includes the resource's calendar data in the response as the * <code>CALDAV:calendar-data</code> property if it was requested. The * calendar data is filtered if a filter was included in the request. */ protected MultiStatusResponse buildMultiStatusResponse(WebDavResource resource, DavPropertyNameSet props) throws CosmoDavException { MultiStatusResponse msr = super.buildMultiStatusResponse(resource, props); DavCalendarResource dcr = (DavCalendarResource) resource; if (getPropFindProps().contains(CALENDARDATA)) { msr.add(new CalendarData(readCalendarData(dcr))); } return msr; }
/** * Includes the resource's calendar data in the response as the * <code>CALDAV:calendar-data</code> property if it was requested. The * calendar data is filtered if a filter was included in the request. */ protected MultiStatusResponse buildMultiStatusResponse(WebDavResource resource, DavPropertyNameSet props) throws CosmoDavException { MultiStatusResponse msr = super.buildMultiStatusResponse(resource, props); DavCalendarResource dcr = (DavCalendarResource) resource; if (getPropFindProps().contains(CALENDARDATA)) { msr.add(new CalendarData(readCalendarData(dcr))); } return msr; }
private static void assertPropertyNames(DavPropertyNameSet expected, DavPropertyNameSet result) { assertEquals(expected.getContentSize(), result.getContentSize()); if (!(expected.getContent().containsAll(result.getContent()))) { StringBuilder missing = new StringBuilder(); for (DavPropertyName name : expected.getContent()) { if (!result.contains(name)) { missing.append("- ").append(name.toString()).append('\n'); } } fail("Missing properties : \n" + missing); } }