示例#1
0
  static byte[] drawLetter(final PhdCandidacyReferee referee, final int count) throws IOException {
    final Page page = new Page();

    page.h2(APPLICATION_NAME);
    page.h(3, "Applicant", "mtop2");

    candidateInformation(referee, page);
    letterInformation(referee, page);

    page.close();
    return page.toByteArray();
  }
示例#2
0
  static byte[] drawCandidatePage(final PhdProgramPublicCandidacyHashCode hashCode)
      throws IOException {
    final String email = hashCode.getEmail().substring(0, hashCode.getEmail().indexOf("@"));
    final Page page = new Page();

    page.h2(APPLICATION_NAME);
    drawPersonalInformation(page, hashCode, email);
    drawPhdIndividualProgramInformation(page, hashCode);
    drawGuidings(page, hashCode);
    drawQualifications(page, hashCode);
    drawCandidacyReferees(page, hashCode, email);
    drawDocuments(page, hashCode, email);
    drawThesisRanking(page, hashCode, email);

    page.close();
    return page.toByteArray();
  }
示例#3
0
  static byte[] exportPresentationPage() throws IOException {
    List<PhdProgramPublicCandidacyHashCode> unfocusAreaCandidates =
        new ArrayList<PhdProgramPublicCandidacyHashCode>();

    final Page page = new Page();
    page.h2(APPLICATION_NAME);

    for (final Entry<PhdProgramFocusArea, Set<PhdProgramPublicCandidacyHashCode>> entry :
        getApplicants(unfocusAreaCandidates).entrySet()) {
      page.h(3, getFocusAreaTitle(entry), "mtop2");

      page.ulStart();
      for (final PhdProgramPublicCandidacyHashCode code : entry.getValue()) {
        final String url =
            APPLICATION_PREFIX_LINK + "/phd/epfl/applications/show?process=" + code.getValue();
        page.liStart().link(url, code.getPerson().getName()).liEnd();
      }
      page.ulEnd();
    }

    page.close();

    return page.toByteArray();
  }