public ActionForward cancelJob(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response) {
    QueueJob job = getDomainObject(request, "queueJobId");
    job.cancel();

    return list(mapping, form, request, response);
  }
示例#2
0
 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;
 }
示例#3
0
 private void resendJob(HttpServletRequest request) {
   QueueJob job = getDomainObject(request, "id");
   job.resend();
 }
示例#4
0
 private void cancelQueuedJob(HttpServletRequest request) {
   QueueJob job = getDomainObject(request, "id");
   job.cancel();
 }
示例#5
0
 public List<QueueJob> getLatestJobs() {
   return QueueJob.getAllJobsForClassOrSubClass(GepReportFile.class, 5);
 }