if (executionPeriod.getIdInternal().intValue() >= EXECUTION_PERIOD_ENROLMENT_FENIX) { newRes.add(executionPeriod); } else if (executionPeriod.getBeginDate().after(this.masterDegreeFirstExecutionPeriodDate) && degreeType != null && degreeType.equals(DegreeType.MASTER_DEGREE)) {  newRes.add((executionPeriod)); } } response.setReturnObject(newRes);
if (executionPeriod.getIdInternal().intValue() >= EXECUTION_PERIOD_ENROLMENT_FENIX) { newRes.add(executionPeriod); } else if (executionPeriod.getBeginDate().after(this.masterDegreeFirstExecutionPeriodDate) && degreeType != null && (degreeType.equals(DegreeType.MASTER_DEGREE) || degreeType .equals(DegreeType.BOLONHA_ADVANCED_FORMATION_DIPLOMA))) {  newRes.add((executionPeriod)); } } response.setReturnObject(newRes);
    public void execute(ServiceRequest request, ServiceResponse response) throws Exception {        List serviceResult = (List) response.getReturnObject();        ServiceParameters parameters = request.getServiceParameters();        DegreeType degreeType = (DegreeType) parameters.getParameter(0);        // FIXME: should be replaced with:        // 'parameters.getParameter("degreeType")',        // when the services starts to genereate stubs        List newRes = new ArrayList();        for (Iterator iter = serviceResult.iterator(); iter.hasNext();) {            InfoExecutionPeriod executionPeriod = (InfoExecutionPeriod) iter.next();            if (executionPeriod.getIdInternal().intValue() >= EXECUTION_PERIOD_ENROLMENT_FENIX) {                newRes.add(executionPeriod);            } else if (executionPeriod.getBeginDate().after(this.masterDegreeFirstExecutionPeriodDate)                    && degreeType != null && degreeType.equals(DegreeType.MASTER_DEGREE)) {                // master degree extra execution periods                newRes.add((executionPeriod));            }        }        response.setReturnObject(newRes);    }