@Service
 public static Boolean run(
     Person person, ExecutionYear executionYear, final List executionCourseResponsabilities)
     throws MaxResponsibleForExceed, InvalidCategory, NotAuthorizedException {
   AbstractModifyProfessorshipWithPerson.run(person);
   person.updateResponsabilitiesFor(
       executionYear.getIdInternal(), executionCourseResponsabilities);
   return true;
 }
示例#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;
 }