Package org.libreplan.importers.tim

Examples of org.libreplan.importers.tim.TimeRegistrationDTO


        DurationDTO durationDTO = new DurationDTO();
        durationDTO.setOptions(TimOptions.DECIMAL);
        durationDTO.setDuration(hours);

        TimeRegistrationDTO timeRegistrationDTO = new TimeRegistrationDTO();
        timeRegistrationDTO.setPerson(personDTO);
        timeRegistrationDTO.setProduct(productDTO);
        timeRegistrationDTO.setRegistrationDate(dateDTO);
        timeRegistrationDTO.setDuration(durationDTO);
        return timeRegistrationDTO;
    }
View Full Code Here


    @Test
    @Ignore("Only working if you have a Tim server configured")
    public void testExportTimeRegistrationWith1Item() {
        List<TimeRegistrationDTO> timeRegistrations = new ArrayList<TimeRegistrationDTO>();
        TimeRegistrationDTO timeRegistration = createTimeRegistration(
                "Baten, Jeroen", "5160", new LocalDate().minusDays(1), 9.00);
        timeRegistrations.add(timeRegistration);
        TimeRegistrationRequestDTO timeRegistrationRequestDTO = new TimeRegistrationRequestDTO();
        timeRegistrationRequestDTO.setTimeRegistrations(timeRegistrations);
View Full Code Here

    @Test
    @Ignore("Only working if you have a Tim server configured")
    public void testExportTimeRegistrationWith2Items() {
        List<TimeRegistrationDTO> timeRegistrationDTOs = new ArrayList<TimeRegistrationDTO>();
        TimeRegistrationDTO timeRegistrationDTO1 = createTimeRegistration(
                "Baten, Jeroen", "5160", new LocalDate(), 8.00);
        timeRegistrationDTOs.add(timeRegistrationDTO1);

        TimeRegistrationDTO timeRegistrationDTO2 = createTimeRegistration(
                "Baten, Jeroen", "5160", new LocalDate(), 9.00);
        timeRegistrationDTOs.add(timeRegistrationDTO2);

        TimeRegistrationRequestDTO timeRegistrationRequest = new TimeRegistrationRequestDTO();
        timeRegistrationRequest.setTimeRegistrations(timeRegistrationDTOs);
View Full Code Here

        }

        List<TimeRegistrationDTO> timeRegistrationDTOs = new ArrayList<TimeRegistrationDTO>();

        for (WorkReportLine workReportLine : workReportLines) {
            TimeRegistrationDTO timeRegistrationDTO = createExportTimeRegistration(
                    productCode, workReportLine);
            if (timeRegistrationDTO != null) {
                timeRegistrationDTOs.add(timeRegistrationDTO);
            }
        }
View Full Code Here

        DurationDTO durationDTO = new DurationDTO();
        durationDTO.setOptions(TimOptions.DECIMAL);
        durationDTO.setDuration(workReportLine.getEffort()
                .toHoursAsDecimalWithScale(2).doubleValue());

        TimeRegistrationDTO timeRegistrationDTO = new TimeRegistrationDTO();
        timeRegistrationDTO.setPerson(personDTO);
        timeRegistrationDTO.setProduct(productDTO);
        timeRegistrationDTO.setRegistrationDate(registrationDTO);
        timeRegistrationDTO.setDuration(durationDTO);
        return timeRegistrationDTO;
    }
View Full Code Here

TOP

Related Classes of org.libreplan.importers.tim.TimeRegistrationDTO

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.