コード例 #1
0
  private Spreadsheet buildReport(
      final Degree degree, final SortedSet<SecondCycleIndividualCandidacyProcess> name) {
    final Spreadsheet spreadsheet = new Spreadsheet(degree.getSigla(), getHeader());

    for (final SecondCycleIndividualCandidacyProcess process : name) {
      if (!process.canExecuteActivity(Authenticate.getUser())) {
        continue;
      }
      final Row row = spreadsheet.addRow();
      row.setCell(process.getPersonalDetails().getName());
      row.setCell(process.getPrecedentDegreeInformation().getConclusionGrade());
      row.setCell(process.getCandidacyProfessionalExperience());
      row.setCell(process.getPrecedentDegreeInformation().getDegreeAndInstitutionName());
      row.setCell(process.getCandidacyAffinity());
      row.setCell(process.getCandidacyDegreeNature());
      row.setCell(process.getCandidacyGrade());
      row.setCell(
          process.getCandidacyInterviewGrade() != null
              ? process.getCandidacyInterviewGrade()
              : " ");
      row.setCell(process.getCandidacySeriesGrade());
      if (process.isCandidacyAccepted() || process.isCandidacyRejected()) {
        row.setCell(
            BundleUtil.getString(
                Bundle.ENUMERATION, process.getCandidacyState().getQualifiedName()));
      } else {
        row.setCell(" ");
      }
    }

    return spreadsheet;
  }
コード例 #2
0
  @Override
  protected Spreadsheet buildIndividualCandidacyReport(
      final Spreadsheet spreadsheet, final IndividualCandidacyProcess individualCandidacyProcess) {
    SecondCycleIndividualCandidacyProcess secondCycleIndividualCandidacyProcess =
        (SecondCycleIndividualCandidacyProcess) individualCandidacyProcess;

    final Row row = spreadsheet.addRow();
    row.setCell(secondCycleIndividualCandidacyProcess.getProcessCode());
    row.setCell(secondCycleIndividualCandidacyProcess.getPersonalDetails().getName());
    row.setCell(
        secondCycleIndividualCandidacyProcess
            .getPersonalDetails()
            .getIdDocumentType()
            .getLocalizedName());
    row.setCell(secondCycleIndividualCandidacyProcess.getPersonalDetails().getDocumentIdNumber());

    row.setCell(
        secondCycleIndividualCandidacyProcess.getPersonalDetails().getCountry() != null
            ? secondCycleIndividualCandidacyProcess
                .getPersonalDetails()
                .getCountry()
                .getCountryNationality()
                .getContent()
            : "");

    row.setCell(
        secondCycleIndividualCandidacyProcess
            .getPrecedentDegreeInformation()
            .getDegreeAndInstitutionName());
    row.setCell(
        secondCycleIndividualCandidacyProcess
            .getPrecedentDegreeInformation()
            .getDegreeDesignation());
    row.setCell(
        secondCycleIndividualCandidacyProcess.getPrecedentDegreeInformation().getConclusionDate()
                != null
            ? secondCycleIndividualCandidacyProcess
                .getPrecedentDegreeInformation()
                .getConclusionDate()
                .toString(dateFormat)
            : "");
    row.setCell(
        secondCycleIndividualCandidacyProcess.getPrecedentDegreeInformation().getConclusionGrade());

    StringBuilder degreesSb = new StringBuilder();
    for (Degree degree :
        secondCycleIndividualCandidacyProcess.getCandidacy().getSelectedDegreesSet()) {
      degreesSb.append(degree.getName()).append("\n");
    }

    row.setCell(degreesSb.toString());
    row.setCell(
        BundleUtil.getString(
            Bundle.ENUMERATION, individualCandidacyProcess.getCandidacyState().getQualifiedName()));
    row.setCell(
        BundleUtil.getString(
            Bundle.CANDIDATE,
            secondCycleIndividualCandidacyProcess.getProcessChecked() != null
                    && secondCycleIndividualCandidacyProcess.getProcessChecked()
                ? MESSAGE_YES
                : MESSAGE_NO));
    row.setCell(secondCycleIndividualCandidacyProcess.getCandidacyNotes());
    return spreadsheet;
  }