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

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


        Collections.sort(sortedRegistrationStates, RegistrationState.DATE_COMPARATOR);

        for (ListIterator<RegistrationState> iterator = sortedRegistrationStates.listIterator(sortedRegistrationStates.size()); iterator
                .hasPrevious();) {

            RegistrationState registrationState = iterator.previous();
            if (!dateTime.isBefore(registrationState.getStateDate())) {
                return registrationState;
            }
        }

        return null;
View Full Code Here


        Collections.sort(sortedRegistrationStates, RegistrationState.DATE_COMPARATOR);

        for (ListIterator<RegistrationState> iterator = sortedRegistrationStates.listIterator(sortedRegistrationStates.size()); iterator
                .hasPrevious();) {

            RegistrationState registrationState = iterator.previous();
            if (!localDate.isBefore(registrationState.getStateDate().toLocalDate())) {
                return registrationState;
            }
        }

        return null;
View Full Code Here

        List<RegistrationState> sortedRegistrationsStates = new ArrayList<RegistrationState>(getRegistrationStatesSet());
        Collections.sort(sortedRegistrationsStates, RegistrationState.DATE_COMPARATOR);

        for (ListIterator<RegistrationState> iter = sortedRegistrationsStates.listIterator(sortedRegistrationsStates.size()); iter
                .hasPrevious();) {
            RegistrationState state = iter.previous();

            if (state.getStateDate().isAfter(endDateTime)) {
                continue;
            }

            result.add(state);

            if (!state.getStateDate().isAfter(beginDateTime)) {
                break;
            }

        }
    }
View Full Code Here

        List<RegistrationState> sortedRegistrationsStates = new ArrayList<RegistrationState>(getRegistrationStatesSet());
        Collections.sort(sortedRegistrationsStates, RegistrationState.DATE_COMPARATOR);

        for (ListIterator<RegistrationState> iter = sortedRegistrationsStates.listIterator(sortedRegistrationsStates.size()); iter
                .hasPrevious();) {
            RegistrationState state = iter.previous();
            if (state.getStateDate().isAfter(executionYear.getEndDateYearMonthDay().toDateTimeAtMidnight())) {
                continue;
            }
            return state;
        }
View Full Code Here

            final YearMonthDay studiesStartDate) {

        setStartDate(startDate);

        // edit RegistrationState start date
        final RegistrationState firstRegistrationState = getFirstRegistrationState();
        firstRegistrationState.setStateDate(startDate);
        if (firstRegistrationState != getFirstRegistrationState()) {
            throw new DomainException("error.Registration.startDate.changes.first.registration.state");
        }

        // edit Scp start date
View Full Code Here

        if (states.size() == 0) {
            return false;
        }

        RegistrationState previous = null;
        for (final RegistrationState registrationState : states) {
            if (previous != null) {
                if (registrationState.getExecutionYear() == executionYear
                        && (registrationState.isActive() || registrationState.getStateType() == RegistrationStateType.TRANSITED)
                        && (previous.getStateType() == RegistrationStateType.EXTERNAL_ABANDON
                                || previous.getStateType() == RegistrationStateType.INTERRUPTED || previous.getStateType() == RegistrationStateType.FLUNKED)) {
                    return true;
                }
            }

            previous = registrationState;
View Full Code Here

        if (studentCurricularPlan.getRegistration().hasState(RegistrationStateType.CONCLUDED)) {
            return;
        }

        final Registration registration = studentCurricularPlan.getRegistration();
        final RegistrationState state =
                RegistrationState.createRegistrationState(registration, null, new DateTime(), RegistrationStateType.CONCLUDED);
        state.setResponsiblePerson(null);
    }
View Full Code Here

                            getServiceRequestNumberYear());

            process.createState(lastActiveState.getType(), AccessControl.getPerson(), remarks);

            if (process.getRegistration() != null && !process.getRegistration().isActive()) {
                RegistrationState registrationLastActiveState = process.getRegistration().getLastActiveState();

                RegistrationState.createRegistrationState(process.getRegistration(), AccessControl.getPerson(), new DateTime(),
                        registrationLastActiveState.getStateType());
            }

        }
    }
View Full Code Here

        if (process.getRegistration().isActive()) {
            throw new DomainException("error.PhdIndividualProgramProcess.set.work.development.state.registration.is.active");
        }

        RegistrationState registrationLastActiveState = process.getRegistration().getLastActiveState();

        if (!registrationLastActiveState.isActive()) {
            throw new DomainException(
                    "error.PhdIndividualProgramProcess.set.work.development.state.registration.last.state.is.not.active");
        }

        RegistrationState.createRegistrationState(process.getRegistration(), userView.getPerson(), stateDate,
                registrationLastActiveState.getStateType());

        return process;
    }
View Full Code Here

            personalIngressionData.addPrecedentDegreesInformations(studentCandidacy.getPrecedentDegreeInformation());
        }
        registration.addPrecedentDegreesInformations(studentCandidacy.getPrecedentDegreeInformation());

        registration.setStartDate(getBeginDate(sourceStudentCurricularPlan, getExecutionPeriod()));
        RegistrationState activeState = registration.getActiveState();
        activeState.setStateDate(getBeginDate(sourceStudentCurricularPlan, getExecutionPeriod()));
        activeState.setResponsiblePerson(null);
        registration.setSourceRegistration(sourceStudentCurricularPlan.getRegistration());
        registration.setRegistrationProtocol(sourceStudentCurricularPlan.getRegistration().getRegistrationProtocol());

        return registration;
    }
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.