}
private void checkParameters(final RegistrationAcademicServiceRequestCreateBean bean) {
final Registration registration = bean.getRegistration();
final ExecutionYear executionYear = bean.getExecutionYear();
final Enrolment enrolment = bean.getEnrolment();
if (executionYear == null) {
throw new DomainException("error.ExtraExamRequest.executionYear.cannot.be.null");
}
if (!registration.hasEnrolments(enrolment)) {
throw new DomainException("error.ExtraExamRequest.registration.doesnot.have.enrolment");
}
if (!studentHasValidStatutes(registration, enrolment)) {
throw new DomainException("error.ExtraExamRequest.registration.doesnot.have.valid.statutes");
}
if (registrationAlreadyHasRequest(registration, enrolment, executionYear)) {
throw new DomainException("error.ExtraExamRequest.registration.already.has.same.request", enrolment.getName()
.getContent(), executionYear.getYear());
}
}