Resource<?> resource = null;
ContentRepositoryOperation<?> unlockOperation = CurrentOperation.get();
for (ResourceURI u : getVersions(uri)) {
Resource<?> r = get(u);
r.unlock();
PutOperation putOp = new PutOperationImpl(r, false);
try {
CurrentOperation.set(putOp);
put(r, false);
} finally {
CurrentOperation.set(unlockOperation);