if (studentCurricularPlan != null) {     try { return executeServiceLogics(studentCurricularPlan); } catch (IllegalArgumentException e) { throw new FenixServiceException("degree"); }     } else { throw new ExistingServiceException("studentCurricularPlan"); } } else { throw new ExistingServiceException("student"); } } catch (ExcepcaoPersistencia e) { e.printStackTrace(); throw new FenixServiceException(e); } }
if (studentCurricularPlan != null) {  try { List curricularCourses2Enroll = (List) CollectionUtils .collect(studentCurricularPlan .getCurricularCoursesToEnroll(null, EnrollmentRuleType.TOTAL), new Transformer() {  public Object transform(Object arg0) { ICurricularCourse curricularCourse = (ICurricularCourse) arg0;  return new CurricularCourse2Enroll( curricularCourse, CurricularCourseEnrollmentType.TEMPORARY); } });  InfoStudentEnrolmentContext infoStudentEnrolmentContext = new InfoStudentEnrolmentContext(); infoStudentEnrolmentContext.setCurricularCourses2Enroll((List) CollectionUtils.collect(curricularCourses2Enroll,new Transformer() {  public Object transform(Object arg0) {  return InfoCurricularCourse2EnrollWithInfoCurricularCourse.newInfoFromDomain((CurricularCourse2Enroll) arg0); }}));  return executeServiceLogics(studentCurricularPlan); } catch (IllegalArgumentException e) { throw new FenixServiceException("degree"); }  } else { throw new ExistingServiceException("studentCurricularPlan"); } } else { throw new ExistingServiceException("student"); } } catch (ExcepcaoPersistencia e) {  throw new FenixServiceException(e); } }
	public InfoStudentEnrolmentContext run(Integer executionDegreeId, Integer studentCurricularPlanId, Integer studentNumber) throws FenixServiceException	{		try		{			IStudent student = getStudent(studentNumber);			if (student != null)			{				IStudentCurricularPlan studentCurricularPlan = getStudentCurricularPlan(student);				if (studentCurricularPlan != null)				{//					IEnrolmentPeriod enrolmentPeriod = getEnrolmentPeriod(studentCurricularPlan);//					IExecutionPeriod executionPeriod = getCurrentExecutionPeriod();//					if (executionPeriod.equals(enrolmentPeriod.getExecutionPeriod()))//					{						try						{							return executeServiceLogics(studentCurricularPlan);						}						catch (IllegalArgumentException e)						{							throw new FenixServiceException("degree");						}//					} else//					{//						throw new FenixServiceException("enrolmentPeriod");//					}				}				else				{					throw new ExistingServiceException("studentCurricularPlan");				}			}			else			{				throw new ExistingServiceException("student");			}		}		catch (ExcepcaoPersistencia e)		{			e.printStackTrace();			throw new FenixServiceException(e);		}	}