Package org.fenixedu.academic.domain.student.registrationStates

Examples of org.fenixedu.academic.domain.student.registrationStates.RegistrationState


        LocalDate stateDate = new LocalDate();
        if (stateDate.isAfter(getExecutionYear().getEndDateYearMonthDay())) {
            stateDate = getExecutionYear().getEndDateYearMonthDay().toLocalDate();
        }

        final RegistrationState state =
                RegistrationState.createRegistrationState(oldStudentCurricularPlan.getRegistration(), null,
                        stateDate.toDateTimeAtStartOfDay(), RegistrationStateType.CONCLUDED);
        state.setResponsiblePerson(null);
    }
View Full Code Here


            return degreeType == null || degreeType == forDegreeType;
        }

        public boolean applyFor(final Registration registration) {
            final ExecutionYear executionYear = getExecutionYear();
            final RegistrationState registrationState = registration.getLastRegistrationState(executionYear);
            if (registrationState == null) {
                return false;
            }
            final RegistrationStateType registrationStateType = registrationState.getStateType();
            return (getActive() && registrationStateType.isActive())
                    || (getConcluded() && registrationStateType == RegistrationStateType.CONCLUDED && executionYear
                            .containsDate(registrationState.getStateDate()));
        }
View Full Code Here

        for (final Registration registration : student.getRegistrationsSet()) {
            for (final ExecutionDegree executionDegree : getOutboundMobilityCandidacyContestGroup().getExecutionDegreeSet()) {
                if (executionDegree.getDegree() == registration.getDegree()) {
                    final ExecutionYear executionYear =
                            (ExecutionYear) getOutboundMobilityCandidacyPeriod().getExecutionInterval();
                    final RegistrationState registrationState = registration.getLastRegistrationState(executionYear);
                    if (registrationState != null && registrationState.getStateType().isActive()) {
                        return registration;
                    }
                }
            }
        }
View Full Code Here

                }

                final StudentAttendsStateType stateType = attends.getAttendsStateType();
                row.createCell(stateType != null ? BundleUtil.getString(Bundle.ENUMERATION, stateType.getQualifiedName()) : "--");
                row.createCell(attends.getStudentCurricularPlanFromAttends().getDegreeCurricularPlan().getName());
                final RegistrationState registrationState =
                        attends.getRegistration().getLastRegistrationState(attends.getExecutionYear());
                row.createCell(registrationState == null ? "" : registrationState.getStateType().getDescription());
                row.createCell(attends.getRegistration().getStudent().getPerson().getFirstAndLastName());

                for (Grouping grouping : groupings) {
                    StudentGroup studentGroup = attends.getStudentGroupByGrouping(grouping);
                    if (studentGroup == null) {
View Full Code Here

        if (registrationStateType == null) {
            return true;
        }

        final RegistrationState lastRegistrationState =
                studentCurricularPlan.getRegistration().getLastRegistrationState(executionYear);
        if (lastRegistrationState == null || lastRegistrationState.getStateType() != registrationStateType) {
            return false;
        }

        final double arithmeticMean = studentCurricularPlan.getRegistration().getCurriculum().getAverage().doubleValue();
View Full Code Here

        return result;
    }

    public boolean isCurrentlyEnroled(DegreeCurricularPlan degreeCurricularPlan) {
        for (Registration registration : getRegistrationsSet()) {
            final RegistrationState registrationState = registration.getActiveState();
            if (!registration.isActive() && registrationState.getStateType() != RegistrationStateType.TRANSITED) {
                continue;
            }

            StudentCurricularPlan lastStudentCurricularPlan = registration.getLastStudentCurricularPlan();
            if (lastStudentCurricularPlan == null) {
View Full Code Here

        return getActiveRegistrationFor(degree) != null;
    }

    public boolean hasActiveRegistrations() {
        for (final Registration registration : super.getRegistrationsSet()) {
            final RegistrationState registrationState = registration.getActiveState();
            if (registrationState != null) {
                final RegistrationStateType registrationStateType = registrationState.getStateType();
                if (registrationStateType != RegistrationStateType.TRANSITION && registrationStateType.isActive()) {
                    return true;
                }
            }
        }
View Full Code Here

                throw new DomainException("AcademicServiceRequest.hasnt.been.payed");
            }
            academicServiceRequestBean.setSituationDate(getActiveSituation().getSituationDate().toYearMonthDay());

        } else if (academicServiceRequestBean.isToConclude() && hasExecutionDegree()) {
            final RegistrationState state =
                    RegistrationState.createRegistrationState(getRegistration(), academicServiceRequestBean.getResponsible(),
                            academicServiceRequestBean.getFinalSituationDate(), RegistrationStateType.REGISTERED);

            if (getRegistration().getActiveState() != state) {
                throw new DomainException("StudentReingressionRequest.reingression.must.be.active.state.after.request.conclusion");
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.student.registrationStates.RegistrationState

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.