Package org.libreplan.business.orders.entities.TaskSource

Examples of org.libreplan.business.orders.entities.TaskSource.TaskGroupSynchronization


        orderLine.useSchedulingDataFor(orderVersion);
        SchedulingDataForVersion schedulingDataForVersion = orderLine
                .getCurrentSchedulingDataForVersion();
        TaskSource taskSource = TaskSource
                .createForGroup(schedulingDataForVersion);
        TaskGroupSynchronization synchronization = new TaskGroupSynchronization(
                taskSource, Collections.<TaskSourceSynchronization> emptyList()) {

            @Override
            protected TaskElement apply(List<TaskElement> children,
                    IOptionalPersistence persistence) {
                TaskGroup result = TaskGroup.create(taskSource);
                Date today = new Date();
                result.setStartDate(today);
                result.setEndDate(plusDays(today, 3));
                setTask(taskSource, result);
                taskSourceDAO.save(taskSource);
                return result;
            }

        };
        synchronization.apply(TaskSource.persistTaskSources(taskSourceDAO));
        return (TaskGroup) taskSource.getTask();
    }
View Full Code Here

TOP

Related Classes of org.libreplan.business.orders.entities.TaskSource.TaskGroupSynchronization

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.