protected void proppatch(HttpURL url, String logName)
throws IOException, HttpException
{
log(logName, ifVerbose());
PropPatchMethod propPatch = new PropPatchMethod(url.getURI());
if (this.locktoken != null) {
Utils.generateIfHeader(propPatch, this.locktoken);
}
int c = 1;
for(Iterator i = toRemove.iterator(); i.hasNext(); ) {
Remove r = (Remove)i.next();
propPatch.addPropertyToRemove(r.name,
r.abbrev != null ? r.abbrev : "NS"+(c++),
r.namespace);
}
for(Iterator i = toSet.iterator(); i.hasNext(); ) {
Set a = (Set)i.next();
propPatch.addPropertyToSet(a.name,
a.getValue(),
a.abbrev != null ? a.abbrev : "NS"+(c++),
a.namespace);
}
int status = getHttpClient().executeMethod(propPatch);
count++;
switch (status) {
case WebdavStatus.SC_OK:
// ok
break;
case WebdavStatus.SC_MULTI_STATUS:
for(Enumeration e = propPatch.getResponses(); e.hasMoreElements();) {
ResponseEntity response = (ResponseEntity)e.nextElement();
if (response.getStatusCode() > 400) {
throw Utils.makeBuildException("Error while PROPPATCH",
propPatch.getResponses());
}
}
break;
default: