Examples of MaterialCategoryDTO


Examples of org.libreplan.ws.materials.api.MaterialCategoryDTO

        String parentCode = null;
        if (materialCategory.getParent() != null) {
            parentCode = materialCategory.getParent().getCode();
        }

        return new MaterialCategoryDTO(materialCategory.getCode(),
                materialCategory.getName(), parentCode, subcategories,
                materialDTOs);

    }
View Full Code Here

Examples of org.libreplan.ws.materials.api.MaterialCategoryDTO

        materialDTOs.add(m1);
        materialDTOs.add(m2);
        materialDTOs.add(m3);
        materialDTOs.add(m4);

        MaterialCategoryDTO materialCategoryDTO = new MaterialCategoryDTO(
                "categoryA", null, null, materialDTOs);

        MaterialCategoryListDTO materialCategoryListDTO = createMaterialCategoryListDTO(materialCategoryDTO);

        List<InstanceConstraintViolationsDTO> instanceConstraintViolationsList = materialService
View Full Code Here

Examples of org.libreplan.ws.materials.api.MaterialCategoryDTO

        List<MaterialDTO> materialDTOs = new ArrayList<MaterialDTO>();
        materialDTOs.add(m1);
        materialDTOs.add(m2);

        MaterialCategoryDTO materialCategoryDTO = new MaterialCategoryDTO(
                "category1", null, null, materialDTOs);

        MaterialCategoryListDTO materialCategoryListDTO = createMaterialCategoryListDTO(materialCategoryDTO);

        List<InstanceConstraintViolationsDTO> instanceConstraintViolationsList = materialService
View Full Code Here

Examples of org.libreplan.ws.materials.api.MaterialCategoryDTO

        List<MaterialDTO> materialDTOs2 = new ArrayList<MaterialDTO>();
        materialDTOs1.add(m1);
        materialDTOs2.add(m2);

        /* Build material (0 constraint violations). */
        MaterialCategoryDTO mc1 = new MaterialCategoryDTO("CodeMC1",
                "subCategory1", "mainMaterialCode", null, materialDTOs1);
        MaterialCategoryDTO mc2 = new MaterialCategoryDTO("CodeMC2",
                "subCategory2", null, null, materialDTOs2);
        MaterialCategoryListDTO subCategoryListDTO = createMaterialCategoryListDTO(
                mc1, mc2);

        /* Build main material category */
        MaterialCategoryDTO materialCategoryDTO = new MaterialCategoryDTO(
                "mainMaterialCode", "mainCategory1", null, subCategoryListDTO,
                null);

        MaterialCategoryListDTO materialCategoryListDTO = createMaterialCategoryListDTO(materialCategoryDTO);

View Full Code Here

Examples of org.libreplan.ws.materials.api.MaterialCategoryDTO

    @Test
    @Transactional
    public void testAddMaterialCategoryWithSameName() {
        /* Build material (0 constraint violations). */
        MaterialCategoryDTO mc1 = new MaterialCategoryDTO("subMC1",
                "subCategory", "subMC2", null, null);
        MaterialCategoryListDTO subCategoryListDTOC = createMaterialCategoryListDTO(mc1);

        MaterialCategoryDTO mc2 = new MaterialCategoryDTO("subMC2",
                "subCategory", null, subCategoryListDTOC, null);
        MaterialCategoryListDTO subCategoryListDTOB = createMaterialCategoryListDTO(mc2);

        /* Build main material category */
        MaterialCategoryDTO materialCategoryDTO = new MaterialCategoryDTO(
                "mainMaterialCode", "mainCategory1", null, subCategoryListDTOB,
                null);

        MaterialCategoryListDTO materialCategoryListDTOA = createMaterialCategoryListDTO(materialCategoryDTO);

View Full Code Here

Examples of org.libreplan.ws.materials.api.MaterialCategoryDTO

    @Test
    @Transactional
    public void testAddMaterialCategoryWithInconsistentParent() {
        /* Build material (0 constraint violations). */
        MaterialCategoryDTO mc1 = new MaterialCategoryDTO("subMCX1",
                "subCategoryC", "mainMaterialCode", null, null);
        MaterialCategoryListDTO subCategoryListDTOC = createMaterialCategoryListDTO(mc1);

        MaterialCategoryDTO mc2 = new MaterialCategoryDTO("subMCX2",
                "subCategoryB", null, subCategoryListDTOC, null);
        MaterialCategoryListDTO subCategoryListDTOB = createMaterialCategoryListDTO(mc2);

        /* Build main material category */
        MaterialCategoryDTO materialCategoryDTO = new MaterialCategoryDTO(
                "mainMaterialCodeX", "mainCategory1", null,
                subCategoryListDTOB,
                null);

        MaterialCategoryListDTO materialCategoryListDTOA = createMaterialCategoryListDTO(materialCategoryDTO);
View Full Code Here

Examples of org.libreplan.ws.materials.api.MaterialCategoryDTO

                        .getCode(), true);

        List<MaterialDTO> materialDTOs1 = new ArrayList<MaterialDTO>();
        materialDTOs1.add(m1);

        MaterialCategoryDTO mc1 = new MaterialCategoryDTO("MC-C", "MC-C",
                "MC-B",
                null, null);
        MaterialCategoryListDTO subCategoryListDTOC = createMaterialCategoryListDTO(mc1);

        MaterialCategoryDTO mc2 = new MaterialCategoryDTO("MC-B", "MC-B",
                "C-A",
                subCategoryListDTOC, materialDTOs1);
        MaterialCategoryListDTO subCategoryListDTOB = createMaterialCategoryListDTO(mc2);

        /* Build main material category */
        MaterialCategoryDTO materialCategoryDTO = new MaterialCategoryDTO(
                "C-A", "C-A", null, subCategoryListDTOB, null);

        MaterialCategoryListDTO materialCategoryListDTOA = createMaterialCategoryListDTO(materialCategoryDTO);

        List<InstanceConstraintViolationsDTO> instanceConstraintViolationsList = materialService
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.