Package org.fenixedu.academic.dto

Examples of org.fenixedu.academic.dto.SummariesManagementBean


public class ListShiftsToSummariesManagementProvider implements DataProvider {

    @Override
    public Object provide(Object source, Object currentValue) {
        SummariesManagementBean bean = (SummariesManagementBean) source;
        ExecutionCourse executionCourse = bean.getExecutionCourse();
        Set<Shift> shifts = new TreeSet<Shift>(Shift.SHIFT_COMPARATOR_BY_TYPE_AND_ORDERED_LESSONS);
        if (executionCourse != null) {
            shifts.addAll(executionCourse.getAssociatedShifts());
        }
        return shifts;
View Full Code Here


public class LessonTypesToSummariesManagementProvider implements DataProvider {

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

        SummariesManagementBean bean = (SummariesManagementBean) source;
        Lesson lesson = bean.getLesson();
        Summary summary = bean.getSummary();
        Set<ShiftType> shiftTypes = new HashSet<ShiftType>();

        if (summary != null && summary.getSummaryType() != null) {
            shiftTypes.add(summary.getSummaryType());
        }
View Full Code Here

public class LessonPlanningsToSummariesManagementProvider implements DataProvider {

    @Override
    public Object provide(Object source, Object currentValue) {
        SummariesManagementBean bean = (SummariesManagementBean) source;
        ShiftType lessonType = bean.getLessonType();
        if (lessonType != null) {
            ExecutionCourse executionCourse = bean.getExecutionCourse();
            return executionCourse.getLessonPlanningsOrderedByOrder(lessonType);
        }
        return new ArrayList<LessonPlanning>();
    }
View Full Code Here

public class ShiftLessonsToSummariesManagementProvider implements DataProvider {

    @Override
    public Object provide(Object source, Object currentValue) {
        SummariesManagementBean bean = (SummariesManagementBean) source;
        Shift shift = bean.getShift();
        SummaryType summaryType = bean.getSummaryType();
        Set<Lesson> lessons = new TreeSet<Lesson>(Lesson.LESSON_COMPARATOR_BY_WEEKDAY_AND_STARTTIME);
        if (shift != null && summaryType != null && summaryType.equals(SummaryType.NORMAL_SUMMARY)) {
            lessons.addAll(shift.getAssociatedLessonsSet());
        }
        return lessons;
View Full Code Here

public class PossibleDatesToSummariesManagementProvider implements DataProvider {

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

        SummariesManagementBean bean = (SummariesManagementBean) source;
        Lesson lesson = bean.getLesson();
        Shift shift = bean.getShift();
        SummaryType summaryType = bean.getSummaryType();
        Summary summary = bean.getSummary();
        List<YearMonthDay> possibleSummaryDates = new ArrayList<YearMonthDay>();

        if (summaryType != null && summaryType.equals(SummaryType.NORMAL_SUMMARY)) {
            if (lesson != null) {
                possibleSummaryDates.addAll(lesson.getAllPossibleDatesToInsertSummary());
View Full Code Here

public class LastSummariesToSummariesManagementProvider implements DataProvider {

    @Override
    public Object provide(Object source, Object currentValue) {
        SummariesManagementBean bean = (SummariesManagementBean) source;
        ShiftType lessonType = bean.getLessonType();

        if (lessonType != null) {

            ExecutionCourse executionCourse = bean.getExecutionCourse();
            List<Summary> summaries = new ArrayList<Summary>();
            summaries.addAll(executionCourse.getSummariesByShiftType(lessonType));
            Collections.sort(summaries, Summary.COMPARATOR_BY_DATE_AND_HOUR);

            List<Summary> result = new ArrayList<Summary>();
            if (!summaries.isEmpty() && summaries.size() > 4) {
                result = summaries.subList(0, 4);
            } else {
                result = summaries;
            }

            if (bean.getSummary() != null) {
                result.remove(bean.getSummary());
            }

            return result;
        }
        return new ArrayList<Summary>();
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.dto.SummariesManagementBean

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.