Author: epbernard
Date: 2009-09-30 13:36:15 -0400 (Wed, 30 Sep 2009)
New Revision: 17589
Modified:
beanvalidation/api/trunk/src/main/java/javax/validation/Configuration.java
beanvalidation/api/trunk/src/main/java/javax/validation/Validation.java
beanvalidation/api/trunk/src/main/java/javax/validation/ValidationProviderResolver.java
beanvalidation/api/trunk/src/main/java/javax/validation/bootstrap/GenericBootstrap.java
beanvalidation/api/trunk/src/main/java/javax/validation/bootstrap/ProviderSpecificBootstrap.java
beanvalidation/api/trunk/src/main/java/javax/validation/spi/BootstrapState.java
beanvalidation/api/trunk/src/main/java/javax/validation/spi/ConfigurationState.java
beanvalidation/api/trunk/src/main/java/javax/validation/spi/ValidationProvider.java
Log:
Enhance JavaDoc
Modified: beanvalidation/api/trunk/src/main/java/javax/validation/Configuration.java
===================================================================
--- beanvalidation/api/trunk/src/main/java/javax/validation/Configuration.java 2009-09-30
17:20:44 UTC (rev 17588)
+++ beanvalidation/api/trunk/src/main/java/javax/validation/Configuration.java 2009-09-30
17:36:15 UTC (rev 17589)
@@ -152,8 +152,9 @@
T addProperty(String name, String value);
/**
- * Return an implementation of the MessageInterpolator interface following the
- * default MessageInterpolator defined in the specification:
+ * Return an implementation of the <code>MessageInterpolator</code>
interface
+ * following the default <code>MessageInterpolator</code> defined in the
+ * specification:
* <ul>
* <li>use the ValidationMessages resource bundle to load keys</li>
* <li>use Locale.getDefault()</li>
@@ -164,8 +165,9 @@
MessageInterpolator getDefaultMessageInterpolator();
/**
- * Return an implementation of the TraversableResolver interface following the
- * default TraversableResolver defined in the specification:
+ * Return an implementation of the <code>TraversableResolver</code>
interface
+ * following the default <code>TraversableResolver</code> defined in the
+ * specification:
* <ul>
* <li>if Java Persistence is available in the runtime environment,
* a property is considered reachable if Java Persistence considers
@@ -180,8 +182,9 @@
TraversableResolver getDefaultTraversableResolver();
/**
- * Return an implementation of the ConstraintValidatorFactory interface following the
- * default ConstraintValidatorFactory defined in the specification:
+ * Return an implementation of the <code>ConstraintValidatorFactory</code>
interface
+ * following the default <code>ConstraintValidatorFactory</code> defined in
the
+ * specification:
* <ul>
* <li>uses the public no-arg constructor of the
<code>ConstraintValidator</code></li>
* </ul>
@@ -191,7 +194,7 @@
ConstraintValidatorFactory getDefaultConstraintValidatorFactory();
/**
- * Build a ValidatorFactory implementation.
+ * Build a <code>ValidatorFactory</code> implementation.
*
* @return ValidatorFactory
* @throws ValidationException if the ValidatorFactory cannot be built
Modified: beanvalidation/api/trunk/src/main/java/javax/validation/Validation.java
===================================================================
--- beanvalidation/api/trunk/src/main/java/javax/validation/Validation.java 2009-09-30
17:20:44 UTC (rev 17588)
+++ beanvalidation/api/trunk/src/main/java/javax/validation/Validation.java 2009-09-30
17:36:15 UTC (rev 17589)
@@ -35,11 +35,11 @@
import javax.validation.spi.ValidationProvider;
/**
- * This class is the entry point for the Bean Validation framework. There are three ways
- * to bootstrap the framework:
+ * This class is the entry point for Bean Validation. There are three ways
+ * to bootstrap it:
* <ul>
* <li>
- * The easiest approach is to build the default ValidatorFactory.
+ * The easiest approach is to build the default
<code>ValidatorFactory</code>.
* <pre>{@code ValidatorFactory factory =
Validation.buildDefaultValidatorFactory();}</pre>
* In this case, the default validation provider resolver
* will be used to locate available providers.
@@ -47,8 +47,8 @@
* <ul>
* <li>if the XML configuration defines a provider, this provider is
used</li>
* <li>if the XML configuration does not define a provider or if no XML
configuration
- * is present the first provider returned by the ValidationProviderResolver
- * isntance is used.</li>
+ * is present the first provider returned by the
+ * <code>ValidationProviderResolver</code> instance is used.</li>
* </ul>
* </li>
* <li>
@@ -81,8 +81,8 @@
* Note:<br/>
* <ul>
* <li>
- * The ValidatorFactory object built by the bootstrap process should be cached
- * and shared amongst Validator consumers.
+ * The <code>ValidatorFactory</code> object built by the bootstrap process
should be cached
+ * and shared amongst <code>Validator</code> consumers.
* </li>
* <li>
* This class is thread-safe.
@@ -95,9 +95,8 @@
public class Validation {
/**
- * Build and return a ValidatorFactory instance based on the
- * default Bean Validation provider and following the
- * XML configuration.
+ * Build and return a <code>ValidatorFactory</code> instance based on the
+ * default Bean Validation provider and following the XML configuration.
* <p/>
* The provider list is resolved using the default validation provider resolver
* logic.
@@ -147,8 +146,8 @@
* </pre>,
* where <code>ACMEConfiguration</code> is the
* <code>Configuration</code> sub interface uniquely identifying the
- * ACME Bean Validation provider. and ACMEProvider is the ValidationProvider
- * implementation of the ACME provider.
+ * ACME Bean Validation provider. and <code>ACMEProvider</code> is the
+ * <code>ValidationProvider</code> implementation of the ACME provider.
*
* @param providerType the <code>ValidationProvider</code> implementation
type
*
Modified:
beanvalidation/api/trunk/src/main/java/javax/validation/ValidationProviderResolver.java
===================================================================
---
beanvalidation/api/trunk/src/main/java/javax/validation/ValidationProviderResolver.java 2009-09-30
17:20:44 UTC (rev 17588)
+++
beanvalidation/api/trunk/src/main/java/javax/validation/ValidationProviderResolver.java 2009-09-30
17:36:15 UTC (rev 17589)
@@ -29,7 +29,7 @@
* <a
href="http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#Service...
* <p/>
* Each META-INF/services/javax.validation.spi.ValidationProvider file contains the list
of
- * ValidationProvider implementations each of them representing a provider.
+ * <code>ValidationProvider</code> implementations each of them representing
a provider.
* <p/>
* Implementations must be thread-safe.
*
Modified:
beanvalidation/api/trunk/src/main/java/javax/validation/bootstrap/GenericBootstrap.java
===================================================================
---
beanvalidation/api/trunk/src/main/java/javax/validation/bootstrap/GenericBootstrap.java 2009-09-30
17:20:44 UTC (rev 17588)
+++
beanvalidation/api/trunk/src/main/java/javax/validation/bootstrap/GenericBootstrap.java 2009-09-30
17:36:15 UTC (rev 17589)
@@ -22,7 +22,7 @@
/**
* Defines the state used to bootstrap Bean Validation and
- * creates a provider agnostic Configuration.
+ * creates a provider agnostic <code>Configuration</code>.
*
* @author Emmanuel Bernard
*/
@@ -30,9 +30,9 @@
/**
* Defines the provider resolution strategy.
* This resolver returns the list of providers evaluated
- * to build the Configuration
+ * to build the <code>Configuration</code>
* <p/>
- * If no resolver is defined, the default ValidationProviderResolver
+ * If no resolver is defined, the default
<code>ValidationProviderResolver</code>
* implementation is used.
*
* @return <code>this</code> following the chaining method pattern
@@ -40,11 +40,12 @@
GenericBootstrap providerResolver(ValidationProviderResolver resolver);
/**
- * Returns a generic Configuration implementation.
- * At this stage the provider used to build the ValidatorFactory is not defined.
+ * Returns a generic <code>Configuration</code> implementation.
+ * At this stage the provider used to build the
<code>ValidatorFactory</code>
+ * is not defined.
* <p/>
- * The Configuration implementation is provided by the first provider returned
- * by the ValidationProviderResolver strategy.
+ * The <code>Configuration</code> implementation is provided by the first
provider
+ * returned by the <code>ValidationProviderResolver</code> strategy.
*
* @return a Configuration implementation compliant with the bootstrap state
* @throws javax.validation.ValidationException if the Configuration object cannot be
built
Modified:
beanvalidation/api/trunk/src/main/java/javax/validation/bootstrap/ProviderSpecificBootstrap.java
===================================================================
---
beanvalidation/api/trunk/src/main/java/javax/validation/bootstrap/ProviderSpecificBootstrap.java 2009-09-30
17:20:44 UTC (rev 17588)
+++
beanvalidation/api/trunk/src/main/java/javax/validation/bootstrap/ProviderSpecificBootstrap.java 2009-09-30
17:36:15 UTC (rev 17589)
@@ -23,36 +23,37 @@
/**
* Defines the state used to bootstrap Bean Validation and
- * creates a provider specific Configuration <code>T</code>.
+ * creates a provider specific <code>Configuration</code>
+ * of type<code>T</code>.
* <p/>
- * The specific Configuration is linked to the provider via the generic
- * parameter of the ValidationProvider implementation.
+ * The specific <code>Configuration</code> is linked to the provider via the
generic
+ * parameter of the <code>ValidationProvider</code> implementation.
* <p/>
* The requested provider is the first provider instance assignable to
- * the requested provider type (known when ProviderSpecificBootstrap is built).
+ * the requested provider type (known when
<code>ProviderSpecificBootstrap</code> is built).
* The list of providers evaluated is returned by {@link ValidationProviderResolver}.
- * If no ValidationProviderResolver is defined, the
- * default ValidationProviderResolver strategy is used.
+ * If no <code>ValidationProviderResolver</code> is defined, the
+ * default <code>ValidationProviderResolver</code> strategy is used.
*
* @author Emmanuel Bernard
*/
public interface ProviderSpecificBootstrap<T extends Configuration<T>> {
/**
- * Optionally define the provider resolver implementation used.
- * If not defined, use the default ValidationProviderResolver
+ * Optionally defines the provider resolver implementation used.
+ * If not defined, use the default <code>ValidationProviderResolver</code>
*
- * @param resolver ValidationProviderResolver implementation used
+ * @param resolver <code>ValidationProviderResolver</code> implementation
used
*
* @return <code>this</code> following the chaining method pattern
*/
public ProviderSpecificBootstrap<T> providerResolver(ValidationProviderResolver
resolver);
/**
- * Determine the provider implementation suitable for T and delegate
- * the creation of this specific Configuration subclass to the provider.
+ * Determines the provider implementation suitable for <code>T</code> and
delegates
+ * the creation of this specific <code>Configuration</code> subclass to the
provider.
*
- * @return a Configuration sub interface implementation
+ * @return <code>Configuration</code> sub interface implementation
* @throws javax.validation.ValidationException if the Configuration object cannot be
built
* this is generally due to an issue with the
ValidationProviderResolver
*/
Modified: beanvalidation/api/trunk/src/main/java/javax/validation/spi/BootstrapState.java
===================================================================
---
beanvalidation/api/trunk/src/main/java/javax/validation/spi/BootstrapState.java 2009-09-30
17:20:44 UTC (rev 17588)
+++
beanvalidation/api/trunk/src/main/java/javax/validation/spi/BootstrapState.java 2009-09-30
17:36:15 UTC (rev 17589)
@@ -20,22 +20,23 @@
import javax.validation.ValidationProviderResolver;
/**
- * Defines the state used to bootstrap the Configuration
+ * Defines the state used to bootstrap the <code>Configuration</code>
*
* @author Emmanuel Bernard
* @author Sebastian Thomschke
*/
public interface BootstrapState {
/**
- * User defined ValidationProviderResolver strategy instance or
<code>null</code>
- * if undefined.
+ * User defined <code>ValidationProviderResolver</code> strategy
+ * instance or <code>null</code> if undefined.
*
* @return ValidationProviderResolver instance or null
*/
ValidationProviderResolver getValidationProviderResolver();
/**
- * Specification default ValidationProviderResolver strategy instance
+ * Specification default <code>ValidationProviderResolver</code>
+ * strategy instance.
*
* @return default implementation of ValidationProviderResolver
*/
Modified:
beanvalidation/api/trunk/src/main/java/javax/validation/spi/ConfigurationState.java
===================================================================
---
beanvalidation/api/trunk/src/main/java/javax/validation/spi/ConfigurationState.java 2009-09-30
17:20:44 UTC (rev 17588)
+++
beanvalidation/api/trunk/src/main/java/javax/validation/spi/ConfigurationState.java 2009-09-30
17:36:15 UTC (rev 17589)
@@ -28,7 +28,8 @@
* Contract between a <code>Configuration</code> and a
* </code>ValidatorProvider</code> to create a
<code>ValidatorFactory</code>.
* The configuration artifacts defined in the XML configuration and provided to the
- * <code>Configuration</code> are merged and passed along via
ConfigurationState.
+ * <code>Configuration</code> are merged and passed along via
+ * <code>ConfigurationState</code>.
*
* @author Emmanuel Bernard
* @author Hardy Ferentschik
@@ -44,10 +45,10 @@
boolean isIgnoreXmlConfiguration();
/**
- * Returns the message interpolator of this configuration..
+ * Returns the message interpolator of this configuration.
* Message interpolator is defined in the following decreasing priority:
* <ul>
- * <li>set via the Configuration programmatic API</li>
+ * <li>set via the <code>Configuration</code> programmatic
API</li>
* <li>defined in META-INF/validation.xml provided that ignoreXmlConfiguration
* is false. In this case the instance is created via its no-arg
constructor.</li>
* <li>{@code null} if undefined.</li>
@@ -61,14 +62,14 @@
* Returns a set of configuration streams.
* The streams are defined by:
* <ul>
- * <li>mapping XML streams passed programmatically in Configuration</li>
+ * <li>mapping XML streams passed programmatically in
<code>Configuration</code></li>
* <li>mapping XML stream located in the resources defined in</li>
* META-INF/validation.xml (constraint-mapping element)
* </ul>
* Streams represented in the XML configuration and opened by the
- * configuration implementation must be closed by the configuration
- * implementation after the ValidatorFactory creation (or if an exception
- * occurs).
+ * <code>Configuration</code> implementation must be closed by the
+ * <code>Configuration</code> implementation after the
<code>ValidatorFactory</code>
+ * creation (or if an exception occurs).
*
* @return set of input stream
*/
@@ -79,7 +80,7 @@
* The {@code ConstraintValidatorFactory} implementation is defined in the following
* decreasing priority:
* <ul>
- * <li>set via the Configuration programmatic API</li>
+ * <li>set via the <code>Configuration</code> programmatic
API</li>
* <li>defined in META-INF/validation.xml provided that ignoredXmlConfiguration
* is false. In this case the instance is created via its no-arg
constructor.</li>
* <li>{@code null} if undefined.</li>
@@ -91,9 +92,9 @@
/**
* Returns the traversable resolver for this configuration.
- * TraversableResolver is defined in the following decreasing priority:
+ * <code>TraversableResolver</code> is defined in the following decreasing
priority:
* <ul>
- * <li>set via the Configuration programmatic API</li>
+ * <li>set via the <code>Configuration</code> programmatic
API</li>
* <li>defined in META-INF/validation.xml provided that ignoredXmlConfiguration
* is false. In this case the instance is created via its no-arg
constructor.</li>
* <li>{@code null} if undefined.</li>
Modified:
beanvalidation/api/trunk/src/main/java/javax/validation/spi/ValidationProvider.java
===================================================================
---
beanvalidation/api/trunk/src/main/java/javax/validation/spi/ValidationProvider.java 2009-09-30
17:20:44 UTC (rev 17588)
+++
beanvalidation/api/trunk/src/main/java/javax/validation/spi/ValidationProvider.java 2009-09-30
17:36:15 UTC (rev 17589)
@@ -35,10 +35,10 @@
public interface ValidationProvider<T extends Configuration<T>> {
/**
- * Returns a Configuration instance implementing <code>T</code>,
+ * Returns a <code>Configuration</code> instance implementing
<code>T</code>,
* the <code>Configuration</code> subinterface.
- * The returned Configuration instance must use the current provider
(<code>this</code>)
- * to build the ValidatorFactory instance.
+ * The returned <code>Configuration</code> instance must use the current
provider
+ * (<code>this</code>) to build the
<code>ValidatorFactory</code> instance.
* <p/>
*
* @param state bootstrap state
@@ -48,13 +48,13 @@
T createSpecializedConfiguration(BootstrapState state);
/**
- * Returns a Configuration instance. This instance is not bound to
+ * Returns a <code>Configuration</code> instance. This instance is not bound
to
* use the current provider. The choice of provider follows the algorithm described
* in {@link javax.validation.Configuration}
* <p/>
- * The ValidationProviderResolver used by <code>Configuration</code>
+ * The <code>ValidationProviderResolver</code> used by
<code>Configuration</code>
* is provided by <code>state</code>.
- * If null, the default ValidationProviderResolver is used.
+ * If null, the default <code>ValidationProviderResolver</code> is used.
*
* @param state bootstrap state
*
@@ -63,11 +63,11 @@
Configuration<?> createGenericConfiguration(BootstrapState state);
/**
- * Build a ValidatorFactory using the current provider implementation. The
- * ValidatorFactory is assembled and follows the configuration passed
- * via ConfigurationState.
+ * Build a <code>ValidatorFactory</code> using the current provider
implementation.
+ * The <code>ValidatorFactory</code> is assembled and follows the
configuration passed
+ * via <code>ConfigurationState</code>.
* <p>
- * The returned ValidatorFactory is properly initialized and ready for use.
+ * The returned <code>ValidatorFactory</code> is properly initialized and
ready for use.
* </p>
*
* @param configurationState the configuration descriptor