Author: hardy.ferentschik
Date: 2009-02-09 06:19:30 -0500 (Mon, 09 Feb 2009)
New Revision: 15916
Added:
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/customconstraints.xml
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/extendedri.xml
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/gettingstarted.xml
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/integration.xml
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/introduction.xml
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/usingvalidator.xml
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/xmlconfiguration.xml
Modified:
validator/trunk/hibernate-validator/pom.xml
validator/trunk/hibernate-validator/src/main/docbook/en-US/master.xml
Log:
attached the documentation build to site phase; added Gunnar's doc changes
Modified: validator/trunk/hibernate-validator/pom.xml
===================================================================
--- validator/trunk/hibernate-validator/pom.xml 2009-02-08 18:51:25 UTC (rev 15915)
+++ validator/trunk/hibernate-validator/pom.xml 2009-02-09 11:19:30 UTC (rev 15916)
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<project
xmlns="http://maven.apache.org/POM/4.0.0"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>hibernate-validator-parent</artifactId>
<groupId>org.hibernate</groupId>
@@ -54,20 +54,6 @@
</resources>
<plugins>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>apt-maven-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>test-process</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
-
<testOutputDirectory>${project.build.directory}/site</testOutputDirectory>
- </configuration>
- </plugin>
- <plugin>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-jdocbook-plugin</artifactId>
<version>2.1.0</version>
@@ -95,14 +81,12 @@
</format>
<format>
<formatName>html_single</formatName>
-
<stylesheetResource>classpath:/xslt/hibernate/html/main-single.xsl
- </stylesheetResource>
+
<stylesheetResource>classpath:/xslt/hibernate/html/main-single.xsl
</stylesheetResource>
<finalName>index.html</finalName>
</format>
<format>
<formatName>html</formatName>
-
<stylesheetResource>classpath:/xslt/hibernate/html/main-chunk.xsl
- </stylesheetResource>
+
<stylesheetResource>classpath:/xslt/hibernate/html/main-chunk.xsl
</stylesheetResource>
<finalName>index.html</finalName>
</format>
</formats>
@@ -115,7 +99,7 @@
<executions>
<execution>
<id>make-doc</id>
- <phase>package</phase>
+ <phase>site</phase>
<goals>
<goal>resources</goal>
<goal>generate</goal>
Modified: validator/trunk/hibernate-validator/src/main/docbook/en-US/master.xml
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/en-US/master.xml 2009-02-08
18:51:25 UTC (rev 15915)
+++ validator/trunk/hibernate-validator/src/main/docbook/en-US/master.xml 2009-02-09
11:19:30 UTC (rev 15916)
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
@@ -24,13 +24,13 @@
-->
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY versionNumber "4.0.0.Alpha1">
- <!ENTITY copyrightYear "2004">
- <!ENTITY copyrightHolder "Red Hat Middleware, LLC.">
+ <!ENTITY copyrightYear "2009">
+ <!ENTITY copyrightHolder "Red Hat Middleware, LLC. & Gunnar
Morling">
]>
<book lang="en">
<bookinfo>
- <title>Hibernate Validator</title>
+ <title>Hibernate Validator (Bean Validation API reference
implementation)</title>
<subtitle>Reference Guide</subtitle>
<releaseinfo>&versionNumber;</releaseinfo>
<productnumber>&versionNumber;</productnumber>
@@ -87,6 +87,16 @@
<classname>ResourceBundle</classname> .</para>
</preface>
+ <xi:include href="modules/introduction.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="modules/gettingstarted.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="modules/usingvalidator.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="modules/customconstraints.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="modules/xmlconfiguration.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="modules/integration.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="modules/extendedri.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+<!--
<xi:include href="modules/defineconstraints.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="modules/checkconstraints.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-</book>
\ No newline at end of file
+-->
+</book>
Added:
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/customconstraints.xml
===================================================================
---
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/customconstraints.xml
(rev 0)
+++
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/customconstraints.xml 2009-02-09
11:19:30 UTC (rev 15916)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ -->
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<chapter id="validator-customconstraints">
+ <title>Creating custom constraints</title>
+
+ <para>The Bean Validation API doesn't restrict you to the constraints
+ specified by the API itself, but rather allows you to create your own custom
+ constraints in a simple and timely manner.</para>
+
+ <section id="validator-customconstraints-constraintannotation"
revision="1">
+ <title>Create a constraint annotation</title>
+
+ <para></para>
+ </section>
+
+ <section id="validator-customconstraints-validator"
revision="1">
+ <title>Implement the constraint validator</title>
+
+ <para></para>
+ </section>
+
+ <section id="validator-customconstraints-errormessage"
revision="1">
+ <title>Define the error message</title>
+
+ <para></para>
+ </section>
+
+ <section id="validator-customconstraints-compound"
revision="1">
+ <title>Compound constraints</title>
+
+ <para></para>
+ </section>
+</chapter>
Added: validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/extendedri.xml
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/extendedri.xml
(rev 0)
+++
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/extendedri.xml 2009-02-09
11:19:30 UTC (rev 15916)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ -->
+
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+
+ <chapter id="validator-extendedri">
+ <title>Extended features of Bean Validation reference
implementation</title>
+
+<section id="validator-extendedri-constraintannotations"
+ revision="1">
+ <title>Additional constraint annotations</title>
+</section>
+
+ </chapter>
Added:
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/gettingstarted.xml
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/gettingstarted.xml
(rev 0)
+++
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/gettingstarted.xml 2009-02-09
11:19:30 UTC (rev 15916)
@@ -0,0 +1,355 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ -->
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<chapter id="validator-gettingstarted">
+ <title>Getting started with Bean Validation RI in 5 minutes</title>
+
+ <para>This chapter will show you how to quickly get started with the
+ reference implementation (RI) of the Bean Validation API as specified by
+ <ulink
url="http://jcp.org/en/jsr/detail?id=303">JSR 303</ulink>.
Be sure to
+ fulfill the following prerequisites in order to proceed:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>As the Bean Validation API expresses constraints by the means of
+ annotations, Java version 5 is or later must be installed</para>
+ </listitem>
+
+ <listitem>
+ <para>As <ulink
url="http://maven.apache.org/">Apache
Maven</ulink> will
+ be used as build tool in the following, Maven must be installed (help
+ can be found <ulink
+
url="http://maven.apache.org/download.html">here</ulink>) and a
+ functioning internet connection is required to allow Maven for the
+ download of all dependent libraries</para>
+ </listitem>
+ </itemizedlist>
+
+ <section id="validator-gettingstarted-buildri" revision="1">
+ <title>Build RI. TODO GM: Remove, if RI is in repo</title>
+
+ <para>As the Bean Validation RI is not yet published in any Maven
+ repository, you have to check it out from the Subversion repository at
+ JBoss and build it yourself. The project can be checked out as
+ follows:</para>
+
+ <programlisting>svn co
http://anonsvn.jboss.org/repos/hibernate/validator/trunk/</programlist...
+
+ <para>If all files are checked out, change into the trunk dir and build
+ the reference implementation by running</para>
+
+ <programlisting>mvn install</programlisting>
+
+ <para>If the build has completed, the JSR 303 API and the reference
+ implementation have been installed into your local Maven repository and
+ can now be used in your projects.</para>
+ </section>
+
+ <section id="validator-gettingstarted-createproject"
revision="1">
+ <title>Setting up a new Maven project</title>
+
+ <para>Start by creating new Maven project using the Maven archetype plugin
+ as follows:</para>
+
+ <para><programlisting>mvn archetype:generate
-DarchetypeArtifactId=maven-archetype-quickstart</programlisting></para>
+
+ <para>and specify the requested properties:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>groupId: An identifier for your company, e.g.
+ com.mycompany</para>
+ </listitem>
+
+ <listitem>
+ <para>artifactId: An identifier for the new project, e.g.
+ beanvalidation-gettingstarted</para>
+ </listitem>
+
+ <listitem>
+ <para>version: Initial version for the new project, e.g.
+ 1.0-SNAPSHOT</para>
+ </listitem>
+
+ <listitem>
+ <para>package: The top-level package for the new project, e.g.
+ com.mycompany</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Finally confirm all entered values and change into the newly created
+ project directory. All properties of a Maven project (such as its
+ dependencies to other libraries, the steps to be performed during build
+ etc.) are described in a file contained pom.xml (project object model),
+ located in the project's root directory. Now open the project's pom.xml
+ and perform the following changes:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Add the dependencies to the Bean Validation API and the
+ reference implementation</para>
+ </listitem>
+
+ <listitem>
+ <para>Set the compiler level to 1.5 (as we want to use
+ annotations)</para>
+ </listitem>
+
+ <listitem>
+ <para>Use JUnit 4 as testing framework</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Having done this, your pom.xml should look like this (TODO GM: keep
+ an eye on versions):</para>
+
+ <programlisting><project
+
xmlns="http://maven.apache.org/POM/4.0.0"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.mycompany</groupId>
+ <artifactId>beanvalidation-gettingstarted</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.5</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+
<artifactId>maven-compiler-plugin</artifactId>
+ <version>RELEASE</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project></programlisting>
+ </section>
+
+ <section id="validator-gettingstarted-createmodel"
revision="1">
+ <title>Applying constraints to a model class</title>
+
+ <para>Having set up the project, it's time now to actually make use of the
+ Bean Validation API. Therefore, open the project in the IDE of you choice
+ (for Eclipse, you may type mvn eclipse:eclipse to create a standard
+ Eclipse project configuration OR you may use the <ulink
+
url="http://m2eclipse.codehaus.org/">M2Eclipse</ulink> plugin.
NetBeans
+ has great Maven support too, as described <ulink
+
url="http://wiki.netbeans.org/MavenBestPractices">here</u...>)
and create
+ the following class as an exemplary domain object:</para>
+
+ <para><programlisting>package com.mycompany;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+public class Car {
+
+ @NotNull
+ private String manufacturer;
+
+ @NotNull
+ @Size(min = 2, max = 14)
+ private String licensePlate;
+
+ @Min(2)
+ private int seatCount;
+
+ public Car(String manufacturer, String licencePlate, int seatCount) {
+
+ this.manufacturer = manufacturer;
+ this.licensePlate = licencePlate;
+ this.seatCount = seatCount;
+ }
+
+ //getters and setters ...
+
+}</programlisting></para>
+
+ <para>@NotNull, @Size and @Min are so-called constraint annotions, that we
+ use to declare certain constraints, which shall be applied to the fields
+ of a Car instance:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>manufacturer shall never be null</para>
+ </listitem>
+
+ <listitem>
+ <para>licensePlate shall never be null and must be between 2 and 14
+ characters long</para>
+ </listitem>
+
+ <listitem>
+ <para>seatCount shall be at least 2.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>To perform a validation of these constraints, we use the Validator
+ interface defined by the specification. Let's try it in a test for our Car
+ class:</para>
+
+ <para><programlisting>package com.mycompany;
+
+import static org.junit.Assert.*;
+
+import java.util.Set;
+
+import javax.validation.ConstraintViolation;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class CarTest {
+
+ private static Validator validator;
+
+ @BeforeClass
+ public static void setUp() {
+ ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
+ validator = factory.getValidator();
+ }
+
+ @Test
+ public void manufacturerIsNull() {
+
+ Car car = new Car(null, "DD-AB-123", 4);
+
+ Set<ConstraintViolation<Car>> constraintViolations =
+ validator.validate(car);
+
+ assertEquals(1, constraintViolations.size());
+ assertEquals(
+ "may not be null",
constraintViolations.iterator().next().getInterpolatedMessage());
+ }
+
+ @Test
+ public void licensePlateTooShort() {
+
+ Car car = new Car("Morris", "D", 4);
+
+ Set<ConstraintViolation<Car>> constraintViolations =
+ validator.validate(car);
+
+ assertEquals(1, constraintViolations.size());
+ assertEquals(
+ "size must be between 2 and 14",
constraintViolations.iterator().next().getInterpolatedMessage());
+ }
+
+ @Test
+ public void seatCountTooLow() {
+
+ Car car = new Car("Morris", "DD-AB-123", 1);
+
+ Set<ConstraintViolation<Car>> constraintViolations =
+ validator.validate(car);
+
+ assertEquals(1, constraintViolations.size());
+ assertEquals(
+ "must be greater than 2",
constraintViolations.iterator().next().getInterpolatedMessage());
+ }
+
+ @Test
+ public void carIsValid() {
+
+ Car car = new Car("Morris", "DD-AB-123", 2);
+
+ Set<ConstraintViolation<Car>> constraintViolations =
+ validator.validate(car);
+
+ assertEquals(0, constraintViolations.size());
+ }
+}</programlisting></para>
+
+ <para>In the setUp() method we get a Validator object from the
+ ValidatorFactory. A Validator instance is thread-safe and may be reused
+ multiple times, therefore we store it as field of our test class. We can
+ use the validator now to validate the different car objects in the test
+ methods.</para>
+
+ <para>The validate() method returns a set of ConstraintViolation objects,
+ which we can iterate through in order to see which validation errors
+ occured. The first three test methods show some expected constraint
+ violations:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>The @NotNull constraint on manufacturer is violated in
+ manufacturerIsNull()</para>
+ </listitem>
+
+ <listitem>
+ <para>The @Size constraint on licensePlate is violated in
+ licensePlateTooShort()</para>
+ </listitem>
+
+ <listitem>
+ <para>The @Min constraint on seatCount is violated in
+ seatCountTooLow()</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>If the object could be validated successfully (as in carIsValid()),
+ validate() returns an empty set.</para>
+
+ <para>Note that we only use classes from the package javax.validation,
+ which stems from the Bean Validation standard API. As we don't reference
+ any classes of the RI directly, it would be no problem to switch to
+ another implementation of the API, should that need arise.</para>
+ </section>
+
+ <section id="validator-gettingstarted-whatsnext"
revision="1">
+ <title>Where to go next?</title>
+
+ <para>That concludes our 5 minute tour through the world of the Bean
+ Validation RI. You might next be interested in using some <link
+ linkend="validator-usingvalidator">advanced features of the Validator
+ API</link> or how to define your own <link
+ linkend="validator-customconstraints">custom
constraint</link>.</para>
+ </section>
+</chapter>
Added: validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/integration.xml
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/integration.xml
(rev 0)
+++
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/integration.xml 2009-02-09
11:19:30 UTC (rev 15916)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ -->
+
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+
+ <chapter id="validator-integration">
+ <title>Integrating Bean Validation RI with other frameworks</title>
+ </chapter>
Added:
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/introduction.xml
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/introduction.xml
(rev 0)
+++
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/introduction.xml 2009-02-09
11:19:30 UTC (rev 15916)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ -->
+
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+
+<chapter id="validator-introduction">
+ <title>Introduction</title>
+
+ <section id="validator-introduction-whatisit" revision="1">
+ <title>What is it about?</title>
+
+ <para></para>
+ </section>
+
+ <section id="validator-introduction-installation"
revision="1">
+ <title>Installation</title>
+
+ <para>
+
+ <section revision="1">
+ <title>Prerequisites</title>
+
+ <para></para>
+ </section>
+ <section revision="1">
+ <title>Running Bean Validation RI with downloaded JARs</title>
+
+ <para></para>
+ </section>
+ <section revision="1">
+ <title>Running Bean Validation RI using Maven</title>
+
+ <para></para>
+ </section>
+ <section revision="1">
+ <title>Building Bean Validation RI from the sources</title>
+
+ <para></para>
+ </section>
+ </para>
+ </section>
+
+</chapter>
Added:
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/usingvalidator.xml
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/usingvalidator.xml
(rev 0)
+++
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/usingvalidator.xml 2009-02-09
11:19:30 UTC (rev 15916)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ -->
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<chapter id="validator-usingvalidator">
+ <title>Using the Validator API</title>
+
+ <section id="validator-usingvalidator-annotate"
revision="1">
+ <title>Annotate your model</title>
+
+ <para>Field, Getter</para>
+ </section>
+
+ <section id="validator-usingvalidator-validate"
revision="1">
+ <title>Object validation</title>
+
+ <para>Plain, Use of @Valid</para>
+ </section>
+
+ <section id="validator-usingvalidator-validationgroups"
revision="1">
+ <title>Validation groups</title>
+
+ <para><section revision="1">
+ <title>Group sequences</title>
+
+ <para />
+ </section></para>
+ </section>
+
+ <section id="validator-usingvalidator-methodparameters"
revision="1">
+ <title>Validating method parameters</title>
+
+ <para></para>
+ </section>
+</chapter>
Added:
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/xmlconfiguration.xml
===================================================================
---
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/xmlconfiguration.xml
(rev 0)
+++
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/xmlconfiguration.xml 2009-02-09
11:19:30 UTC (rev 15916)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ -->
+
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+
+ <chapter id="validator-xmlconfiguration">
+ <title>Using XML for constraint configuration</title>
+ </chapter>