|
package javax.validation;
/**
* Validation factory proxy, for can be used everywhere in application
* as a OSGi service.
*
* @author ADRABI Abderrahim (z3vil)
*
*/
public class ValidatorFactoryProxy implements ValidatorFactory
{
private ValidatorFactory factory = null;
public ValidatorFactoryProxy()
{
this.factory = Validation.buildDefaultValidatorFactory();
}
@Override
public Validator getValidator()
{
return this.factory.getValidator();
}
@Override
public ValidatorContext usingContext()
{
return this.factory.usingContext();
}
@Override
public MessageInterpolator getMessageInterpolator()
{
return this.factory.getMessageInterpolator();
}
@Override
public TraversableResolver getTraversableResolver()
{
return this.factory.getTraversableResolver();
}
@Override
public ConstraintValidatorFactory getConstraintValidatorFactory()
{
return this.factory.getConstraintValidatorFactory();
}
@Override
public <T> T unwrap(Class<T> type)
{
return this.factory.unwrap(type);
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.