Package org.zkoss.ganttz.data.resourceload

Examples of org.zkoss.ganttz.data.resourceload.LoadTimeLine


                    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);
                    if (!timeLine.isEmpty()) {
                        result.add(timeLine);
                    }

                }
            }
View Full Code Here


                TimeLineRole<BaseEntity> role) {
            LoadPeriodGeneratorFactory periodGeneratorFactory = LoadPeriodGenerator
                    .onResourceSatisfying(resource, criterions);
            List<LoadPeriod> loadPeriods = periodBuilderFactory.build(
                    periodGeneratorFactory, allocationsSortedByStartDate);
            return new LoadTimeLine(getName(criterions, task), loadPeriods,
                    type, role);
        }
View Full Code Here

            List<ResourceAllocation<?>> resourceAllocations = getAllSortedValues(byOrder);
            if (resourceAllocations.isEmpty()) {
                return null;
            }
            TimeLineRole<BaseEntity> role = getCurrentTimeLineRole(null);
            LoadTimeLine group = new LoadTimeLine(
                    buildTimeLine(resource, _("Other projects"),
                            resourceAllocations, "resource", role),
                    buildTimeLinesGroupForOrder(resource, byOrder));
            return group;
        }
View Full Code Here

                Resource resource,
                Map<Order, List<ResourceAllocation<?>>> byOrder) {
            List<LoadTimeLine> result = new ArrayList<LoadTimeLine>();
            for (Order order : byOrder.keySet()) {
                TimeLineRole<BaseEntity> role = getCurrentTimeLineRole(order);
                result.add(new LoadTimeLine(buildTimeLine(resource,
                        order.getName(), byOrder.get(order), "resource", role),
                        buildTimeLinesForOrder(resource, byOrder.get(order))));
            }
            Collections.sort(result, LoadTimeLine.byStartAndEndDate());
            return result;
View Full Code Here

                String type, TimeLineRole<BaseEntity> role) {

            List<LoadPeriod> loadPeriods = periodBuilderFactory
                    .build(LoadPeriodGenerator.onResource(resource),
                            sortedByStartDate);
            return new LoadTimeLine(name, loadPeriods, type, role);
        }
View Full Code Here

        List<LoadTimeLine> buildGroupsByResource(
                Map<Resource, List<ResourceAllocation<?>>> map) {
            List<LoadTimeLine> result = new ArrayList<LoadTimeLine>();
            for (Entry<Resource, List<ResourceAllocation<?>>> each : map
                    .entrySet()) {
                LoadTimeLine l = buildGroupFor(each.getKey(), each.getValue());
                result.add(l);
            }
            return result;
        }
View Full Code Here

                        .sortedByStartDate(each.getValue());
                if (allocations == null) {
                    continue;
                }
                TimeLineRole<BaseEntity> role = getCurrentTimeLineRole(criterion);
                LoadTimeLine group = new LoadTimeLine(createMain(criterion,
                        allocations, role), buildSecondaryLevels(criterion,
                        allocations));
                if (!group.isEmpty()) {
                    result.add(group);
                }
            }
            return result;
        }
View Full Code Here

        }

        private LoadTimeLine createMain(Criterion criterion,
                List<? extends ResourceAllocation<?>> orderedAllocations,
                TimeLineRole<BaseEntity> role) {
            return new LoadTimeLine(criterion.getType().getName() + ": "
                    + criterion.getName(), createPeriods(criterion,
                    orderedAllocations), "global-generic", role);
        }
View Full Code Here

                    result.addAll(buildTimeLinesForOrder(getCurrentOrder(),
                            criterion, allocationsForCurrent));
                }
                byOrder.remove(getCurrentOrder());
                // build time lines for other orders
                LoadTimeLine lineOthersOrders = buildTimeLinesForOtherOrders(
                        criterion, byOrder);
                if (lineOthersOrders != null) {
                    result.add(lineOthersOrders);
                }
            } else {
View Full Code Here

            List<ResourceAllocation<?>> allocations = getAllSortedValues(byOrder);
            if (allocations.isEmpty()) {
                return null;
            }

            LoadTimeLine group = new LoadTimeLine(buildTimeLine(criterion,
                    "Other projects", "global-generic", allocations,
                    getCurrentTimeLineRole(null)), buildTimeLinesGroupForOrder(
                    criterion, byOrder));
            return group;
        }
View Full Code Here

TOP

Related Classes of org.zkoss.ganttz.data.resourceload.LoadTimeLine

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.