WGContent content = (WGContent) contents.next();
_log.info("Deleting old content '" + content.getContentKey().toString() + "'");
if (!content.remove()) {
_log.error("Cannot delete content. See application log for error details");
throw new WGBackendException("Canceled import because of failed deletion: " + content.getDocumentKey());
}
incTargetDocCounter();
}
// Finally delete the struct
_log.info("Deleting old struct entry '" + String.valueOf(entry.getStructKey()) + "'");
if (!entry.remove()) {
_log.error("Cannot delete struct entry. See application log for error details");
throw new WGBackendException("Canceled import because of failed deletion: " + entry.getDocumentKey());
}
incTargetDocCounter();
}