Package org.fenixedu.academic.domain.period

Examples of org.fenixedu.academic.domain.period.MobilityApplicationPeriod


        }

        @Override
        protected MobilityIndividualApplicationProcess executeActivity(MobilityIndividualApplicationProcess process,
                User userView, Object object) {
            MobilityApplicationPeriod candidacyPeriod =
                    (MobilityApplicationPeriod) process.getCandidacyProcess().getCandidacyPeriod();

            MobilityEmailTemplate emailTemplateFor =
                    candidacyPeriod.getEmailTemplateFor(process.getMobilityProgram(),
                            MobilityEmailTemplateType.CANDIDATE_ACCEPTED);

            emailTemplateFor.sendEmailFor(process.getCandidacyHashCode());

            new ApprovedLearningAgreementExecutedAction(process.getCandidacy().getMostRecentApprovedLearningAgreement(),
View Full Code Here


        @Override
        protected MobilityIndividualApplicationProcess executeActivity(MobilityIndividualApplicationProcess process,
                User userView, Object object) {

            MobilityApplicationPeriod candidacyPeriod =
                    (MobilityApplicationPeriod) process.getCandidacyProcess().getCandidacyPeriod();

            MobilityEmailTemplate emailTemplateFor =
                    candidacyPeriod.getEmailTemplateFor(MobilityEmailTemplateType.MISSING_DOCUMENTS);

            emailTemplateFor.sendEmailFor(process.getCandidacyHashCode());

            new ErasmusIndividualCandidacyProcessExecutedAction(process,
                    ExecutedActionType.SENT_EMAIL_FOR_MISSING_REQUIRED_DOCUMENTS);
View Full Code Here

            final ErasmusApplyForSemesterType forSemester) {
        this();
        checkParameters(executionYear, start, end);
        setState(CandidacyProcessState.STAND_BY);
        setForSemester(forSemester);
        new MobilityApplicationPeriod(this, executionYear, start, end);
    }
View Full Code Here

            }
        }

        @Override
        protected MobilityApplicationProcess executeActivity(MobilityApplicationProcess process, User userView, Object object) {
            MobilityApplicationPeriod candidacyPeriod = process.getCandidacyPeriod();

            MobilityEmailTemplate emailTemplateFor =
                    candidacyPeriod.getEmailTemplateFor(MobilityEmailTemplateType.MISSING_DOCUMENTS);

            emailTemplateFor.sendMultiEmailFor(process.getProcessesMissingDocuments());

            return process;
        }
View Full Code Here

            }
        }

        @Override
        protected MobilityApplicationProcess executeActivity(MobilityApplicationProcess process, User userView, Object object) {
            MobilityApplicationPeriod candidacyPeriod = process.getCandidacyPeriod();

            MobilityEmailTemplate emailTemplateFor =
                    candidacyPeriod.getEmailTemplateFor(MobilityEmailTemplateType.MISSING_SHIFTS);
            if (emailTemplateFor == null) {
                for (MobilityProgram mobilityProgram : candidacyPeriod.getMobilityPrograms()) {
                    for (MobilityEmailTemplate mobilityEmailTemplate : mobilityProgram.getEmailTemplatesSet()) {
                        if (mobilityEmailTemplate.getType().equals(MobilityEmailTemplateType.MISSING_SHIFTS)) {
                            throw new DomainException("error.missing.shifts.template.not.found", mobilityProgram.getName()
                                    .getContent());
                        }
View Full Code Here

    public void setDegree(Degree degree) {
        this.degree = degree;
    }

    public MobilityQuota determineMobilityQuota() {
        MobilityApplicationPeriod period = (MobilityApplicationPeriod) getCandidacyProcess().getCandidacyPeriod();
        MobilityAgreement agreement = getMobilityStudentDataBean().getMobilityAgreement();

        Degree selectedDegree = null;

        if (getDegree() == null) {
            if (getSelectedCurricularCourses() != null && !getSelectedCurricularCourses().isEmpty()) {
                selectedDegree = getMostDominantDegreeFromCourses();
            } else {
                selectedDegree = null;
            }
        } else {
            if ((getSelectedCurricularCourses() == null || getSelectedCurricularCourses().isEmpty())
                    || (!getSelectedCurricularCourses().isEmpty() && getDegree() == getMostDominantDegreeFromCourses())
                    || getMobilityStudentDataBean().getSelectedMobilityProgram().getRegistrationProtocol()
                            .isOnlyAllowedDegreeEnrolment()) {
                selectedDegree = getDegree();
            } else {
                throw new DomainException("error.mobility.application.process.courses.and.degree.selection.dont.match");
            }
        }

        MobilityQuota quota = period.getAssociatedOpening(selectedDegree, agreement);

        if (quota == null) {
            throw new DomainException("error.mobility.application.process.no.courses.from.one.degree.selected");
        }
View Full Code Here

    public List<Degree> getPossibleDegreesFromSelectedUniversity() {
        if (this.getMobilityStudentDataBean().getSelectedUniversity() == null) {
            return new ArrayList<Degree>();
        }

        MobilityApplicationPeriod period = (MobilityApplicationPeriod) this.getCandidacyProcess().getCandidacyPeriod();

        return period.getPossibleDegreesAssociatedToAgreement(this.getMobilityStudentDataBean().getMobilityAgreement());
    }
View Full Code Here

    @Override
    public Object provide(Object source, Object currentValue) {
        MobilityStudentDataBean bean = (MobilityStudentDataBean) source;
        Country selectedCountry = bean.getSelectedCountry();
        MobilityApplicationPeriod period = (MobilityApplicationPeriod) bean.getParentProcess().getCandidacyPeriod();

        List<UniversityUnit> universityUnitList = period.getUniversityUnitsAssociatedToCountry(selectedCountry);
        Collections.sort(universityUnitList, new BeanComparator("nameI18n"));

        return universityUnitList;
    }
View Full Code Here

        DegreeOfficePublicCandidacyHashCode hashCode =
                getUnusedOrCreateNewHashCode(individualCandidadyProcessClass, parentProcess, email);

        if (parentProcess.isMobility()) {
            MobilityApplicationProcess mobilityApplicationProcess = (MobilityApplicationProcess) parentProcess;
            MobilityApplicationPeriod candidacyPeriod = mobilityApplicationProcess.getCandidacyPeriod();

            MobilityEmailTemplate emailTemplateFor =
                    candidacyPeriod.getEmailTemplateFor(MobilityEmailTemplateType.PREREGISTRATION);

            emailTemplateFor.sendEmailFor(hashCode);
        } else {
            hashCode.sendEmailForApplicationSubmissionCandidacyForm(individualCandidadyProcessClass);
        }
View Full Code Here

    public void sendEmailForApplicationSuccessfullySubmited() {
        CandidacyProcess parentProcess = getIndividualCandidacyProcess().getCandidacyProcess();

        if (parentProcess.isMobility()) {
            MobilityApplicationProcess mobilityApplicationProcess = (MobilityApplicationProcess) parentProcess;
            MobilityApplicationPeriod candidacyPeriod = mobilityApplicationProcess.getCandidacyPeriod();

            MobilityEmailTemplate emailTemplateFor =
                    candidacyPeriod.getEmailTemplateFor(MobilityEmailTemplateType.APPLICATION_SUBMISSION);

            emailTemplateFor.sendEmailFor(this);

            return;
        }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.period.MobilityApplicationPeriod

Copyright © 2018 www.massapicom. 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.