Search in sources :

Example 6 with TextPropertyType

use of ietf.params.xml.ns.icalendar_2.TextPropertyType in project bw-calendar-engine by Bedework.

the class DescriptionPropUpdater method applyUpdate.

@Override
public UpdateResult applyUpdate(final UpdateInfo ui) throws WebdavException {
    final BwEvent ev = ui.getEvent();
    if (ui.isRemove()) {
        ui.getCte().setDeleted(ev.getDescription());
        ev.setDescription(null);
        return UpdateResult.getOkResult();
    }
    if (ui.getUpdprop() == null) {
        // No change - parameters only upated?
        return UpdateResult.getOkResult();
    }
    final String val = ((TextPropertyType) ui.getUpdprop()).getText();
    if (ui.getCte().setChanged(ev.getDescription(), val)) {
        ev.setDescription(val);
    }
    return UpdateResult.getOkResult();
}
Also used : BwEvent(org.bedework.calfacade.BwEvent) TextPropertyType(ietf.params.xml.ns.icalendar_2.TextPropertyType)

Example 7 with TextPropertyType

use of ietf.params.xml.ns.icalendar_2.TextPropertyType in project bw-calendar-engine by Bedework.

the class SummaryPropUpdater method applyUpdate.

@Override
public UpdateResult applyUpdate(final UpdateInfo ui) throws WebdavException {
    BwEvent ev = ui.getEvent();
    if (ui.isRemove()) {
        return new UpdateResult("cannot remove: " + ui.getPropName());
    }
    String val = ((TextPropertyType) ui.getUpdprop()).getText();
    if (ui.getCte().setChanged(ev.getSummary(), val)) {
        ev.setSummary(val);
    }
    return UpdateResult.getOkResult();
}
Also used : BwEvent(org.bedework.calfacade.BwEvent) TextPropertyType(ietf.params.xml.ns.icalendar_2.TextPropertyType) UpdateResult(org.bedework.caldav.server.sysinterface.SysIntf.UpdateResult)

Aggregations

TextPropertyType (ietf.params.xml.ns.icalendar_2.TextPropertyType)5 BwEvent (org.bedework.calfacade.BwEvent)4 UpdateResult (org.bedework.caldav.server.sysinterface.SysIntf.UpdateResult)3 BooleanPropertyType (net.opengis.swe.x20.BooleanPropertyType)2 CategoryPropertyType (net.opengis.swe.x20.CategoryPropertyType)2 CountPropertyType (net.opengis.swe.x20.CountPropertyType)2 DataArrayPropertyType (net.opengis.swe.x20.DataArrayPropertyType)2 DataRecordPropertyType (net.opengis.swe.x20.DataRecordPropertyType)2 QuantityPropertyType (net.opengis.swe.x20.QuantityPropertyType)2 TextPropertyType (net.opengis.swe.x20.TextPropertyType)2 BwString (org.bedework.calfacade.BwString)2 BwXproperty (org.bedework.calfacade.BwXproperty)2 CalFacadeException (org.bedework.calfacade.exc.CalFacadeException)2 ChangeTableEntry (org.bedework.calfacade.util.ChangeTableEntry)2 WebdavException (org.bedework.webdav.servlet.shared.WebdavException)2 BaseParameterType (ietf.params.xml.ns.icalendar_2.BaseParameterType)1 TextParameterType (ietf.params.xml.ns.icalendar_2.TextParameterType)1 AbstractDataComponentDocument (net.opengis.swe.x20.AbstractDataComponentDocument)1 AbstractDataComponentType (net.opengis.swe.x20.AbstractDataComponentType)1 AnyScalarPropertyType (net.opengis.swe.x20.AnyScalarPropertyType)1