javax.validation.bootstrap.GenericBootstrap Java Examples

The following examples show how to use javax.validation.bootstrap.GenericBootstrap. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ValidationBundle.java    From packagedrone with Eclipse Public License 1.0 5 votes vote down vote up
private static Validator buildValidator ()
{
    final GenericBootstrap bootstrap = Validation.byDefaultProvider ();
    bootstrap.providerResolver ( tracker );

    final Configuration<?> cfg = bootstrap.configure ();
    final OsgiMessageInterpolator mi = getMessageInterpolator ();
    mi.setFallback ( cfg.getDefaultMessageInterpolator () );
    cfg.messageInterpolator ( mi );

    final ValidatorFactory factory = cfg.buildValidatorFactory ();
    return factory.getValidator ();
}
 
Example #2
Source File: ActionValidator.java    From lastaflute with Apache License 2.0 4 votes vote down vote up
protected GenericBootstrap newGenericBootstrap() {
    return Validation.byDefaultProvider();
}