Package org.libreplan.ws.resources.api

Examples of org.libreplan.ws.resources.api.ResourceListDTO


    @Override
    @GET
    @Transactional(readOnly = true)
    public ResourceListDTO getResources() {
        return new ResourceListDTO(findAll());
    }
View Full Code Here


                                 // intervals that overlap.
            "c1", getDate(2000, 1, 1), getDate(2000, 2, 1),
            "c2", getDate(2000, 1, 15), getDate(2000, 2, 1));

        /* Test. */
        ResourceListDTO resourceDTOs = createResourceListDTO(
            m1, m2);

        assertOneConstraintViolationPerInstance(
            resourceService.addResources(resourceDTOs),
            resourceDTOs.resources.size());
View Full Code Here

        m2.criterionSatisfactions.add(
            new CriterionSatisfactionDTO(ct.getName(), // Missing criterion.
                null, getDate(2001, 1, 1), null));

        /* Test. */
        ResourceListDTO resourceDTOs = createResourceListDTO(m1, m2);

        assertOneConstraintViolationPerInstance(
            resourceService.addResources(resourceDTOs),
            resourceDTOs.resources.size());

View Full Code Here

        MachineDTO m9 = createMachineDTOWithTwoCostsAssignments("m9",
                costCategory.getName(), getDate(2000, 2, 1),
                getDate(2000, 5, 1), getDate(2000, 2, 1), getDate(2000, 5, 1));

        /* Test. */
        ResourceListDTO resourceDTOs = createResourceListDTO(m1, m2, m3, m4,
                m5, m6, m7, m8, m9);

        assertOneConstraintViolationPerInstance(resourceService
                .addResources(resourceDTOs), resourceDTOs.resources.size());

View Full Code Here

        for (ResourceDTO r : resources) {
            resourceList.add(r);
        }


        return new ResourceListDTO(resourceList);

    }
View Full Code Here

TOP

Related Classes of org.libreplan.ws.resources.api.ResourceListDTO

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.