update(uri, relPath, new String[] {vUri}, UpdateInfo.UPDATE_BY_VERSION, removeExisting, sessionInfo);
}
private boolean exists(SessionInfo sInfo, String uri) {
HeadMethod method = new HeadMethod(uri);
try {
int statusCode = getClient(sInfo).executeMethod(method);
if (statusCode == DavServletResponse.SC_OK) {
return true;
}
} catch (IOException e) {
log.error("Unexpected error while testing existence of item.",e);
} catch (RepositoryException e) {
log.error(e.getMessage());
} finally {
method.releaseConnection();
}
return false;
}