use of io.milton.http.HrefStatus in project lobcder by skoulouzis.
the class MultiStatusEntity method write.
@Override
public void write(Response response, OutputStream outputStream) throws Exception {
XmlWriter writer = new XmlWriter(response.getOutputStream());
writer.writeXMLHeader();
// only single namespace for this method
writer.open("multistatus xmlns:D" + "=\"" + WebDavProtocol.NS_DAV + ":\"");
writer.newLine();
for (HrefStatus status : getStatii()) {
XmlWriter.Element elResponse = writer.begin("response").open();
writer.writeProperty("", "href", status.href);
writer.writeProperty("", "status", status.status.code + "");
elResponse.close();
}
writer.close("multistatus");
writer.flush();
}
use of io.milton.http.HrefStatus in project lobcder by skoulouzis.
the class DefaultWebDavResponseHandler method respondDeleteFailed.
@Override
public void respondDeleteFailed(Request request, Response response, Resource resource, Status status) {
List<HrefStatus> statii = new ArrayList<HrefStatus>();
statii.add(new HrefStatus(request.getAbsoluteUrl(), status));
responseMultiStatus(resource, response, request, statii);
}
Aggregations