Ejemplo n.º 1
0
  @Override
  protected PhdProgramCandidacyProcess executeActivity(
      PhdProgramCandidacyProcess process, User userView, Object object) {
    final PhdProgramCandidacyProcessStateBean bean = (PhdProgramCandidacyProcessStateBean) object;
    process.createState(
        PhdProgramCandidacyProcessState.REJECTED, userView.getPerson(), bean.getRemarks());

    AlertService.alertAcademicOffice(
        process.getIndividualProgramProcess(),
        AcademicOperationType.VIEW_PHD_CANDIDACY_ALERTS,
        "message.phd.alert.candidacy.reject.subject",
        "message.phd.alert.candidacy.reject.body");

    return process;
  }
Ejemplo n.º 2
0
  @Override
  protected void fillReport() {

    final PhdProgramCandidacyProcess candidacyProcess = getNotification().getCandidacyProcess();
    final Person person = candidacyProcess.getPerson();
    final PhdIndividualProgramProcess individualProgramProcess =
        candidacyProcess.getIndividualProgramProcess();

    addParameter(
        "administrativeOfficeCoordinator",
        individualProgramProcess
            .getPhdProgram()
            .getAdministrativeOffice()
            .getUnit()
            .getActiveUnitCoordinator()
            .getFirstAndLastName());

    addParameter("name", person.getName());
    addParameter("address", person.getAddress());
    addParameter("areaCode", person.getAreaCode());
    addParameter("areaOfAreaCode", person.getAreaOfAreaCode());
    addParameter(
        "programName",
        individualProgramProcess.getPhdProgram().getName().getContent(getLanguage()));

    addParameter("processNumber", individualProgramProcess.getProcessNumber());

    final LocalDate whenRatified = candidacyProcess.getWhenRatified();

    addParameter(
        "ratificationDate", whenRatified != null ? whenRatified.toString(getDateFormat()) : "");

    addParameter("insuranceFee", getInsuranceFee(individualProgramProcess));
    addParameter("registrationFee", getRegistrationFee(individualProgramProcess, whenRatified));

    addParameter("date", new LocalDate().toString(getDateFormat()));
    addParameter("notificationNumber", getNotification().getNotificationNumber());

    addGuidingsParameter(individualProgramProcess);
  }
Ejemplo n.º 3
0
  @Override
  protected PhdProgramCandidacyProcess executeActivity(
      PhdProgramCandidacyProcess process, User userView, Object object) {

    final PhdIndividualProgramProcess mainProcess = process.getIndividualProgramProcess();
    if (mainProcess.getPhdProgram() == null) {
      throw new DomainException(
          "error.phd.candidacy.PhdProgramCandidacyProcess.RequestCandidacyReview.invalid.phd.program");
    }

    final PhdProgramCandidacyProcessStateBean bean = (PhdProgramCandidacyProcessStateBean) object;
    process.createState(
        PhdProgramCandidacyProcessState.PENDING_FOR_COORDINATOR_OPINION,
        userView.getPerson(),
        bean.getRemarks());

    if (bean.getGenerateAlert()) {
      AlertService.alertCoordinators(mainProcess, subject(), body(mainProcess));
    }

    return process;
  }