// check lock-null resources
try {
if (isLockNull(resourcePath)) {
int statusCode = WebdavStatus.SC_NOT_FOUND;
sendError( statusCode, "lock-null resource", new Object[]{resourcePath} );
throw new WebdavException( statusCode );
}
}
catch (ServiceAccessException e) {
int statusCode = getErrorCode( e );
sendError( statusCode, e );
throw new WebdavException( statusCode );
}
try {
if ( WebdavEvent.REPORT.isEnabled() ) EventDispatcher.getInstance().fireVetoableEvent(WebdavEvent.REPORT, new WebdavEvent(this));
reportWorker.checkPreconditions(resourcePath, getDepth());
Element rootElm;
if (reportWorker instanceof PrincipalSearchPropertySetReport) {
rootElm = new Element(E_PRINCIPAL_SEARCH_PROPERTY_SET, DNSP);
reportWorker.execute(resourcePath, rootElm, getDepth());
resp.setStatus(WebdavStatus.SC_OK);
}
else {
rootElm = new Element(E_MULTISTATUS, DNSP);
reportWorker.execute(resourcePath, rootElm, getDepth());
resp.setStatus(WebdavStatus.SC_MULTI_STATUS);
}
org.jdom.output.Format format = org.jdom.output.Format.getPrettyFormat();
format.setIndent(XML_RESPONSE_INDENT);
new XMLOutputter(format).
output(new Document(rootElm), resp.getWriter());
}
catch (PreconditionViolationException e) {
sendPreconditionViolation(e);
throw e;
}
catch (Exception e) {
int statusCode = getErrorCode( e );
sendError( statusCode, e );
throw new WebdavException( statusCode );
}
}