ActionForward actionForwardError = verifySubmissionPreconditions(mapping);
if (actionForwardError != null) {
return actionForwardError;
}
DegreeCandidacyForGraduatedPersonIndividualProcessBean bean =
(DegreeCandidacyForGraduatedPersonIndividualProcessBean) getIndividualCandidacyProcessBean();
bean.setInternalPersonCandidacy(Boolean.TRUE);
boolean isValid = hasInvalidViewState();
if (!isValid) {
invalidateDocumentFileRelatedViewStates();
request.setAttribute(getIndividualCandidacyProcessBeanName(), getIndividualCandidacyProcessBean());
return mapping.findForward("candidacy-continue-creation");
}
List<Degree> degreeList = new ArrayList<Degree>();
degreeList.add(bean.getSelectedDegree());
if (candidacyIndividualProcessExistsForThisEmail(bean.getPersonBean().getEmail(), degreeList)) {
addActionMessage("error", request, "error.candidacy.hash.code.already.bounded");
invalidateDocumentFileRelatedViewStates();
request.setAttribute(getIndividualCandidacyProcessBeanName(), getIndividualCandidacyProcessBean());
return mapping.findForward("candidacy-continue-creation");
}
if (!bean.getHonorAgreement()) {
addActionMessage("error", request, "error.must.agree.on.declaration.of.honor");
invalidateDocumentFileRelatedViewStates();
request.setAttribute(getIndividualCandidacyProcessBeanName(), getIndividualCandidacyProcessBean());
return mapping.findForward("candidacy-continue-creation");
}