Package org.fenixedu.academic.dto.administrativeOffice.candidacy

Examples of org.fenixedu.academic.dto.administrativeOffice.candidacy.DFACandidacyBean


public class DegreeCurricularPlansForDegreeAndExecutionYear implements DataProvider {

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

        final DFACandidacyBean dfaCandidacyBean = (DFACandidacyBean) source;
        final List<DegreeCurricularPlan> result = new ArrayList<DegreeCurricularPlan>();
        if (dfaCandidacyBean.getDegree() != null && dfaCandidacyBean.getExecutionYear() != null) {
            result.addAll(dfaCandidacyBean.getDegree().getDegreeCurricularPlansForYear(dfaCandidacyBean.getExecutionYear()));
            Collections.sort(result, new BeanComparator("name"));
        } else {
            dfaCandidacyBean.setDegreeCurricularPlan(null);
        }
        return result;
    }
View Full Code Here


public class DegreeCurricularPlansForDegree implements DataProvider {

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

        final DFACandidacyBean dfaCandidacyBean = (DFACandidacyBean) source;
        final List<DegreeCurricularPlan> result = new ArrayList<DegreeCurricularPlan>();
        if (dfaCandidacyBean.getDegree() != null) {
            result.addAll(dfaCandidacyBean.getDegree().getDegreeCurricularPlansSet());
            Collections.sort(result, new BeanComparator("name"));
        } else {
            dfaCandidacyBean.setDegreeCurricularPlan(null);
        }
        return result;
    }
View Full Code Here

public class DFATypeDegrees implements DataProvider {

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

        DFACandidacyBean bean = (DFACandidacyBean) source;

        final List<Degree> result = new ArrayList<Degree>();
        DegreeType degreeType = bean.getDegreeType();
        if (degreeType != null) {
            for (Degree degree : Degree.readNotEmptyDegrees()) {
                if (degree.getDegreeType() == degreeType) {
                    result.add(degree);
                }
View Full Code Here

    @Override
    public Object provide(Object source, Object currentValue) {
        final SortedSet<ExecutionYear> result =
                new TreeSet<ExecutionYear>(new ReverseComparator(ExecutionYear.COMPARATOR_BY_YEAR));

        final DFACandidacyBean bean = (DFACandidacyBean) source;
        if (bean.getDegree() != null) {
            for (final DegreeCurricularPlan dcp : bean.getDegree().getDegreeCurricularPlansSet()) {
                result.addAll(dcp.getExecutionYears());
            }
        } else {
            bean.setExecutionYear(null);
        }
        return result;
    }
View Full Code Here

*/
public class ExecutionYearsForCandidacyProvider implements DataProvider {

    @Override
    public Object provide(Object source, Object currentValue) {
        final DFACandidacyBean candidacyBean = ((DFACandidacyBean) source);
        return candidacyBean.getDegreeCurricularPlan() == null ? Collections.EMPTY_SET : candidacyBean.getDegreeCurricularPlan()
                .getCandidacyPeriodsExecutionYears();
    }
View Full Code Here

public class ExecutionDegreesForDegreeCurricularPlan implements DataProvider {

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

        final DFACandidacyBean dfaCandidacyBean = (DFACandidacyBean) source;
        final List<ExecutionDegree> result = new ArrayList<ExecutionDegree>();
        if (dfaCandidacyBean.getDegree() != null && dfaCandidacyBean.getDegreeCurricularPlan() != null) {
            result.addAll(dfaCandidacyBean.getDegreeCurricularPlan().getExecutionDegreesSet());
            Collections.sort(result, new BeanComparator("year"));
        } else {
            dfaCandidacyBean.setExecutionDegree(null);
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.dto.administrativeOffice.candidacy.DFACandidacyBean

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.