Examples of PhdIndividualProgramProcess


Examples of org.fenixedu.academic.domain.phd.PhdIndividualProgramProcess

        return mapping.findForward("viewRequest");
    }

    public ActionForward prepareCreateNewRequest(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        PhdIndividualProgramProcess process = getPhdIndividualProgramProcess(request);
        PhdAcademicServiceRequestCreateBean academicServiceRequestCreateBean = new PhdAcademicServiceRequestCreateBean(process);

        request.setAttribute("phdAcademicServiceRequestCreateBean", academicServiceRequestCreateBean);

        return mapping.findForward("prepareCreateNewRequest");
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.PhdIndividualProgramProcess

    }

    private static void drawThesisRanking(Page page, PhdProgramPublicCandidacyHashCode hashCode, String email) throws IOException {

        page.h(3, "Thesis Rank", "mtop2");
        final PhdIndividualProgramProcess process = hashCode.getIndividualProgramProcess();

        page.tableStart("tstyle2");

        page.rowStart();
        page.header("Rank");
        page.header("Name");
        page.header("Teacher");
        page.header("Description");
        page.rowEnd();

        Collection<ThesisSubjectOrder> thesisSubjectOrders = process.getThesisSubjectOrdersSorted();

        for (ThesisSubjectOrder thesisSubjectOrder : thesisSubjectOrders) {
            page.rowStart();
            page.column(thesisSubjectOrder.getSubjectOrder().toString());
            page.column(thesisSubjectOrder.getThesisSubject().getName().getContent());
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.PhdIndividualProgramProcess

        return outputStream.toByteArray();
    }

    private static void drawCandidacyReferees(final Page page, final PhdProgramPublicCandidacyHashCode hashCode,
            final String folderName) throws IOException {
        final PhdIndividualProgramProcess process = hashCode.getIndividualProgramProcess();
        page.h(3, "Reference letters (referees)", "mtop2");

        if (!process.getPhdCandidacyReferees().isEmpty()) {
            int count = 1;
            for (final PhdCandidacyReferee referee : process.getPhdCandidacyReferees()) {
                page.pStart("mbottom0").strong(String.valueOf(count) + ". ").pEnd();
                drawReferee(page, referee, count, folderName);
                count++;
            }
        } else {
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.PhdIndividualProgramProcess

                        && event.isOpen()) {
                    throw new DomainException("already.has.phd.gratuity.for.that.year");
                }
            }

            PhdIndividualProgramProcess process = getProcess(request);

            TreeSet<PhdProgramProcessState> orderdStates =
                    new TreeSet<PhdProgramProcessState>(new Comparator<PhdProgramProcessState>() {

                        @Override
                        public int compare(PhdProgramProcessState o1, PhdProgramProcessState o2) {
                            return o1.getStateDate().compareTo(o2.getStateDate());
                        }
                    });

            orderdStates.addAll(process.getStates());

            int lastOpenYear = new DateTime().getYear();

            int year = renderedObject.getYear();
            boolean yearWithinWorkingDevelopmentPeriod = false;
            for (PhdProgramProcessState state : process.getStates()) {
                if (state.getType().equals(PhdIndividualProgramProcessState.WORK_DEVELOPMENT)) {
                    if (state.getStateDate().getYear() <= year && year <= lastOpenYear) {
                        yearWithinWorkingDevelopmentPeriod = true;
                        break;
                    }
                }
                lastOpenYear = state.getStateDate().getYear();

            }
            if (!yearWithinWorkingDevelopmentPeriod) {
                throw new FenixActionException("error.chosen.year.not.within.working.period");
            }

            PhdGratuityEvent.create(getProcess(request), year, process.getWhenFormalizedRegistration().toDateTimeAtMidnight());

            return prepare(mapping, actionForm, request, response);

        } catch (DomainException e) {
            addErrorMessage(request, e.getMessage(), e.getArgs());
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.PhdIndividualProgramProcess

            HttpServletResponse response) {

        try {

            final AccountingEventCreateBean bean = getRenderedObject("eventBean");
            final PhdIndividualProgramProcess process = getProcess(request);

            if (process.getExecutionYear().isAfter(bean.getExecutionYear())) {
                addActionMessage("error", request, "error.phd.accounting.events.insurance.invalid.execution.period", process
                        .getExecutionYear().getQualifiedName());
                return prepareCreateInsuranceEvent(mapping, actionForm, request, response);
            }

            final InvocationResult result =
                    new AccountingEventsManager().createInsuranceEvent(process.getPerson(), bean.getExecutionYear());

            if (result.isSuccess()) {
                addActionMessage("success", request, "message.phd.accounting.events.insurance.created.with.success");
                return prepare(mapping, actionForm, request, response);
            } else {
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.PhdIndividualProgramProcess

        request.setAttribute("thesisProcessBean", bean);
        return mapping.findForward("scheduleThesisMeeting");
    }

    private void setDefaultMeetingMailInformation(final PhdThesisProcessBean bean, final PhdThesisProcess thesisProcess) {
        final PhdIndividualProgramProcess process = thesisProcess.getIndividualProgramProcess();
        bean.setMailSubject(AlertService
                .getSubjectPrefixed(process, "message.phd.thesis.schedule.thesis.meeting.default.subject"));
        bean.setMailBody(AlertService.getBodyText(process, "message.phd.thesis.schedule.thesis.meeting.default.body"));
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.PhdIndividualProgramProcess

                .column(referee.getPhdProgramCandidacyProcess().getPerson().getName()).rowEnd();
        page.tableEnd();
    }

    private static void drawQualifications(final Page page, final PhdProgramPublicCandidacyHashCode hashCode) throws IOException {
        final PhdIndividualProgramProcess process = hashCode.getIndividualProgramProcess();
        page.h(3, "Academic Degrees", "mtop2");

        if (!process.getQualifications().isEmpty()) {
            int count = 1;
            for (final Qualification qualification : process.getQualifications()) {
                page.pStart("mbottom0").strong(String.valueOf(count) + ". ").pEnd();
                drawQualification(page, qualification);
                count++;
            }
        } else {
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.PhdIndividualProgramProcess

        }
        page.tableEnd();
    }

    private static void drawGuidings(final Page page, final PhdProgramPublicCandidacyHashCode hashCode) throws IOException {
        final PhdIndividualProgramProcess process = hashCode.getIndividualProgramProcess();
        page.h(3, "Phd supervisors (if applicable)", "mtop2");

        if (!process.getGuidingsSet().isEmpty()) {
            int count = 1;
            for (final PhdParticipant guiding : process.getGuidingsSet()) {
                page.pStart("mbottom0").strong(String.valueOf(count) + ". ").pEnd();
                drawGuiding(page, guiding);
                count++;
            }
        } else {
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.PhdIndividualProgramProcess

                .getParameter("processId"));
    }

    public ActionForward viewDebtsForProcess(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        PhdIndividualProgramProcess process = getProcess(request);
        ArrayList<PhdGratuityExternalScholarshipExemption> list = new ArrayList<PhdGratuityExternalScholarshipExemption>();

        for (Event event : process.getPerson().getEventsSet()) {
            if (event instanceof PhdGratuityEvent) {
                for (Exemption exemption : event.getExemptionsSet()) {
                    if (exemption instanceof PhdGratuityExternalScholarshipExemption) {
                        PhdGratuityExternalScholarshipExemption phdExemption =
                                (PhdGratuityExternalScholarshipExemption) exemption;
                        list.add(phdExemption);
                    }
                }
            }
        }

        request.setAttribute("person", process.getPerson());
        request.setAttribute("debts", list);
        return mapping.findForward("selectPhdStudent");
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.PhdIndividualProgramProcess

        List<EntryDTO> list = new ArrayList<EntryDTO>();
        list.add(new EntryDTO(EntryType.EXTERNAL_SCOLARSHIP_PAYMENT, event, bean.getValue()));
        event.process(Authenticate.getUser(), list, new AccountingTransactionDetailDTO(bean.getPaymentDate(), PaymentMode.CASH));

        PhdGratuityEvent gratuityEvent = (PhdGratuityEvent) exemption.getEvent();
        PhdIndividualProgramProcess process = gratuityEvent.getPhdIndividualProgramProcess();
        request.setAttribute("processId", process.getExternalId());

        return viewDebtsForProcess(mapping, form, request, response);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.