use of org.oasis_open.docs.ws_calendar.ns.soap.PropertyReferenceType in project bw-calendar-engine by Bedework.
the class BwUpdates method addRemove.
private UpdateResult addRemove(final EventInfo ei, final Component subComponent, final boolean add, final List<PropertyReferenceType> refs, final IcalCallback cb) throws WebdavException {
for (PropertyReferenceType r : refs) {
BasePropertyType bprop;
QName pname;
if (r.getBaseProperty() == null) {
return new UpdateResult("No new value for add");
}
bprop = r.getBaseProperty().getValue();
pname = r.getBaseProperty().getName();
PropertyUpdater pu = getUpdater(bprop);
if (pu == null) {
return new UpdateResult("No updater for property: " + pname);
}
PropertyUpdateInfo ui = new PropertyUpdateInfo(bprop, pname, cb, ei, subComponent, state, userHref);
UpdateResult ur;
if (add) {
ur = ui.setAdd(r);
} else {
ur = ui.setRemove(r);
}
if (ur != null) {
return ur;
}
ur = pu.applyUpdate(ui);
if (!ur.getOk()) {
return ur;
}
}
return UpdateResult.getOkResult();
}
Aggregations