use of io.milton.http.exceptions.PreConditionFailedException in project lobcder by skoulouzis.
the class UnlockHandler method processExistingResource.
private void processExistingResource(HttpManager manager, Request request, Response response, Resource resource) throws NotAuthorizedException, BadRequestException, ConflictException {
LockableResource r = (LockableResource) resource;
String sToken = request.getLockTokenHeader();
sToken = parseToken(sToken);
// }
try {
r.unlock(sToken);
responseHandler.respondNoContent(resource, response, request);
} catch (PreConditionFailedException ex) {
responseHandler.respondPreconditionFailed(request, response, resource);
}
}
Aggregations