Package org.libreplan.business.planner.entities

Examples of org.libreplan.business.planner.entities.TaskElement$IDatesInterceptor


    private List<TaskElement> lookToDownAssignedTask() {
        List<TaskElement> resultTask = new ArrayList<TaskElement>();
        for (OrderElement child : getAllChildren()) {
            if (child.isSchedulingPoint()) {
                TaskElement task = child.getAssociatedTaskElement();
                if (task != null) {
                    resultTask.add(task);
                }
            }
        }
View Full Code Here


        return sumChargedEffort.isFinishedTimesheets();
    }

    @Override
    public boolean isUpdatedFromTimesheets() {
        TaskElement taskElement = getTaskElement();
        if (taskElement == null) {
            return false;
        }

        return taskElement.isUpdatedFromTimesheets();
    }
View Full Code Here

        Criteria c = getSession().createCriteria(TaskElement.class)
         .createCriteria("taskSource","ts")
         .createCriteria("schedulingData","data")
         .add(Restrictions.eq("data.orderElement",orderElement));

        TaskElement taskElement = (TaskElement) c.uniqueResult();
        return (taskElement != null && taskElement.isSubcontracted()) ? ((Task) taskElement)
                .getSubcontractedTaskData() : null;
    }
View Full Code Here

    public List<TaskElement> getAllChildrenAssociatedTaskElements() {
        List<TaskElement> result = new ArrayList<TaskElement>();

        for (OrderElement orderElement : getAllChildren()) {
            TaskElement taskElement = orderElement.getAssociatedTaskElement();
            if (taskElement != null) {
                result.add(taskElement);
            }
        }
        Validate.noNullElements(result);
View Full Code Here

        this.ignoreLabelsInheritance = ignoreLabelsInheritance;
    }

    @Override
    public boolean accepts(Object object) {
        final TaskElement taskElement = (TaskElement) object;
        return accepts(taskElement) || accepts(taskElement.getAllChildren());
    }
View Full Code Here

            OrderElement order = orderDAO.loadOrderAvoidingProxyFor(material
                    .getOrderElement());
            // Load scheduling states
            order.getSchedulingState();

            TaskElement task = findTaskBy(material);
            reloadTask(task);
            Date startDate;
            Date endDate;

            if(task != null){
                startDate = task.getStartDate();
                endDate = task.getEndDate();
            }else{
                startDate = order.getInitDate();
                endDate = order.getInitDate();
            }
            // check if the dates match
View Full Code Here

        }
    }

    private TaskElement findTaskBy(MaterialAssignment material) {
        // look up into the order elements tree
        TaskElement task = lookToUpAssignedTask(material);
        if (task != null) {
            return task;
        }

        // look down into the order elements tree
View Full Code Here

    }

    private TaskElement lookToDownAssignedTask(MaterialAssignment material) {
        OrderElement current = material.getOrderElement();
        Date lessDate = null;
        TaskElement resultTask = null;
        for (OrderElement child : current.getAllChildren()) {
            if (child.isSchedulingPoint()) {
                TaskElement task = child.getAssociatedTaskElement();
                if ((task != null)
                        && ((lessDate == null) || (lessDate.after(task
                                .getStartDate())))) {
                    lessDate = task.getStartDate();
                    resultTask = task;
                }
            }
        }
        return resultTask;
View Full Code Here

        messagesForUser = new MessagesForUser(messagesContainer);
    }

    public void goToEdit(SubcontractorCommunication subcontractorCommunication) {
        if(subcontractorCommunication != null){
            TaskElement task = subcontractorCommunication.getSubcontractedTaskData().getTask();
            OrderElement orderElement = task.getOrderElement();
            Order order = subcontractorCommunicationModel.getOrder(orderElement);

            if(subcontractorCommunication.getCommunicationType().equals(CommunicationType.PROGRESS_UPDATE)){
                globalView.goToAdvanceTask(order,task);
            }else{
View Full Code Here

    }

    private void onSeeScheduleOf(LoadTimeLine taskLine) {

        TaskElement task = (TaskElement) taskLine.getRole().getEntity();
        Order order = resourceLoadModel.getOrderByTask(task);

        if (resourceLoadModel.userCanRead(order,
                SecurityUtils.getSessionUserLoginName())) {
            if (order.isScheduled()) {
View Full Code Here

TOP

Related Classes of org.libreplan.business.planner.entities.TaskElement$IDatesInterceptor

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.