@Override /* * * Prepare the beans to choose a person or create a new one */ protected void prepareInformationForBindPersonToCandidacyOperation( HttpServletRequest request, IndividualCandidacyProcess process) { final DegreeCandidacyForGraduatedPersonIndividualProcessBean bean = new DegreeCandidacyForGraduatedPersonIndividualProcessBean( (DegreeCandidacyForGraduatedPersonIndividualProcess) process); bean.setCandidacyProcess(getParentProcess(request)); bean.setChoosePersonBean(new ChoosePersonBean(process.getCandidacy().getPersonalDetails())); bean.setPersonBean(new PersonBean(process.getCandidacy().getPersonalDetails())); request.setAttribute(getIndividualCandidacyProcessBeanName(), bean); }
protected List<Activity> getAllowedActivities(final IndividualCandidacyProcess process) { List<Activity> activities = process.getAllowedActivities(AccessControl.getUserView()); ArrayList<Activity> resultActivities = new ArrayList<Activity>(); for (Activity activity : activities) { if (activity.isVisibleForAdminOffice()) { resultActivities.add(activity); } } return resultActivities; }
@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; }