Boolean allVersions = getBooleanParameter(request, Constants.PARAM_ALL_VERSIONS);
UnfileObject unfileObjects = getEnumParameter(request, Constants.PARAM_UNFILE_OBJECTS, UnfileObject.class);
Boolean continueOnFailure = getBooleanParameter(request, Constants.PARAM_CONTINUE_ON_FAILURE);
// execute
FailedToDeleteData ftd = service.deleteTree(repositoryId, folderId, allVersions, unfileObjects,
continueOnFailure, null);
if ((ftd != null) && (ftd.getIds() != null) && (ftd.getIds().size() > 0)) {
// print ids that could not be deleted
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
response.setContentType("text/plain");
PrintWriter pw = response.getWriter();
pw.println("Failed to delete the following objects:");
for (String id : ftd.getIds()) {
pw.println(id);
}
pw.flush();