Examples of InfoExecutionDegree


Examples of org.fenixedu.academic.dto.InfoExecutionDegree

    public static List buildExecutionDegreeLabelValueBean(List executionDegreeList, MessageResources messageResources,
            HttpServletRequest request) {
        List executionDegreeLabels = new ArrayList();
        Iterator iterator = executionDegreeList.iterator();
        while (iterator.hasNext()) {
            InfoExecutionDegree infoExecutionDegree = (InfoExecutionDegree) iterator.next();

            String name = infoExecutionDegree.getInfoDegreeCurricularPlan().getInfoDegree().getNome();

            String degreeType = null;

            if (messageResources != null) {
                final Locale locale = I18N.getLocale();
                degreeType =
                        messageResources.getMessage(locale, infoExecutionDegree.getInfoDegreeCurricularPlan().getInfoDegree()
                                .getDegreeType().name());
            }

            if (degreeType == null) {
                degreeType = infoExecutionDegree.getInfoDegreeCurricularPlan().getInfoDegree().getDegreeType().toString();
            }

            name = degreeType + " em " + name;

            name +=
                    duplicateInfoDegree(executionDegreeList, infoExecutionDegree) ? " - "
                            + infoExecutionDegree.getInfoDegreeCurricularPlan().getName() : "";

            executionDegreeLabels.add(new LabelValueBean(name, infoExecutionDegree.getExternalId().toString()));
        }
        return executionDegreeLabels;
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExecutionDegree

    public static List buildExecutionDegreeLabelValueWithNameBean(List executionDegreeList) {
        List executionDegreeLabels = new ArrayList();
        Iterator iterator = executionDegreeList.iterator();
        while (iterator.hasNext()) {
            InfoExecutionDegree infoExecutionDegree = (InfoExecutionDegree) iterator.next();
            String name = infoExecutionDegree.getInfoDegreeCurricularPlan().getInfoDegree().getNome();

            name = infoExecutionDegree.getInfoDegreeCurricularPlan().getInfoDegree().getDegreeType().toString() + " em " + name;

            name +=
                    duplicateInfoDegree(executionDegreeList, infoExecutionDegree) ? " - "
                            + infoExecutionDegree.getInfoDegreeCurricularPlan().getName() : "";

            executionDegreeLabels.add(new LabelValueBean(name, name + "~" + infoExecutionDegree.getExternalId().toString()));
        }
        return executionDegreeLabels;
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExecutionDegree

    private static boolean duplicateInfoDegree(List executionDegreeList, InfoExecutionDegree infoExecutionDegree) {
        InfoDegree infoDegree = infoExecutionDegree.getInfoDegreeCurricularPlan().getInfoDegree();
        Iterator iterator = executionDegreeList.iterator();

        while (iterator.hasNext()) {
            InfoExecutionDegree infoExecutionDegree2 = (InfoExecutionDegree) iterator.next();
            if (infoDegree.equals(infoExecutionDegree2.getInfoDegreeCurricularPlan().getInfoDegree())
                    && !(infoExecutionDegree.equals(infoExecutionDegree2))) {
                return true;
            }

        }
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExecutionDegree

    public static List<InfoExecutionDegree> getExecutionCourses(final DegreeCurricularPlan degreeCurricularPlan) {
        final Collection<ExecutionDegree> executionDegrees = degreeCurricularPlan.getExecutionDegreesSet();

        final List<InfoExecutionDegree> result = new ArrayList<InfoExecutionDegree>(executionDegrees.size());
        for (final ExecutionDegree executionDegree : executionDegrees) {
            final InfoExecutionDegree infoExecutionDegree = InfoExecutionDegree.newInfoFromDomain(executionDegree);
            result.add(infoExecutionDegree);
        }

        return result;
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExecutionDegree

*/
public class ComparatorByNameForInfoExecutionDegree implements Comparator {

    @Override
    public int compare(Object obj1, Object obj2) {
        InfoExecutionDegree infoExecutionDegree = (InfoExecutionDegree) obj1;
        InfoExecutionDegree infoExecutionDegree2 = (InfoExecutionDegree) obj2;

        String name =
                "" + infoExecutionDegree.getInfoDegreeCurricularPlan().getInfoDegree().getDegreeType().toString()
                        + infoExecutionDegree.getInfoDegreeCurricularPlan().getInfoDegree().getNome();
        String name2 =
                "" + infoExecutionDegree2.getInfoDegreeCurricularPlan().getInfoDegree().getDegreeType().toString()
                        + infoExecutionDegree2.getInfoDegreeCurricularPlan().getInfoDegree().getNome();
        return name.compareToIgnoreCase(name2);
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExecutionDegree

            if (permission != null) {
                if (!permission.evaluate(executionDegree.getDegree())) {
                    continue;
                }
            }
            final InfoExecutionDegree infoExecutionDegree = InfoExecutionDegree.newInfoFromDomain(executionDegree);
            infoExecutionDegreeList.add(infoExecutionDegree);
        }
        return infoExecutionDegreeList;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.