Package com.sun.jersey.server.impl.modelapi.validation

Examples of com.sun.jersey.server.impl.modelapi.validation.BasicValidator


    @Test
    public void testParameterizedTypeResource() throws Exception {
        System.out.println("---\n");
        AbstractResource ar = IntrospectionModeller.createResource(ConcreteParameterizedTypeResource.class);
        BasicValidator validator = new BasicValidator();
        validator.validate(ar);
        printIssueList(validator);
        assertTrue(!validator.fatalIssuesFound());
        assertEquals(0, validator.getIssueList().size());
    }
View Full Code Here


    @Test
    public void testGenericArrayResource() throws Exception {
        System.out.println("---\n");
        AbstractResource ar = IntrospectionModeller.createResource(ConcreteGenericArrayResource.class);
        BasicValidator validator = new BasicValidator();
        validator.validate(ar);
        printIssueList(validator);
        assertTrue(!validator.fatalIssuesFound());
        assertEquals(0, validator.getIssueList().size());
    }
View Full Code Here

        return rc;
    }

    private ResourceClass newResourceClass(final AbstractResource ar) {
        assert null != ar;
        BasicValidator validator = new BasicValidator();
        validator.validate(ar);
        boolean fatalIssueFound = false;
        for (ResourceModelIssue issue : validator.getIssueList()) {
            if (issue.isFatal()) {
                fatalIssueFound = true;
                if (LOGGER.isLoggable(Level.SEVERE)) {
                    LOGGER.severe(issue.getMessage());
                }
View Full Code Here

    }

    private ResourceUriRules newResourceUriRules(final AbstractResource ar) {
        assert null != ar;
       
        BasicValidator validator = new BasicValidator();
        validator.validate(ar);
        for (ResourceModelIssue issue : validator.getIssueList()) {
            Errors.error(issue.getMessage(), issue.isFatal());
        }
        return new ResourceUriRules(
                resourceConfig,
                dispatcherFactory,
View Full Code Here

TOP

Related Classes of com.sun.jersey.server.impl.modelapi.validation.BasicValidator

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.