use of com.zimbra.cs.dav.service.DavMethod in project zm-mailbox by Zimbra.
the class Report method handle.
@Override
public void handle(DavContext ctxt) throws DavException, IOException, ServiceException {
if (!ctxt.hasRequestMessage()) {
throw new DavException("empty request body", HttpServletResponse.SC_BAD_REQUEST, null);
}
Document req = ctxt.getRequestMessage();
Element top = req.getRootElement();
if (top == null) {
throw new DavException("empty request body", HttpServletResponse.SC_BAD_REQUEST, null);
}
QName topName = top.getQName();
DavMethod report = sReports.get(topName);
if (report == null) {
throw new DavException.UnsupportedReport(topName);
}
disableJettyTimeout(ctxt);
if (ctxt.getDepth() != DavContext.Depth.zero) {
ctxt.getDavResponse().createResponse(ctxt);
}
report.handle(ctxt);
sendResponse(ctxt);
}
Aggregations