Package org.libreplan.business.planner.entities

Examples of org.libreplan.business.planner.entities.Task$ModificationsResult


                    .byTask(listOnlySpecific);

            List<LoadTimeLine> secondLevel = new ArrayList<LoadTimeLine>();
            for (Entry<Task, List<ResourceAllocation<?>>> entry : byTask
                    .entrySet()) {
                Task task = entry.getKey();
                TimeLineRole<BaseEntity> role = getCurrentTimeLineRole(task);
                LoadTimeLine timeLine = buildTimeLine(resource, task.getName(),
                        entry.getValue(), "specific", role);
                if (!timeLine.isEmpty()) {
                    secondLevel.add(timeLine);
                }
View Full Code Here


                                .getValue()));

                for (Entry<Task, List<ResourceAllocation<?>>> entryTask : byTask
                        .entrySet()) {

                    Task task = entryTask.getKey();
                    List<GenericResourceAllocation> resouceAllocations = onlyGeneric(entryTask
                            .getValue());
                    TimeLineRole<BaseEntity> role = getCurrentTimeLineRole(task);
                    LoadTimeLine timeLine = buildTimeLine(entry.getKey(), task,
                            resource, "generic", resouceAllocations, role);
View Full Code Here

    }

    @Override
    @Transactional(readOnly = true)
    public Order getOrder(SubcontractedTaskData subcontractedTaskData) {
        Task task = subcontractedTaskData.getTask();
        OrderElement orderElement = orderDAO.loadOrderAvoidingProxyFor(task
                .getOrderElement());
        return orderElement.getOrder();
    }
View Full Code Here

                    .byTask(allocations);

            List<LoadTimeLine> secondLevel = new ArrayList<LoadTimeLine>();
            for (Entry<Task, List<GenericResourceAllocation>> entry : byTask
                    .entrySet()) {
                Task task = entry.getKey();

                Map<Set<Criterion>, List<GenericResourceAllocation>> mapSameCriteria = getAllocationsWithSameCriteria((entry
                        .getValue()));
                for (Entry<Set<Criterion>, List<GenericResourceAllocation>> entrySameCriteria : mapSameCriteria
                        .entrySet()) {
View Full Code Here

            }

            @Override
            public List<Constraint<GanttDate>> getCurrentLengthConstraint() {
                if (taskElement instanceof Task) {
                    Task task = (Task) taskElement;
                    if (task.getAllocationDirection() == Direction.FORWARD) {
                        return Collections
                                .singletonList(biggerOrEqualThan(getEndDate()));
                    }
                }
                return Collections.emptyList();
View Full Code Here

                return Collections.emptyList();
            }

            private GanttDate inferEndFrom(GanttDate newStart) {
                if (taskElement instanceof Task) {
                    Task task = (Task) taskElement;
                    return toGantt(task
                            .calculateEndKeepingLength(toIntraDay(newStart)));
                }
                return newStart;
            }
View Full Code Here

    }

    @Override
    @Transactional(readOnly = true)
    public String getOrderCode(SubcontractedTaskData subcontractedTaskData) {
        Task task = subcontractedTaskData.getTask();
        OrderElement orderElement = orderDAO.loadOrderAvoidingProxyFor(task
                .getOrderElement());
        return orderElement.getOrder().getCode();
    }
View Full Code Here

    }

    @Override
    @Transactional(readOnly = true)
    public String getOrderName(SubcontractedTaskData subcontractedTaskData) {
        Task task = subcontractedTaskData.getTask();
        OrderElement orderElement = orderDAO.loadOrderAvoidingProxyFor(task
                .getOrderElement());
        return orderElement.getOrder().getName();
    }
View Full Code Here

        task = givenTaskWithCriterions();
        givenGenericResourceAllocationForTask(task);
    }

    private Task givenTaskWithStartAndEnd(Interval interval) {
        Task task = createNiceMock(Task.class);
        setupCriterions(task);
        IntraDayDate start = IntraDayDate.startOfDay(interval.getStart()
                .toLocalDate());
        IntraDayDate end = IntraDayDate.startOfDay(interval.getEnd()
                .toLocalDate());
        expect(task.getStartDate()).andReturn(interval.getStart().toDate())
                .anyTimes();
        expect(task.getIntraDayStartDate()).andReturn(start).anyTimes();
        expect(task.getEndDate()).andReturn(interval.getEnd().toDate())
                .anyTimes();
        expect(task.getIntraDayEndDate()).andReturn(end).anyTimes();
        expect(task.getFirstDayNotConsolidated()).andReturn(start)
                .anyTimes();
        expect(task.getCalendar()).andReturn(baseCalendar).anyTimes();
        replay(task);
        return this.task = task;
    }
View Full Code Here

        replay(task);
        return this.task = task;
    }

    private Task givenTaskWithCriterions() {
        Task task = createNiceMock(Task.class);
        setupCriterions(task);
        expect(task.getCalendar()).andReturn(baseCalendar).anyTimes();
        replay(task);
        return this.task = task;
    }
View Full Code Here

TOP

Related Classes of org.libreplan.business.planner.entities.Task$ModificationsResult

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.