Package org.apache.bval.jsr303

Examples of org.apache.bval.jsr303.Jsr303Features$Property


        StringBuffer url = request.getRequestURL().replace(index, request.getRequestURL().length(), newContext);
        applicationController.subscribeUserAndCreateStatistic(Long.valueOf(applicationVersionId), request);

        String itmsURL = "itms-services://?action=download-manifest&url=" + url.toString();

        Property property = new Property();
        property.setKey("URL");
        property.setValue(itmsURL);

        return property;
    }
View Full Code Here


    @RequestMapping(value = "/statistics", method = RequestMethod.GET, produces = contentType)
    public
    @ResponseBody
    Properties viewSystemManagementPage(HttpServletRequest request) {
        Property[] properties = new Property[3];
        properties[0] = new Property(SystemStatistics.ORGANIZATION_COUNT.name(), Long.toString(organizationService.countAll()), SystemStatistics.ORGANIZATION_COUNT.getDescription());
        properties[1] = new Property(SystemStatistics.USER_COUNT.name(), Long.toString(userService.countAll()), SystemStatistics.USER_COUNT.getDescription());
        properties[2] = new Property(SystemStatistics.APPLICATION_COUNT.name(), Long.toString(applicationService.countAll()), SystemStatistics.APPLICATION_COUNT.getDescription());

        Properties props = new Properties();
        props.setProperties(properties);

        return props;
View Full Code Here

    }

    public void testParse() {
        ValidationParser vp = new ValidationParser("sample-validation.xml");
        ConfigurationImpl config =
              new ConfigurationImpl(null, new ApacheValidationProvider());
        vp.processValidationConfig(config);
    }
View Full Code Here

    private final ValidatorFactory validatorFactory;

    @Inject
    public ValidatorFactoryProvider(ConfigurationState configurationState) {
        this.validatorFactory = new ApacheValidationProvider().buildValidatorFactory(configurationState);
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public ValidatorFactory get()
    {
        return new ApacheValidationProvider().buildValidatorFactory( configurationState );
    }
View Full Code Here

        System.setProperty(ValidatorBuilder.VALIDATION_PROVIDER_KEY, CustomValidatorProvider.class.getName());
    }

    @AfterClass
    public static void resetProvider() {
        CustomValidatorProvider.provider = new ApacheValidationProvider();
        System.clearProperty(ValidatorBuilder.VALIDATION_PROVIDER_KEY);
    }
View Full Code Here

        Validator validator = factory.getValidator();
        assertNotNull(validator);
    }

    private ValidatorFactory getFactory() {
        ApacheValidatorConfiguration config =
              Validation.byProvider(ApacheValidationProvider.class).configure();
        config.addProperty(VALIDATION_XML_PATH, "sample-validation.xml");
        return config.buildValidatorFactory();
    }
View Full Code Here

    private final ApacheValidatorFactory validatorFactory;

    @Inject
    public ValidatorFactoryProvider(ConfigurationState configurationState) {
        this.validatorFactory = new ApacheValidatorFactory();
        this.validatorFactory.configure(configurationState);
    }
View Full Code Here

        return new TestSuite(MethodValidatorImplTest.class);
    }

    public void testUnwrap() {
        Validator v = getValidator();
        ClassValidator cv = v.unwrap(ClassValidator.class);
        assertTrue(v == cv);
        assertTrue(v == v.unwrap(Validator.class));
        MethodValidatorImpl mvi = v.unwrap(MethodValidatorImpl.class);
        assertNotNull(mvi);
        MethodValidator mv = v.unwrap(MethodValidator.class);
View Full Code Here

        return new TestSuite(MethodValidatorImplTest.class);
    }

    public void testUnwrap() {
        Validator v = getValidator();
        ClassValidator cv = v.unwrap(ClassValidator.class);
        assertTrue(v == cv);
        assertTrue(v == v.unwrap(Validator.class));
        MethodValidatorImpl mvi = v.unwrap(MethodValidatorImpl.class);
        assertNotNull(mvi);
        MethodValidator mv = v.unwrap(MethodValidator.class);
View Full Code Here

TOP

Related Classes of org.apache.bval.jsr303.Jsr303Features$Property

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.