Examples of LimitingResourceQueueElement


Examples of org.libreplan.business.planner.limiting.entities.LimitingResourceQueueElement

    private boolean isAppropriative() {
        return cbAllocationType.isChecked();
    }

    private void enableRadiobuttons(boolean isAppropriative) {
        final LimitingResourceQueueElement beingEdited = getBeingEditedElement();
        if (isAppropriative) {
            listCandidateGaps.setDisabled(true);

            earliestDate.setDisabled(true);
            latestDate.setDisabled(true);
            selectStartDate.setDisabled(false);
            selectStartDate.setSelected(true);

            startAllocationDate.setDisabled(false);
            startAllocationDate.setValue(beingEdited.getEarliestStartDateBecauseOfGantt());
        } else {
            listCandidateGaps.setDisabled(false);

            earliestDate.setDisabled(false);
            earliestDate.setSelected(true);
View Full Code Here

Examples of org.libreplan.business.planner.limiting.entities.LimitingResourceQueueElement

        }
        return result;
    }

    public void accept(Event e) {
        LimitingResourceQueueElement element = getBeingEditedElement();
        LimitingResourceQueue queue = getSelectedQueue();
        DateAndHour time = getSelectedAllocationTime();

        if (isAppropriative()) {
            appropriativeAllocation(element, queue, time);
View Full Code Here

Examples of org.libreplan.business.planner.limiting.entities.LimitingResourceQueueElement

            return getLatestTime(selectedGap);
        // Select start date
        } else if (index == 2) {
            final LocalDate selectedDay = new LocalDate(startAllocationDate.getValue());
            if (isAppropriative()) {
                LimitingResourceQueueElement beingEdited = getBeingEditedElement();
                if (selectedDay.compareTo(new LocalDate(beingEdited.getEarliestStartDateBecauseOfGantt())) < 0) {
                    throw new WrongValueException(startAllocationDate, _("Day is not valid"));
                }
                return new DateAndHour(selectedDay, 0);
            } else {
                DateAndHour allocationTime = getValidDayInGap(selectedDay, getSelectedGap());
View Full Code Here

Examples of org.libreplan.business.planner.limiting.entities.LimitingResourceQueueElement

        return gap.getStartTime();
    }

    private DateAndHour getLatestTime(Gap gap) {
        Validate.notNull(gap);
        LimitingResourceQueueElement element = getLimitingResourceQueueModel().getLimitingResourceQueueElement();
        LimitingResourceQueue queue = getSelectedQueue();
        return LimitingResourceAllocator.startTimeToAllocateStartingFromEnd(
                element.getResourceAllocation(), queue.getResource(), gap);
    }
View Full Code Here

Examples of org.libreplan.business.planner.limiting.entities.LimitingResourceQueueElement

            final LocalDate startDate = getSelectedGap().getStartTime().getDate();
            datebox.setValue(toDate(startDate));
        }

        if (isAppropriative()) {
            final LimitingResourceQueueElement beingEdited = getBeingEditedElement();
            highlightDaysFromDate(datebox.getUuid(), new LocalDate(beingEdited.getEarliestStartDateBecauseOfGantt()));
        } else {
            highlightDaysInGap(datebox.getUuid(), getSelectedGap());
        }
    }
View Full Code Here

Examples of org.libreplan.business.planner.limiting.entities.LimitingResourceQueueElement

                endDate);

    }

    private Date getEarliestDate() {
        final LimitingResourceQueueElement element = getEarliestQueueElement();
        return (element != null) ? element.getStartDate()
                .toDateTimeAtCurrentTime().toDate() : new Date();
    }
View Full Code Here

Examples of org.libreplan.business.planner.limiting.entities.LimitingResourceQueueElement

        return (element != null) ? element.getStartDate()
                .toDateTimeAtCurrentTime().toDate() : new Date();
    }

    private LimitingResourceQueueElement getEarliestQueueElement() {
        LimitingResourceQueueElement earliestQueueElement = null;

        for (LimitingResourceQueue each : queuesState.getQueues()) {
            LimitingResourceQueueElement element = getFirstLimitingResourceQueueElement(each);
            if (element == null) {
                continue;
            }
            if (earliestQueueElement == null
                    || isEarlier(element, earliestQueueElement)) {
View Full Code Here

Examples of org.libreplan.business.planner.limiting.entities.LimitingResourceQueueElement

                        allocationAlreadyDone);
        List<LimitingResourceQueueElement> result = new ArrayList<LimitingResourceQueueElement>();
        for (AllocationSpec each : allocationsToBeDone) {
            applyAllocation(each);

            LimitingResourceQueueElement element = each.getElement();
            result.add(element);
        }

        return result;
    }
View Full Code Here

Examples of org.libreplan.business.planner.limiting.entities.LimitingResourceQueueElement

    private boolean checkAllocationIsAppropriative = true;

    private AllocationSpec doAppropriativeAllocation(
            InsertionRequirements requirements, AllocationSpec allocation) {

        LimitingResourceQueueElement element = requirements.getElement();
        List<LimitingResourceQueue> potentiallyValidQueues = getAssignableQueues(element);
        LimitingResourceQueue queue = earliestQueue(potentiallyValidQueues);

        List<LimitingResourceQueueElement> unscheduled = new ArrayList<LimitingResourceQueueElement>();
        allocation = unscheduleElementsFor(queue, requirements, unscheduled);
View Full Code Here

Examples of org.libreplan.business.planner.limiting.entities.LimitingResourceQueueElement

        // Do day allocation
        allocationBehaviour.allocateDayAssigments(
                convert(allocationStillNotDone.getStartInclusive()),
                convert(allocationStillNotDone.getEndExclusive()));

        LimitingResourceQueueElement element = allocationStillNotDone
            .getElement();
        LimitingResourceQueue queue = allocationStillNotDone.getQueue();

        // Update start and end time of task
        updateStartAndEndTimes(element, allocationStillNotDone
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.