diff --git a/documentation/src/main/docbook/en-US/modules/bootstrapping.xml b/documentation/src/main/docbook/en-US/modules/bootstrapping.xml index db7fe83c54..4850b0a3cb 100644 --- a/documentation/src/main/docbook/en-US/modules/bootstrapping.xml +++ b/documentation/src/main/docbook/en-US/modules/bootstrapping.xml @@ -23,7 +23,7 @@ Bootstrapping - We already seen in the + We already seen in the easiest way to create a Validator instance - Validation.buildDefaultValidatorFactory. In this chapter we have a look at the other methods in @@ -33,7 +33,7 @@ The different bootstrapping options allow, amongst other things, to bootstrap any Bean Validation implementation on the classpath. Generally, an available provider is discovered by the Java + url="http://docs.oracle.com/javase/6/docs/technotes/guides/jar/jar.html#Service%20Provider">Java Service Provider mechanism. A Bean Validation implementation includes the file javax.validation.spi.ValidationProvider in @@ -57,7 +57,7 @@ There are three different methods in the Validation class to create a Validator instance. The easiest in shown in . + linkend="example-build-default-validator-factory"/>. Validation.buildDefaultValidatorFactory() @@ -120,7 +120,7 @@ Validator validator = factory.getValidator(); in your environment or you have a special classloader setup, you are able to provide a custom ValidationProviderResolver. An example in an OSGi environment you could plug your custom provider - resolver like seen in . + resolver like seen in . Providing a custom ValidationProviderResolver @@ -156,7 +156,7 @@ Validator validator = factory.getValidator();
<classname>MessageInterpolator</classname> - already discussed + already discussed the default message interpolation algorithm. If you have special requirements for your message interpolation you can provide a custom interpolator using @@ -164,7 +164,7 @@ Validator validator = factory.getValidator(); interpolator will be shared by all validators generated by the ValidatorFactory created from this Configuration. shows an interpolator (available + linkend="example-message-interpolator"/> shows an interpolator (available in Hibernate Validator) which can interpolate the value being validated in the constraint message. To refer to this value in the constraint message you can use: @@ -217,7 +217,7 @@ Validator validator = factory.getValidator(); to specify a custom implementation of ResourceBundleLocator allowing you to provide your own resource bundles. shows an example. In the + linkend="example-resource-bundle-locator"/> shows an example. In the example HibernateValidatorConfiguration.getDefaultResourceBundleLocator is used to retrieve the default @@ -257,7 +257,7 @@ configure.messageInterpolator(new ResourceBundleMessageInterpolator(myResourceBu would have to be accessed triggering a load from the database. Bean Validation controls which property can and cannot be accessed via the TraversableResolver interface (see ). In the example + linkend="example-traversable-resolver"/>). In the example HibernateValidatorConfiguration. @@ -330,7 +330,7 @@ public interface TraversableResolver { Hibernate Validator gets used in combination with JPA 2. In case you have to provide your own resolver you can do so again using the Configuration object as seen in . + linkend="example-traversable-resolver-config"/>. Providing a custom TraversableResolver @@ -353,12 +353,12 @@ Validator validator = factory.getValidator(); default ConstraintValidatorFactory provided by Hibernate Validator requires a public no-arg constructor to instantiate ConstraintValidator instances (see ). Using a custom + linkend="section-constraint-validator"/>). Using a custom ConstraintValidatorFactory offers for example the possibility to use dependency injection in constraint implementations. The configuration of the custom factory is once more via the Configuration (). + linkend="example-constraint-validator-factory"/>). Providing a custom ConstraintValidatorFactory