if (chosenDocumentRequestType == DocumentRequestType.SCHOOL_REGISTRATION_DECLARATION || chosenDocumentRequestType == DocumentRequestType.ENROLMENT_DECLARATION) {  final ExecutionYear currentExecutionYear = ExecutionYear.readCurrentExecutionYear(); if (getRegistration().getActiveStudentCurricularPlan().hasAnyEnrolmentForExecutionYear( currentExecutionYear)) { return currentExecutionYear; } throw new DomainException("error.no.enrolments.for.current.year"); }
    public ExecutionYear getExecutionYear() {	if (chosenDocumentRequestType == DocumentRequestType.SCHOOL_REGISTRATION_DECLARATION		|| chosenDocumentRequestType == DocumentRequestType.ENROLMENT_DECLARATION) {	    final ExecutionYear currentExecutionYear = ExecutionYear.readCurrentExecutionYear();	    if (getRegistration().getActiveStudentCurricularPlan().hasAnyEnrolmentForExecutionYear(		    currentExecutionYear)) {		return currentExecutionYear;	    }	    throw new DomainException("error.no.enrolments.for.current.year");	}	return (this.executionYear != null) ? this.executionYear.getObject() : null;    }