Package org.libreplan.business.resources.entities

Examples of org.libreplan.business.resources.entities.MachineWorkerAssignment


    private Set<MachineWorkerAssignment> assignmentsFor(
            MachineWorkersConfigurationUnit unit, Worker[] workers) {
        Set<MachineWorkerAssignment> result = new HashSet<MachineWorkerAssignment>();
        for (Worker each : workers) {
            MachineWorkerAssignment assignment = workerAssignment(unit,each);
            result.add(assignment);
        }
        return result;
    }
View Full Code Here


        return result;
    }

    private MachineWorkerAssignment workerAssignment(
            MachineWorkersConfigurationUnit unit, Worker each) {
        MachineWorkerAssignment result = createNiceMock(MachineWorkerAssignment.class);
        expect(result.getMachineWorkersConfigurationUnit()).andReturn(unit)
                .anyTimes();
        expect(result.getWorker()).andReturn(each);
        expect(result.getStartDate()).andReturn(
                asDate(new LocalDate(2000, 1, 1))).anyTimes();
        expect(result.getFinishDate()).andReturn(null).anyTimes();
        replay(result);
        return result;
    }
View Full Code Here

        Util.reloadBindings(configurationUnitsGrid);
    }


    public void deleteWorkerAssignment(Component component) {
        MachineWorkerAssignment assignment = (MachineWorkerAssignment) ((Row) component)
                .getValue();
        MachineWorkersConfigurationUnit conf = assignment
                .getMachineWorkersConfigurationUnit();
        conf.removeMachineWorkersConfigurationUnit(assignment);
        Util.reloadBindings(component.getParent().getParent());
    }
View Full Code Here

TOP

Related Classes of org.libreplan.business.resources.entities.MachineWorkerAssignment

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.