}
CandidacyProcess candidacyProcess = getCurrentOpenParentProcess();
String hash = request.getParameter("hash");
DegreeOfficePublicCandidacyHashCode candidacyHashCode =
(DegreeOfficePublicCandidacyHashCode) PublicCandidacyHashCode.getPublicCandidacyCodeByHash(hash);
if (candidacyHashCode == null) {
return mapping.findForward("open-candidacy-processes-not-found");
}
if (candidacyHashCode.getIndividualCandidacyProcess() != null
&& candidacyHashCode.getIndividualCandidacyProcess().getCandidacyProcess() == candidacyProcess) {
request.setAttribute("individualCandidacyProcess", candidacyHashCode.getIndividualCandidacyProcess());
return viewCandidacy(mapping, form, request, response);
} else if (candidacyHashCode.getIndividualCandidacyProcess() != null
&& candidacyHashCode.getIndividualCandidacyProcess().getCandidacyProcess() != candidacyProcess) {
return mapping.findForward("open-candidacy-processes-not-found");
}
DegreeCandidacyForGraduatedPersonIndividualProcessBean bean =
new DegreeCandidacyForGraduatedPersonIndividualProcessBean();
bean.setPrecedentDegreeInformation(new PrecedentDegreeInformationBean());
bean.setPersonBean(new PersonBean());
bean.setCandidacyProcess(candidacyProcess);
bean.setPublicCandidacyHashCode(candidacyHashCode);
request.setAttribute(getIndividualCandidacyProcessBeanName(), bean);
bean.getPersonBean().setEmail(candidacyHashCode.getEmail());
return mapping.findForward("show-candidacy-creation-page");
}