Source:
<code>protected String actOnSelection(int op, List<DocumentModel> docs) { if (docs == null) { return null; } <START> TrashInfo info = (TrashInfo) getTrashService().getTrashInfo(docs, currentUser, false, false); <END> DocumentModel targetContext = getTrashService().getAboveDocument(navigationContext.getCurrentDocument(), info.rootPaths); documentsListsManager.removeFromAllLists(info.docs); Set<DocumentRef> parentRefs; String msgid; switch (op) { case OP_PURGE: getTrashService().purgeDocuments(documentManager, info.rootRefs); parentRefs = info.rootParentRefs; msgid = "n_deleted_docs"; break; case OP_DELETE: getTrashService().trashDocuments(info.docs); parentRefs = info.rootParentRefs; msgid = "n_deleted_docs"; break; case OP_UNDELETE: parentRefs = getTrashService().undeleteDocuments(info.docs); msgid = "n_undeleted_docs"; break; default: throw new AssertionError(op); } if (op == OP_UNDELETE) { targetContext = documentManager.getDocument(new IdRef(targetContext.getId())); } else if (targetContext == null) { targetContext = documentManager.getRootDocument(); } navigationContext.setCurrentDocument(targetContext); if (parentRefs.isEmpty()) { Events.instance().raiseEvent(DOCUMENT_CHILDREN_CHANGED); } else { for (DocumentRef parentRef : parentRefs) { if (documentManager.hasPermission(parentRef, SecurityConstants.READ)) { DocumentModel parent = documentManager.getDocument(parentRef); if (parent != null) { Events.instance().raiseEvent(DOCUMENT_CHILDREN_CHANGED, parent); } } } } if (info.proxies > 0) { facesMessages.add(StatusMessage.Severity.WARN, "can_not_delete_proxies"); } Object[] params = { Integer.valueOf(info.docs.size()) }; facesMessages.add(StatusMessage.Severity.INFO, "#0 " + messages.get(msgid), params); return null; }</code><technical_language>new TrashInfo</technical_language>

Target:
protected String actOnSelection(int op, List<DocumentModel> docs) { if (docs == null) { return null; } TrashInfo info = getTrashService().getTrashInfo(docs, currentUser, false, false); DocumentModel targetContext = getTrashService().getAboveDocument(navigationContext.getCurrentDocument(), info.rootPaths); documentsListsManager.removeFromAllLists(info.docs); Set<DocumentRef> parentRefs; String msgid; switch (op) { case OP_PURGE: getTrashService().purgeDocuments(documentManager, info.rootRefs); parentRefs = info.rootParentRefs; msgid = "n_deleted_docs"; break; case OP_DELETE: getTrashService().trashDocuments(info.docs); parentRefs = info.rootParentRefs; msgid = "n_deleted_docs"; break; case OP_UNDELETE: parentRefs = getTrashService().undeleteDocuments(info.docs); msgid = "n_undeleted_docs"; break; default: throw new AssertionError(op); } if (op == OP_UNDELETE) { targetContext = documentManager.getDocument(new IdRef(targetContext.getId())); } else if (targetContext == null) { targetContext = documentManager.getRootDocument(); } navigationContext.setCurrentDocument(targetContext); if (parentRefs.isEmpty()) { Events.instance().raiseEvent(DOCUMENT_CHILDREN_CHANGED); } else { for (DocumentRef parentRef : parentRefs) { if (documentManager.hasPermission(parentRef, SecurityConstants.READ)) { DocumentModel parent = documentManager.getDocument(parentRef); if (parent != null) { Events.instance().raiseEvent(DOCUMENT_CHILDREN_CHANGED, parent); } } } } if (info.proxies > 0) { facesMessages.add(StatusMessage.Severity.WARN, "can_not_delete_proxies"); } Object[] params = { Integer.valueOf(info.docs.size()) }; facesMessages.add(StatusMessage.Severity.INFO, "#0 " + messages.get(msgid), params); return null; }