@Override public List<String> getDeleteConstraints(Context context, EPerson ePerson) throws SQLException { List<String> tableList = new ArrayList<String>(); // check for eperson in item table Iterator<Item> itemsBySubmitter = itemService.findBySubmitter(context, ePerson); if (itemsBySubmitter.hasNext()) { tableList.add("item"); } WorkflowService workflowService = WorkflowServiceFactory.getInstance().getWorkflowService(); List<String> workflowConstraints = workflowService.getEPersonDeleteConstraints(context, ePerson); tableList.addAll(workflowConstraints); // the list of tables can be used to construct an error message // explaining to the user why the eperson cannot be deleted. return tableList; }
.findBySubmitter(sc.getContext(), person); while (items.hasNext()) { Item item = items.next();