use of com.zimbra.cs.dav.service.DavResponse in project zm-mailbox by Zimbra.
the class PropPatch method handle.
@Override
public void handle(DavContext ctxt) throws DavException, IOException, ServiceException {
if (!ctxt.hasRequestMessage()) {
throw new DavException("empty request", HttpServletResponse.SC_BAD_REQUEST);
}
Document req = ctxt.getRequestMessage();
Element top = req.getRootElement();
if (!top.getName().equals(DavElements.P_PROPERTYUPDATE)) {
throw new DavException("msg " + top.getName() + " not allowed in PROPPATCH", HttpServletResponse.SC_BAD_REQUEST, null);
}
DavResource resource = ctxt.getRequestedResource();
handlePropertyUpdate(ctxt, top, resource, false, PROPPATCH);
DavResponse resp = ctxt.getDavResponse();
resp.addResource(ctxt, resource, ctxt.getResponseProp(), false);
sendResponse(ctxt);
}
Aggregations