Object argsMasterDegreeProofVersion[] = { infoStudentCurricularPlan };
Object argsMasterDegreeProofVersion[] = { infoStudentCurricularPlan.getIdInternal() };
    public ActionForward getStudentAndMasterDegreeProofVersion(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws Exception {        IUserView userView = SessionUtils.getUserView(request);        String degreeType = request.getParameter("degreeType");        Integer studentNumber = Integer.valueOf(request.getParameter("studentNumber"));        MasterDegreeThesisOperations operations = new MasterDegreeThesisOperations();        ActionErrors actionErrors = new ActionErrors();        boolean isSuccess = operations.getStudentByNumberAndDegreeType(form, request, actionErrors);        if (isSuccess == false) {            throw new NonExistingActionException("error.exception.masterDegree.nonExistentStudent",                    mapping.findForward("error"));        }        InfoStudentCurricularPlan infoStudentCurricularPlan = readStudentCurricularPlan(mapping,                userView, degreeType, studentNumber);        InfoMasterDegreeThesisDataVersion infoMasterDegreeThesisDataVersion = readMasterDegreeThesisDataVersion(                mapping, userView, infoStudentCurricularPlan);        putMasterDegreeThesisDataInRequest(request, infoMasterDegreeThesisDataVersion);        //check if gratuity situation is Ok        List infoGratuitySituations = null;        Object args[] = { infoStudentCurricularPlan.getIdInternal() };        try {            infoGratuitySituations = (List) ServiceUtils.executeService(userView,                    "ReadGratuitySituationListByStudentCurricularPlan", args);        } catch (FenixServiceException e) {            throw new FenixActionException(e);        }        InfoGratuitySituation infoGratuitySituation = null;        for (Iterator iter = infoGratuitySituations.iterator(); iter.hasNext();) {            infoGratuitySituation = (InfoGratuitySituation) iter.next();            if (infoGratuitySituation.getRemainingValue().doubleValue() > 0) {                throw new GratuitySituationNotRegularizedActionException(                        "error.exception.masterDegree.gratuityNotRegularized", mapping                                .findForward("errorGratuityNotRegularized"));            }        }        /* * * get master degree proof * * */        InfoMasterDegreeProofVersion infoMasterDegreeProofVersion = null;        Object argsMasterDegreeProofVersion[] = { infoStudentCurricularPlan };        try {            infoMasterDegreeProofVersion = (InfoMasterDegreeProofVersion) ServiceUtils.executeService(                    userView, "ReadActiveMasterDegreeProofVersionByStudentCurricularPlan",                    argsMasterDegreeProofVersion);        } catch (NonExistingServiceException e) {            DynaActionForm changeMasterDegreeThesisForm = (DynaActionForm) form;            prepareFormForNewMasterDegreeProofVersion(degreeType, studentNumber,                    infoMasterDegreeThesisDataVersion, changeMasterDegreeThesisForm);            return mapping.findForward("start");        } catch (ScholarshipNotFinishedServiceException e) {            throw new ScholarshipNotFinishedActionException(                    "error.exception.masterDegree.scholarshipNotFinished", mapping                            .findForward("errorScholarshipNotFinished"));        } catch (FenixServiceException e) {            throw new FenixActionException(e);        }        if (infoMasterDegreeProofVersion.getInfoJuries().isEmpty() == false)            request.setAttribute(SessionConstants.JURIES_LIST, infoMasterDegreeProofVersion                    .getInfoJuries());        if (infoMasterDegreeProofVersion.getInfoExternalJuries().isEmpty() == false)            request.setAttribute(SessionConstants.EXTERNAL_JURIES_LIST, infoMasterDegreeProofVersion                    .getInfoExternalJuries());        String proofDateDay = null;        String proofDateMonth = null;        String proofDateYear = null;        Date proofDate = infoMasterDegreeProofVersion.getProofDate();        if (proofDate != null) {            Calendar proofDateCalendar = new GregorianCalendar();            proofDateCalendar.setTime(proofDate);            proofDateDay = (new Integer(proofDateCalendar.get(Calendar.DAY_OF_MONTH))).toString();            proofDateMonth = (new Integer(proofDateCalendar.get(Calendar.MONTH))).toString();            proofDateYear = (new Integer(proofDateCalendar.get(Calendar.YEAR))).toString();        }        String thesisDeliveryDateDay = null;        String thesisDeliveryDateMonth = null;        String thesisDeliveryDateYear = null;        Date thesisDeliveryDate = infoMasterDegreeProofVersion.getThesisDeliveryDate();        if (thesisDeliveryDate != null) {            Calendar thesisDeliveryDateCalendar = new GregorianCalendar();            thesisDeliveryDateCalendar.setTime(thesisDeliveryDate);            thesisDeliveryDateDay = new Integer(thesisDeliveryDateCalendar.get(Calendar.DAY_OF_MONTH))                    .toString();            thesisDeliveryDateMonth = new Integer(thesisDeliveryDateCalendar.get(Calendar.MONTH))                    .toString();            thesisDeliveryDateYear = new Integer(thesisDeliveryDateCalendar.get(Calendar.YEAR))                    .toString();        }        prepareFormForMasterDegreeProofEdition(form, degreeType, studentNumber,                infoMasterDegreeProofVersion, infoMasterDegreeThesisDataVersion, proofDateDay,                proofDateMonth, proofDateYear, thesisDeliveryDateDay, thesisDeliveryDateMonth,                thesisDeliveryDateYear);        return mapping.findForward("start");    }