Package org.libreplan.ws.common.api

Examples of org.libreplan.ws.common.api.OrderDTO


                }
                return null;
            }
        });

        OrderDTO orderDTO = new OrderDTO();
        orderDTO.name = "Order name " + UUID.randomUUID().toString();
        orderDTO.code = code;
        orderDTO.initDate = DateConverter.toXMLGregorianCalendar(new Date());

        String name = PredefinedCriterionTypes.LOCATION.getPredefined().get(0);
View Full Code Here


                }
                return null;
            }
        });

        OrderDTO orderDTO = new OrderDTO();
        orderDTO.name = "Order name " + UUID.randomUUID().toString();
        orderDTO.code = code;
        orderDTO.initDate = DateConverter.toXMLGregorianCalendar(new Date());

        String name = PredefinedCriterionTypes.LOCATION.getPredefined().get(0);
View Full Code Here

                }
                return null;
            }
        });

        OrderDTO orderDTO = new OrderDTO();
        orderDTO.name = "Order name";
        orderDTO.code = code;
        orderDTO.initDate = DateConverter.toXMLGregorianCalendar(new Date());

        String name = PredefinedCriterionTypes.LOCATION.getPredefined().get(0);
View Full Code Here

    public void testCannotExistTwoOrderElementsWithTheSameCode() {
        final String repeatedCode = "code1";

        OrderLineDTO orderLineDTO = createOrderLineDTO(repeatedCode);

        OrderDTO orderDTO = createOrderDTO(repeatedCode);
        orderDTO.children.add(orderLineDTO);

        OrderListDTO orderListDTO = createOrderListDTO(orderDTO);
        List<InstanceConstraintViolationsDTO> instanceConstraintViolationsList = orderElementService
                .addOrders(orderListDTO).instanceConstraintViolationsList;
View Full Code Here

        orderLineDTO1.hoursGroups.add(createHoursGroupDTO(repeatedCode));

        OrderLineDTO orderLineDTO2 = createOrderLineDTO("orderLineCode2");
        orderLineDTO2.hoursGroups.add(createHoursGroupDTO(repeatedCode));

        OrderDTO orderDTO = createOrderDTO("orderCode");
        orderDTO.children.add(orderLineDTO1);
        orderDTO.children.add(orderLineDTO2);

        OrderListDTO orderListDTO = createOrderListDTO(orderDTO);
        List<InstanceConstraintViolationsDTO> instanceConstraintViolationsList = orderElementService
View Full Code Here

        assertTrue(instanceConstraintViolationsList.toString(),
                instanceConstraintViolationsList.size() == 1);
    }

    private OrderDTO createOrderDTO(String code) {
        OrderDTO result = new OrderDTO();
        result.initDate = DateConverter.toXMLGregorianCalendar(new Date());
        result.code = code;
        result.name = UUID.randomUUID().toString();
        return result;
    }
View Full Code Here

                String calendarName = null;
                if (calendar != null) {
                    calendarName = calendar.getName();
                }

                return new OrderDTO(name, code, initDate, deadline,
                        description, labels, materialAssignments,
                        advanceMeasurements, criterionRequirements, children,
                        dependenciesConstraintsHavePriority, calendarName);
            } else { // orderElement instanceof OrderLineGroup
                return new OrderLineGroupDTO(name, code, initDate, deadline,
View Full Code Here

TOP

Related Classes of org.libreplan.ws.common.api.OrderDTO

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.