Examples of TaskGroup


Examples of org.libreplan.business.planner.entities.TaskGroup

        return result;
    }

    public List<TaskElement> getAssociatedTasks() {
        ArrayList<TaskElement> result = new ArrayList<TaskElement>();
        TaskGroup taskGroup = getAssociatedTaskElement();
        if (taskGroup != null) {
            result.addAll(taskGroup.getChildren());
        }
        return result;
    }
View Full Code Here

Examples of org.libreplan.business.planner.entities.TaskGroup

        taskElementDAO.reattach(task);

        Position taskPosition = context.getMapper().findPositionFor(task);
        int insertAt = taskPosition.getInsertionPosition() + 1;

        TaskGroup parent = task.getParent();
        parent.addTaskElement(insertAt, milestone);
        context.add(taskPosition.sameLevelAt(insertAt), milestone);
    }
View Full Code Here

Examples of org.libreplan.business.planner.entities.TaskGroup

        OrderDTO importData = calendarImporterMPXJ.getOrderDTO(file);

        Order order = orderImporterMPXJ.convertImportDataToOrder(importData,
                true);

        TaskGroup taskGroup = orderImporterMPXJ.createTask(importData, true);

        List<Dependency> dependencies = orderImporterMPXJ
                .createDependencies(importData);

        orderImporterMPXJ.storeOrder(order, taskGroup, dependencies);
View Full Code Here

Examples of org.libreplan.business.planner.entities.TaskGroup

        OrderDTO importData = orderImporterMPXJ.getImportData(streamData, file);

        Order order = orderImporterMPXJ.convertImportDataToOrder(importData,
                false);

        TaskGroup taskGroup = orderImporterMPXJ.createTask(importData, false);

        List<Dependency> dependencies = orderImporterMPXJ
                .createDependencies(importData);

        orderImporterMPXJ.storeOrder(order, taskGroup, dependencies);
View Full Code Here

Examples of org.libreplan.business.planner.entities.TaskGroup

            }
            updateParentsPositions(task);
        }

        private void updateParentsPositions(TaskElement task) {
            TaskGroup current = task.getParent();
            while (current != null) {
                current.fitStartAndEndDatesToChildren();
                current = current.getParent();
            }
        }
View Full Code Here

Examples of org.libreplan.business.planner.entities.TaskGroup

        List<TaskElement> result = new ArrayList<TaskElement>();

        List<Order> list = getOrders(predicate);
        for (Order order : list) {
            order.useSchedulingDataFor(currentScenario, false);
            TaskGroup associatedTaskElement = order.getAssociatedTaskElement();

            if (associatedTaskElement != null) {
                if (predicate != null) {
                    // If predicate includeChildren then we check if it accepts
                    // the element
                    if (!predicate.accepts(associatedTaskElement)) {
                        // If it doesn't accept the element we move on to the
                        // next order
                        continue;
                    }
                }
                // If predicate doesn't includeChildren then the orders where
                // already filtered in the DB query.
                // Otherwise they've been filtered with the predicate above, and
                // if they didn't pass the filter the execution doesn't reach
                // this point.
                associatedTaskElement.setSimplifiedAssignedStatusCalculationEnabled(true);
                result.add(associatedTaskElement);
            }
        }
        Collections.sort(result,new Comparator<TaskElement>(){
            @Override
View Full Code Here

Examples of org.libreplan.business.planner.entities.TaskGroup

            }
            List<Order> list = orderDAO.getOrdersByReadAuthorizationByScenario(
                    SecurityUtils.getSessionUserLoginName(), currentScenario);
            for (Order each : list) {
                each.useSchedulingDataFor(currentScenario, false);
                TaskGroup associatedTaskElement = each
                        .getAssociatedTaskElement();
                if (associatedTaskElement != null
                        && STATUS_VISUALIZED.contains(each.getState())) {
                    if (calculateStartDate) {
                        startDate = Collections.min(notNull(startDate,
                                each.getInitDate(),
                                associatedTaskElement.getStartDate()));
                    }
                    if (calculateEndDate) {
                        endDate = Collections.max(notNull(endDate,
                                each.getDeadline(),
                                associatedTaskElement.getEndDate()));
                    }
                }
            }
        }
        filterStartDate = startDate != null ? LocalDate
View Full Code Here

Examples of org.libreplan.business.planner.entities.TaskGroup

    }

    private List<Task> getDestinations(TaskElement task) {
        Set<Task> result = new HashSet<Task>();
        Set<Dependency> dependencies = getOutgoingDependencies(task);
        TaskGroup parent = task.getParent();
        if (parent != null) {
            if (parent.getEndDate().equals(task.getEndDate())) {
                result.addAll(getDestinations((task.getParent())));
            }
        }
        for (Dependency each : dependencies) {
            TaskElement destination = each.getDestination();
View Full Code Here

Examples of org.libreplan.business.planner.entities.TaskGroup

        }
        return result;
    }

    private boolean noneParentHasIncomingDependencies(Task each) {
        TaskGroup parent = each.getParent();
        while (parent != null && getIncomingDependencies(parent).isEmpty()) {
            parent = parent.getParent();
        }
        return (parent == null);
    }
View Full Code Here

Examples of org.libreplan.business.planner.entities.TaskGroup

        }

        @Override
        public void doRemovalOf(TaskElement taskElement) {
            taskElement.detach();
            TaskGroup parent = taskElement.getParent();
            if (parent != null) {
                parent.remove(taskElement);
            }
        }
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.