public ActionForward cancelJob( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { QueueJob job = getDomainObject(request, "queueJobId"); job.cancel(); return list(mapping, form, request, response); }
private boolean isRepeatedJob(Person person, HttpServletRequest request, Class aClass) { final DegreeType degreeType = getDegreeType(request); request.setAttribute("degreeType", degreeType); final ExecutionYear executionYear = getExecutionYear(request); request.setAttribute( "executionYearID", (executionYear == null) ? null : executionYear.getIdInternal()); final String fileType = getFileType(request); for (QueueJob queueJob : QueueJob.getAllJobsForClassOrSubClass(GepReportFile.class, 5)) { GepReportFile gepReportFile = (GepReportFile) queueJob; if ((gepReportFile.getPerson() == person) && (gepReportFile.getClass() == aClass) && (!gepReportFile.getDone()) && (gepReportFile.getExecutionYear() == executionYear) && (gepReportFile.getDegreeType() == degreeType) && (fileType.equals(gepReportFile.getType()))) { return true; } } return false; }
private void resendJob(HttpServletRequest request) { QueueJob job = getDomainObject(request, "id"); job.resend(); }
private void cancelQueuedJob(HttpServletRequest request) { QueueJob job = getDomainObject(request, "id"); job.cancel(); }
public List<QueueJob> getLatestJobs() { return QueueJob.getAllJobsForClassOrSubClass(GepReportFile.class, 5); }