rh.startDocumentRestore(resource, atts);
resource = currentCollection.addBinaryResource(txn, broker, (BinaryDocument)resource, is.getByteStream(), mimetype, is.getByteStreamLength() , date_created, date_modified);
}
txnManager.commit(txn);
final DeferredPermission deferredPermission;
if(name.startsWith(XmldbURI.SYSTEM_COLLECTION)) {
//prevents restore of a backup from changing system collection resource ownership
deferredPermission = new ResourceDeferredPermission(listener, resource, SecurityManager.SYSTEM, SecurityManager.DBA_GROUP, Integer.parseInt(perms, 8));