Examples of IWorkerFinder


Examples of org.libreplan.business.planner.entities.DerivedAllocationGenerator.IWorkerFinder

        derivedFrom = result;
    }

    @SuppressWarnings("unchecked")
    private void givenFinder(Worker... workers) {
        IWorkerFinder result = createNiceMock(IWorkerFinder.class);
        Collection<? extends Criterion> argument = (Collection<? extends Criterion>) anyObject();
        expect(result.findWorkersMatching(argument)).andReturn(
                Arrays.asList(workers)).anyTimes();
        replay(result);
        finder = result;
    }
View Full Code Here

Examples of org.libreplan.business.planner.entities.DerivedAllocationGenerator.IWorkerFinder

    private void updateDerived(List<ModifiedAllocation> allocations) {
        for (ModifiedAllocation each : allocations) {
            ResourceAllocation<?> original = each.getOriginal();
            if (!original.getDerivedAllocations().isEmpty()) {
                IWorkerFinder workersFinder = createFromExistentDerivedAllocationsFinder(original);
                each.getModification().createDerived(workersFinder);
            }
        }
    }
View Full Code Here

Examples of org.libreplan.business.planner.entities.DerivedAllocationGenerator.IWorkerFinder

                .getDerivedAllocations();
        final Set<Worker> allWorkers = new HashSet<Worker>();
        for (DerivedAllocation each : derivedAllocations) {
            allWorkers.addAll(Resource.workers(each.getResources()));
        }
        return new IWorkerFinder() {

            @Override
            public Collection<Worker> findWorkersMatching(
                    Collection<? extends Criterion> requiredCriterions) {
                if (requiredCriterions.isEmpty()) {
View Full Code Here

Examples of org.libreplan.business.planner.entities.DerivedAllocationGenerator.IWorkerFinder

                createWorkerFinder());
        return allocationRowsHandler;
    }

    private IWorkerFinder createWorkerFinder() {
        return new IWorkerFinder() {

            @Override
            public Collection<Worker> findWorkersMatching(
                    Collection<? extends Criterion> requiredCriteria) {
                reassociateResourcesWithSession();
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.