Package org.libreplan.business.planner.entities

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


            orderElement.useSchedulingDataFor(orderVersion);

            if (orderElement != null && orderElement.getTaskSource() != null
                    && orderElement.getTaskSource().getTask().isSubcontracted()) {

                Task task = (Task) orderElement.getTaskSource().getTask();
                SubcontractedTaskData subcontractedTaskData = task.getSubcontractedTaskData();
                EndDateCommunicationToCustomerDTO endDateDTO = orderElementWithAdvanceMeasurementsOrEndDateDTO.endDateCommunicationToCustomerDTO;

                Date endDate = DateConverter.toDate(endDateDTO.endDate);
                Date communicationDate = DateConverter.toDate(endDateDTO.communicationDate);
View Full Code Here


        }
    }

    private void updateComponentValuesForTask() {
        if (currentTaskElement instanceof Task) {
            Task task = (Task) currentTaskElement;
            showDurationRow(task);
            showStartConstraintRow(task);
            showResourceAllocationTypeRow(task);
        } else {
            hideDurationRow();
View Full Code Here

    private void fromNonLimitingResource(ResourceAllocationTypeEnum newState) {
        if (!isTask(currentTaskElement)) {
            return;
        }

        Task task = asTask(currentTaskElement);
        if (task.hasResourceAllocations()) {
            try {
                if (Messagebox.show(_("Assigned resources for this task will be deleted. Are you sure?"),
                        _("Warning"), Messagebox.OK | Messagebox.CANCEL, Messagebox.QUESTION) == Messagebox.OK) {
                    task.removeAllResourceAllocations();
                    setStateTo(newState);
                } else {
                    resetStateTo(ResourceAllocationTypeEnum.NON_LIMITING_RESOURCES);
                }
                return;
View Full Code Here

    private void fromLimitingResource(ResourceAllocationTypeEnum newState) {
        if (!isTask(currentTaskElement)) {
            return;
        }

        Task task = asTask(currentTaskElement);
        if (task.hasResourceAllocations()) {
            try {
                if (Messagebox.show(_("Assigned resources for this task will be deleted. Are you sure?"),
                        _("Warning"), Messagebox.OK | Messagebox.CANCEL, Messagebox.QUESTION) == Messagebox.OK) {
                    task.removeAllResourceAllocations();
                    setStateTo(newState);
                } else {
                    resetStateTo(ResourceAllocationTypeEnum.LIMITING_RESOURCES);
                }
                return;
View Full Code Here

     * Change state from Subcontract assignation type to a new state (non-limiting, limiting)
     *
     * @param newState
     */
    private void fromSubcontract(ResourceAllocationTypeEnum newState) {
        Task task = asTask(currentTaskElement);

        if (task.isSubcontracted()) {
            final Date communicationDate = (task.getSubcontractedTaskData() != null) ?
                    task.getSubcontractedTaskData().getSubcontractCommunicationDate()
                    : null;

            // Notification has been sent
            if (communicationDate != null) {
                try {
View Full Code Here

        final Listcell cell = (Listcell) item.getChildren().get(0);
        return ResourceAllocationTypeEnum.asEnum(cell.getLabel());
    }

    public boolean isConsolidatedTask() {
        Task task = asTask(currentTaskElement);
        if (task != null) {
            return task.hasConsolidations();
        }
        return false;
    }
View Full Code Here

        }

        private void updateLimitingResourceQueueElementDates(
                TaskElement taskElement) {
            if (taskElement.isLimiting()) {
                Task task = (Task) taskElement;
                updateLimitingResourceQueueElementDates(task);
            } else if (!taskElement.isLeaf()) {
                for (TaskElement each : taskElement.getChildren()) {
                    updateLimitingResourceQueueElementDates(each);
                }
View Full Code Here

                        .getCurrentSchedulingDataForVersion(),
                        hoursGroups);
        TaskSourceSynchronization synchronization = TaskSource
                .mustAdd(taskSource);
        synchronization.apply(TaskSource.persistTaskSources(taskSourceDAO));
        Task task = (Task) taskSource.getTask();
        if (ResourceAllocationType.SPECIFIC_RESOURCE_ALLOCATION.equals(type)) {
            SpecificResourceAllocation specificResourceAllocation = SpecificResourceAllocation
                    .createForTesting(ResourcesPerDay.amount(1),
                            task);
            Worker worker = (Worker) createValidWorker();
View Full Code Here

            IContextWithPlannerTask<TaskElement> context,
            TaskElement taskElement, PlanningState planningState,
            boolean fromLimitingResourcesView) {

        if (isTask(taskElement)) {
            Task task = asTask(taskElement);
            if (task.isLimiting()) {
                editTaskTabbox.setSelectedPanelApi(limitingResourceAllocationTabpanel);
            } else {
                editTaskTabbox.setSelectedPanelApi(resourceAllocationTabpanel);
            }
        } else {
View Full Code Here

            messagesForUser.showInvalidValues(e);
        }
    }

    private void removeAssociatedData(ResourceAllocationTypeEnum state) {
        Task task = asTask(taskElement);

        if (state.equals(ResourceAllocationTypeEnum.SUBCONTRACT)) {
            task.removeSubcontractCommunicationDate();
            task.setSubcontractedTaskData(null);
            subcontractController.removeSubcontractedTaskData();
        }
    }
View Full Code Here

TOP

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

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.