use of ietf.params.xml.ns.caldav.LimitRecurrenceSetType in project bw-calendar-engine by Bedework.
the class BwSysIntfImpl method getRrm.
private RecurringRetrievalMode getRrm(final RetrievalMode rm) throws WebdavException {
if (rm == null) {
return RecurringRetrievalMode.overrides;
}
try {
if (rm.getExpand() != null) {
/* expand with time range */
ExpandType ex = rm.getExpand();
DateTime s = new DateTime(XcalUtil.getIcalFormatDateTime(ex.getStart()));
DateTime e = new DateTime(XcalUtil.getIcalFormatDateTime(ex.getEnd()));
return new RecurringRetrievalMode(Rmode.expanded, getBwDt(s), getBwDt(e));
}
if (rm.getLimitRecurrenceSet() != null) {
/* Only return master event and overrides in range */
LimitRecurrenceSetType l = rm.getLimitRecurrenceSet();
DateTime s = new DateTime(XcalUtil.getIcalFormatDateTime(l.getStart()));
DateTime e = new DateTime(XcalUtil.getIcalFormatDateTime(l.getEnd()));
return new RecurringRetrievalMode(Rmode.overrides, getBwDt(s), getBwDt(e));
}
} catch (Throwable t) {
throw new WebdavBadRequest(CaldavTags.validFilter, "Invalid time-range");
}
/* Return master + overrides */
return RecurringRetrievalMode.overrides;
}
Aggregations