Package org.jbpm.formbuilder.server.xml

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


    @GET @Path("/validations")
    public Response getValidations() {
        init();
        try {
            List<ValidationDescription> validations = menuService.listValidations();
            ListValidationsDTO dto = new ListValidationsDTO(validations);
            return Response.ok(dto, MediaType.APPLICATION_XML).build();
        } catch (MenuServiceException e) {
            return error("Problem reading validations", e);
        }
    }
View Full Code Here


        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 ListOptionsDTO", entity instanceof ListValidationsDTO);
        ListValidationsDTO dto = (ListValidationsDTO) entity;
        List<ValidationDTO> validations = dto.getValidation();
        assertNotNull("validations shouldn't be null", validations);
        assertFalse("validations shouldn't be empty", validations.isEmpty());
        assertEquals("validations should have " + retval.size() + " elements but has " + validations.size(), validations.size(), retval.size());
    }
View Full Code Here

TOP

Related Classes of org.jbpm.formbuilder.server.xml.ListValidationsDTO

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.