Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.ExecutionDegree


            executionSemester = ExecutionSemester.readActualExecutionSemester();
        } else {
            executionSemester = FenixFramework.getDomainObject(executionPeriodId);
        }

        final ExecutionDegree executionDegree = FenixFramework.getDomainObject(executionDegreeId);
        if (executionDegree == null) {
            throw new NonExistingExecutionDegree();
        }

        Set<ExecutionCourse> executionCourseList =
                executionDegree.getDegreeCurricularPlan().getExecutionCoursesByExecutionPeriod(executionSemester);

        List infoExecutionCourseList = (List) CollectionUtils.collect(executionCourseList, new Transformer() {

            @Override
            public Object transform(Object input) {
View Full Code Here


    @Override
    public Object provide(Object source, Object currentValue) {

        ContextSelectionBean contextSelectionBean = (ContextSelectionBean) source;
        List<CurricularYear> result = new ArrayList<CurricularYear>();
        ExecutionDegree executionDegree = contextSelectionBean.getExecutionDegree();

        if (executionDegree != null) {
            Integer index = executionDegree.getDegreeCurricularPlan().getDegreeDuration();

            result.addAll(Bennu.getInstance().getCurricularYearsSet());
            Collections.sort(result, CurricularYear.CURRICULAR_YEAR_COMPARATORY_BY_YEAR);
            return index == null ? result : result.subList(0, index);
        }
View Full Code Here

    public Set<Person> getCoordinatorsFor(ExecutionYear executionYear) {
        if (getDegree() == null) {
            return Collections.emptySet();
        }

        final ExecutionDegree executionDegree =
                getDegree().getLastActiveDegreeCurricularPlan().getExecutionDegreeByYear(executionYear);

        final Set<Person> result = new HashSet<Person>();
        if (executionDegree != null) {
            for (final Coordinator coordinator : executionDegree.getCoordinatorsListSet()) {
                result.add(coordinator.getPerson());
            }
        }

        return result;
View Full Code Here

    public Set<Person> getResponsibleCoordinatorsFor(ExecutionYear executionYear) {
        if (getDegree() == null) {
            return new HashSet<Person>();
        }

        final ExecutionDegree executionDegree =
                getDegree().getLastActiveDegreeCurricularPlan().getExecutionDegreeByYear(executionYear);

        final Set<Person> result = new HashSet<Person>();
        if (executionDegree != null) {
            for (final Coordinator coordinator : executionDegree.getCoordinatorsListSet()) {
                if (coordinator.isResponsible()) {
                    result.add(coordinator.getPerson());
                }
            }
        }
View Full Code Here

        }
    }

    private void assertCandidacy(final DegreeCurricularPlan dcp, final ExecutionYear executionYear) {
        if (getCandidacy().getExecutionDegree() == null) {
            final ExecutionDegree executionDegree = dcp.getExecutionDegreeByAcademicInterval(executionYear.getAcademicInterval());
            getCandidacy().setExecutionDegree(executionDegree);
        }

        getCandidacy().setIngression(Ingression.CIA3C);
    }
View Full Code Here

    }

    private AccountingEventPaymentCode findEquivalentPaymentCodeInStudentCandidacy(final EntryDTO entry,
            final Class<? extends AccountingEventPaymentCode> whatForClazz, final Student student) {
        DegreeCurricularPlan degreeCurricularPlan = this.getStudentCurricularPlan().getDegreeCurricularPlan();
        ExecutionDegree executionDegree =
                degreeCurricularPlan.getExecutionDegreeByAcademicInterval(getExecutionYear().getAcademicInterval());
        StudentCandidacy studentCandidacy = student.getPerson().getStudentCandidacyForExecutionDegree(executionDegree);

        if (studentCandidacy == null) {
            return null;
View Full Code Here

        final Person person = Person.readPersonByUsername(username);
        if (person == null) {
            throw new FenixServiceException("error.noUserForUsername");
        }

        final ExecutionDegree executionDegree = FenixFramework.getDomainObject(executionDegreeId);
        if (executionDegree == null) {
            throw new FenixServiceException("error.noExecutionDegree");
        }

        final Coordinator coordinator = executionDegree.getCoordinatorByTeacher(person);
        if (coordinator == null) {
            Coordinator.createCoordinator(executionDegree, person, Boolean.FALSE);
        }

        return Boolean.TRUE;
View Full Code Here

        if (username == null) {
            throw new FenixServiceException("nullUsername");
        }

        final Person person = Person.readPersonByUsername(username);
        ExecutionDegree executionDegree = FenixFramework.getDomainObject(executionDegreeCode);
        ExecutionYear executionYear = executionDegree.getExecutionYear();

        CurricularCourse curricularCourse = (CurricularCourse) FenixFramework.getDomainObject(curricularCourseCode);
        if (curricularCourse == null) {
            throw new NonExistingServiceException();
        }

        // if user is coordinator and is the current coordinator and
        // curricular course is not basic
        // coordinator can edit
        Coordinator coordinator = executionDegree.getCoordinatorByTeacher(person);
        result =
                Boolean.valueOf((coordinator != null) && executionYear.isCurrent()
                        && curricularCourse.getBasic().equals(Boolean.FALSE));

        return result;
View Full Code Here

import pt.ist.fenixframework.FenixFramework;

public class DeleteScientificCommission {

    protected void run(String executionDegreeId, ScientificCommission commission) {
        ExecutionDegree executionDegree = FenixFramework.getDomainObject(executionDegreeId);

        if (!executionDegree.getScientificCommissionMembersSet().contains(commission)) {
            throw new DomainException("scientificCommission.delete.incorrectExecutionDegree");
        }

        commission.delete();
    }
View Full Code Here

    protected InfoExecutionDegree run(final String degreeCurricularPlanID) {

        final DegreeCurricularPlan degreeCurricularPlan = FenixFramework.getDomainObject(degreeCurricularPlanID);

        final Collection executionDegrees = degreeCurricularPlan.getExecutionDegreesSet();
        final ExecutionDegree executionDegree = (ExecutionDegree) CollectionUtils.find(executionDegrees, new Predicate() {
            @Override
            public boolean evaluate(Object arg0) {
                final ExecutionDegree executionDegree = (ExecutionDegree) arg0;
                return executionDegree.getExecutionYear().isCurrent();
            }
        });

        return InfoExecutionDegree.newInfoFromDomain(executionDegree);
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.ExecutionDegree

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.