Examples of ListMenuItemsDTO


Examples of org.jbpm.formbuilder.server.xml.ListMenuItemsDTO

    @GET @Path("/items")
    public Response listMenuItems() {
        init();
        try {
            Map<String, List<MenuItemDescription>> items = menuService.listMenuItems();
            ListMenuItemsDTO dto = new ListMenuItemsDTO(items);
            return Response.ok(dto, MediaType.APPLICATION_XML).build();
        } catch (MenuServiceException e) {
            return error("Problem reading menu items", e);
        }
    }
View Full Code Here

Examples of org.jbpm.formbuilder.server.xml.ListMenuItemsDTO

        assertNotNull("resp.metadata shouldn't be null", resp.getMetadata());
        Object contentType = resp.getMetadata().getFirst(HttpHeaderNames.CONTENT_TYPE);
        assertNotNull("resp.entity shouldn't be null", contentType);
        assertEquals("contentType should be application/xml but is" + contentType, contentType, MediaType.APPLICATION_XML);
        assertTrue("entity should be of type ListMenuItemsDTO", entity instanceof ListMenuItemsDTO);
        ListMenuItemsDTO dto = (ListMenuItemsDTO) entity;
        List<MenuGroupDTO> menuGroup = dto.getMenuGroup();
        assertNotNull("dto.menuGroup shouldn't be null", menuGroup);
        assertFalse("dto.menuGroup shouldn't be empty", menuGroup.isEmpty());
        assertEquals("dto.menuGroup should have one element but has " + menuGroup.size(), menuGroup.size(), 1);
        MenuGroupDTO groupDto = menuGroup.iterator().next();
        assertNotNull("groupDto shouldn't be null", groupDto);
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.