/** * Return the InProgressSubmission, either workspaceItem or workflowItem, * depending on the id provided. If the id begins with an S then it is a * considered a workspaceItem. If the id begins with a W then it is * considered a workflowItem. * * @param context * @param inProgressSubmissionID * @return The InprogressSubmission or null if non found */ public static InProgressSubmission findSubmission(Context context, String inProgressSubmissionID) throws SQLException, AuthorizeException, IOException { char type = inProgressSubmissionID.charAt(0); int id = Integer.valueOf(inProgressSubmissionID.substring(1)); if (type == 'S') { return WorkspaceItem.find(context, id); } else if (type == 'W') { return WorkflowItem.find(context, id); } else if (type == 'X') { return XmlWorkflowItem.find(context, id); } return null; }
/** * Confirms the removal of a supervision order * * @param context the context of the request * @param request the servlet request * @param response the servlet response */ private void showConfirmRemovePage(Context context, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException, AuthorizeException { // get the values from the request int wsItemID = UIUtil.getIntParameter(request,"siID"); int groupID = UIUtil.getIntParameter(request,"gID"); // get the workspace item and the group from the request values WorkspaceItem wsItem = WorkspaceItem.find(context, wsItemID); Group group = Group.find(context, groupID); // set the attributes for the JSP request.setAttribute("wsItem",wsItem); request.setAttribute("group", group); JSPManager.showJSP(request, response, "/dspace-admin/supervise-confirm-remove.jsp" ); }
WorkspaceItem wsItem = WorkspaceItem.find(c, wsItemID); Item item = wsItem.getItem();
WorkspaceItem wsItem = WorkspaceItem.find(context, wsItemID);
WorkspaceItem workspaceItem = WorkspaceItem.find(context, Integer.valueOf(workspaceID)); workspaceItem.deleteAll();
workspaceItem = WorkspaceItem.find(context, wsID);
workspaceItem = WorkspaceItem.find(context, wsID);
"workspace_item_id"); info = SubmissionInfo.load(request, WorkspaceItem.find(context, workspaceID));
WorkspaceItem wi = WorkspaceItem.find(context, Integer .parseInt(workspaceID));