public static int DEPTH_ZERO = 0;
public static int DEPTH_ONE = 1;
public static int DEPTH_INFINITE = -1;
public static HTTPStatus getProperties(DAVConnection connection, String path, int depth, String label, DAVElement[] properties, Map result) throws SVNException {
HTTPHeader header = new HTTPHeader();
if (depth == DEPTH_ZERO) {
header.setHeaderValue(HTTPHeader.DEPTH_HEADER, "0");
} else if (depth == DEPTH_ONE) {
header.setHeaderValue(HTTPHeader.DEPTH_HEADER, "1");
} else if (depth == DEPTH_INFINITE) {
header.setHeaderValue(HTTPHeader.DEPTH_HEADER, "infinity");
} else {
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_DAV_MALFORMED_DATA,
"Invalid PROPFIND depth value: '{0}'", new Integer(depth));
SVNErrorManager.error(err, SVNLogType.NETWORK);
}
if (label != null) {
header.setHeaderValue(HTTPHeader.LABEL_HEADER, label);
}
StringBuffer body = DAVPropertiesHandler.generatePropertiesRequest(null, properties);
DAVPropertiesHandler davHandler = new DAVPropertiesHandler();
davHandler.setDAVProperties(result);
return connection.doPropfind(path, header, body, davHandler);