@Override
 protected final void checkParameters(final DocumentRequestCreateBean bean) {
   if (bean.getMobilityProgram() != null && bean.isIgnoreExternalEntries()) {
     throw new DomainException(
         "ApprovementCertificateRequest.cannot.ignore.external.entries.within.a.mobility.program");
   }
 }
  public ApprovementCertificateRequest(final DocumentRequestCreateBean bean) {
    this();
    super.init(bean);

    checkParameters(bean);
    super.setMobilityProgram(bean.getMobilityProgram());
    super.setIgnoreExternalEntries(bean.isIgnoreExternalEntries());
    super.setIgnoreCurriculumInAdvance(bean.isIgnoreCurriculumInAdvance());

    // TODO: remove this after DEA diplomas and certificates
    if (!isDEARegistration()) {

      if (getRegistration().isConcluded()) {
        throw new DomainException("ApprovementCertificateRequest.registration.is.concluded");
      }

      if (getRegistration().isRegistrationConclusionProcessed()) {
        throw new DomainException(
            "ApprovementCertificateRequest.registration.has.conclusion.processed");
      }
    }

    if (getEntriesToReport(isDEARegistration()).isEmpty()) {
      throw new DomainException("ApprovementCertificateRequest.registration.without.approvements");
    }
  }