Package org.libreplan.business.calendars.entities

Examples of org.libreplan.business.calendars.entities.CalendarData


                throw new ValidationException(_("This date cannot be empty"));
            }
        }

        LocalDate newStartDate = LocalDate.fromDateFields(date);
        CalendarData prevVersion = getBaseCalendar().getPrevious(version);
        if ((newStartDate != null) && (prevVersion != null)) {
            if (getBaseCalendar().getPrevious(prevVersion) == null) {
                return;
            }
            LocalDate prevStartDate = getBaseCalendar()
                    .getPrevious(prevVersion).getExpiringDate();
            if ((prevStartDate == null)
                    || ((newStartDate
                            .compareTo(prevStartDate) > 0))) {
                prevVersion.setExpiringDate(newStartDate);
                return;
            }
        }
        throw new ValidationException(
                _("This date can not include the whole previous work week"));
View Full Code Here


            treerow.appendChild(nameTreecell);

            // append start date of the current work week
            Treecell startDateTreecell = new Treecell();
            Label startDateLabel = new Label("---");
            CalendarData version = baseCalendar.getCalendarData(LocalDate
                    .fromDateFields(new Date()));
            CalendarData prevVersion = baseCalendar.getPrevious(version);
            if ((prevVersion != null)
                    && (prevVersion.getExpiringDate() != null)) {
                startDateLabel.setValue(prevVersion
                        .getExpiringDate().toString());
            }
            startDateTreecell.appendChild(startDateLabel);
            treerow.appendChild(startDateTreecell);
View Full Code Here

TOP

Related Classes of org.libreplan.business.calendars.entities.CalendarData

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.