addActionMessage("individualCandidacyMessages", request, getProcessType().getSimpleName()
+ ".error.public.candidacies.fill.personal.information.and.institution.id.person.already.exist");
return executeCreateCandidacyPersonalInformationInvalid(mapping, form, request, response);
}
final Person person = persons.size() == 1 ? persons.iterator().next() : null;
// check if person already exists
if (person != null) {
if (isPersonStudentAndNumberIsCorrect(person, bean.getPersonNumber())) {
if (!person.getDateOfBirthYearMonthDay().equals(personBean.getDateOfBirth())) {
// found person with diff date
addActionMessage("individualCandidacyMessages", request, getProcessType().getSimpleName()
+ ".error.public.candidacies.fill.personal.information.and.institution.id.birth");
return executeCreateCandidacyPersonalInformationInvalid(mapping, form, request, response);
} else if (!StringUtils.isEmpty(personBean.getSocialSecurityNumber())
&& !StringUtils.isEmpty(person.getSocialSecurityNumber())
&& !person.getSocialSecurityNumber().equals(personBean.getSocialSecurityNumber())) {
// found person with diff social security number
addActionMessage("individualCandidacyMessages", request, getProcessType().getSimpleName()
+ ".error.public.candidacies.fill.personal.information.and.institution.id.contributorNumber");
return executeCreateCandidacyPersonalInformationInvalid(mapping, form, request, response);
} else {