if (username == null) {
throw new FenixServiceException("nullUsername");
}
final Person person = Person.readPersonByUsername(username);
ExecutionDegree executionDegree = FenixFramework.getDomainObject(executionDegreeCode);
ExecutionYear executionYear = executionDegree.getExecutionYear();
CurricularCourse curricularCourse = (CurricularCourse) FenixFramework.getDomainObject(curricularCourseCode);
if (curricularCourse == null) {
throw new NonExistingServiceException();
}
// if user is coordinator and is the current coordinator and
// curricular course is not basic
// coordinator can edit
Coordinator coordinator = executionDegree.getCoordinatorByTeacher(person);
result =
Boolean.valueOf((coordinator != null) && executionYear.isCurrent()
&& curricularCourse.getBasic().equals(Boolean.FALSE));
return result;