[hibernate-commits] Hibernate SVN: r19904 - in validator/trunk/hibernate-validator: src/main/docbook and 5 other directories.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Tue Jul 6 11:18:27 EDT 2010


Author: stliu
Date: 2010-07-06 11:18:26 -0400 (Tue, 06 Jul 2010)
New Revision: 19904

Added:
   validator/trunk/hibernate-validator/src/main/docbook/pot/
   validator/trunk/hibernate-validator/src/main/docbook/pot/master.pot
   validator/trunk/hibernate-validator/src/main/docbook/pot/modules/
   validator/trunk/hibernate-validator/src/main/docbook/pot/modules/annotationprocessor.pot
   validator/trunk/hibernate-validator/src/main/docbook/pot/modules/bootstrapping.pot
   validator/trunk/hibernate-validator/src/main/docbook/pot/modules/customconstraints.pot
   validator/trunk/hibernate-validator/src/main/docbook/pot/modules/furtherreading.pot
   validator/trunk/hibernate-validator/src/main/docbook/pot/modules/gettingstarted.pot
   validator/trunk/hibernate-validator/src/main/docbook/pot/modules/integration.pot
   validator/trunk/hibernate-validator/src/main/docbook/pot/modules/preface.pot
   validator/trunk/hibernate-validator/src/main/docbook/pot/modules/programmaticapi.pot
   validator/trunk/hibernate-validator/src/main/docbook/pot/modules/usingvalidator.pot
   validator/trunk/hibernate-validator/src/main/docbook/pot/modules/xmlconfiguration.pot
   validator/trunk/hibernate-validator/src/main/docbook/zh-CN/
   validator/trunk/hibernate-validator/src/main/docbook/zh-CN/master.po
   validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/
   validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/annotationprocessor.po
   validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/bootstrapping.po
   validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/customconstraints.po
   validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/furtherreading.po
   validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/gettingstarted.po
   validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/integration.po
   validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/preface.po
   validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/programmaticapi.po
   validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/usingvalidator.po
   validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/xmlconfiguration.po
Modified:
   validator/trunk/hibernate-validator/pom.xml
   validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/gettingstarted.xml
Log:
HV-351 add pot and po files for translating doc into chinese

Modified: validator/trunk/hibernate-validator/pom.xml
===================================================================
--- validator/trunk/hibernate-validator/pom.xml	2010-07-06 10:31:48 UTC (rev 19903)
+++ validator/trunk/hibernate-validator/pom.xml	2010-07-06 15:18:26 UTC (rev 19904)
@@ -263,6 +263,9 @@
                     <sourceDocumentName>master.xml</sourceDocumentName>
                     <sourceDirectory>${basedir}/src/main/docbook</sourceDirectory>
                     <masterTranslation>en-US</masterTranslation>
+			        <translations>
+			        	<translation>zh-CN</translation>
+			        </translations>
                     <imageResource>
                         <directory>${basedir}/src/main/docbook/en-US/images</directory>
                     </imageResource>

Modified: validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/gettingstarted.xml
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/gettingstarted.xml	2010-07-06 10:31:48 UTC (rev 19903)
+++ validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/gettingstarted.xml	2010-07-06 15:18:26 UTC (rev 19904)
@@ -110,9 +110,9 @@
     <para>Maven will create your project in the directory hv-quickstart.
     Change into this directory and run:</para>
 
-    <para><programlisting>mvn test</programlisting>Maven will compile the
-    example code and run the implemented unit tests. Let's have a look at the
-    actual code.</para>
+    <para><programlisting>mvn test</programlisting>
+	Maven will compile the example code and run the implemented unit tests. Let's have a look at the actual code.
+	</para>
   </section>
 
   <section id="validator-gettingstarted-createmodel">

Added: validator/trunk/hibernate-validator/src/main/docbook/pot/master.pot
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/pot/master.pot	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/pot/master.pot	2010-07-06 15:18:26 UTC (rev 19904)
@@ -0,0 +1,52 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-07-06 14:46+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: master.xml:26
+#, no-c-format
+msgid "Hibernate Validator"
+msgstr ""
+
+#. Tag: subtitle
+#: master.xml:27
+#, no-c-format
+msgid "JSR 303 Reference Implementation"
+msgstr ""
+
+#. Tag: subtitle
+#: master.xml:28
+#, no-c-format
+msgid "Reference Guide"
+msgstr ""
+
+#. Tag: holder
+#: master.xml:34
+#, no-c-format
+msgid "&copyrightHolder;"
+msgstr ""
+
+#. Tag: author
+#: master.xml:37
+#, no-c-format
+msgid "<firstname>Hardy</firstname> <surname>Ferentschik</surname>"
+msgstr ""
+
+#. Tag: author
+#: master.xml:41
+#, no-c-format
+msgid "<firstname>Gunnar</firstname> <surname>Morling</surname>"
+msgstr ""
+

Added: validator/trunk/hibernate-validator/src/main/docbook/pot/modules/annotationprocessor.pot
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/pot/modules/annotationprocessor.pot	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/pot/modules/annotationprocessor.pot	2010-07-06 15:18:26 UTC (rev 19904)
@@ -0,0 +1,529 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-07-06 14:46+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: annotationprocessor.xml:25
+#, no-c-format
+msgid "Annotation Processor (EXPERIMENTAL)"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:27
+#, no-c-format
+msgid "Have you ever caught yourself by unintentionally doing things like"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:32
+#, no-c-format
+msgid "annotating Strings with @Min to specify a minimum length (instead of using @Size)"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:37
+#, no-c-format
+msgid "annotating the setter of a JavaBean property (instead of the getter method)"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:42
+#, no-c-format
+msgid "annotating static fields/methods with constraint annotations (which is not supported)?"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:47
+#, no-c-format
+msgid "Then the Hibernate Validator Annotation Processor is the right thing for you. It helps preventing such mistakes by plugging into the build process and raising compilation errors whenever constraint annotations are incorrectly used."
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:53
+#, no-c-format
+msgid "A first version of the Hibernate Validator Annotation Processor is part of Hibernate Validator since release 4.1. It is currently still under development and should therefore be considered as an experimental feature. Some <link linkend=\"section-known-issues\">known issues</link> can be found at the end of this chapter. In case any problems arise when using the processor feel free to ask for help at the <ulink url=\"https://forum.hibernate.org/viewforum.php?f=9\">forum</ulink> or create an issue within<ulink url=\"http://opensource.atlassian.com/projects/hibernate/browse/HV/component/10356\"> JIRA</ulink>."
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:66
+#, no-c-format
+msgid "Prerequisites"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:68
+#, no-c-format
+msgid "The Hibernate Validator Annotation Processor is based on the \"Pluggable Annotation Processing API\" as defined by <ulink url=\"http://jcp.org/en/jsr/detail?id=269\">JSR 269</ulink>. This API is part of the Java Platform since Java 6. So be sure to use this or a later version."
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:76
+#, no-c-format
+msgid "Features"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:78
+#, no-c-format
+msgid "As of Hibernate Validator 4.1 the Hibernate Validator Annotation Processor checks that:"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:83
+#, no-c-format
+msgid "constraint annotations are allowed for the type of the annotated element"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:88
+#, no-c-format
+msgid "JavaBean getter methods are annotated in case of property validation"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:93
+#, no-c-format
+msgid "only non-static fields or properties are annotated with constraint annotations"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:98
+#, no-c-format
+msgid "only non-primitive fields or properties are annotated with @Valid"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:103
+#, no-c-format
+msgid "only such annotation types are annotated with constraint annotations which are constraint annotations themselves"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:110
+#, no-c-format
+msgid "Options"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:112
+#, no-c-format
+msgid "The behavior of the Hibernate Validator Annotation Processor can be controlled using the <ulink url=\"http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html#options\">processor options</ulink> listed in table<xref linkend=\"table_processor_options\"/>:"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:119
+#, no-c-format
+msgid "Hibernate Validator Annotation Processor options"
+msgstr ""
+
+#. Tag: entry
+#: annotationprocessor.xml:124
+#, no-c-format
+msgid "Option"
+msgstr ""
+
+#. Tag: entry
+#: annotationprocessor.xml:126
+#, no-c-format
+msgid "Explanation"
+msgstr ""
+
+#. Tag: varname
+#: annotationprocessor.xml:132
+#, no-c-format
+msgid "diagnosticKind"
+msgstr ""
+
+#. Tag: entry
+#: annotationprocessor.xml:134
+#, no-c-format
+msgid "Controls how constraint problems are reported. Must be the string representation of one of the values from the enum <classname>javax.tools.Diagnostic.Kind</classname>, e.g. <classname>WARNING</classname>. A value of <classname>ERROR</classname> will cause compilation to halt whenever the AP detects a constraint problem. Defaults to <classname>ERROR</classname>."
+msgstr ""
+
+#. Tag: varname
+#: annotationprocessor.xml:144
+#, no-c-format
+msgid "verbose"
+msgstr ""
+
+#. Tag: entry
+#: annotationprocessor.xml:146
+#, no-c-format
+msgid "Controls whether detailed processing information shall be displayed or not, useful for debugging purposes. Must be either <varname>true</varname> or<varname>false</varname>. Defaults to <varname>false</varname>."
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:157
+#, no-c-format
+msgid "Using the Annotation Processor"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:159
+#, no-c-format
+msgid "This section shows in detail how to integrate the Hibernate Validator Annotation Processor into command line builds (javac, Ant, Maven) as well as IDE-based builds (Eclipse, IntelliJ IDEA, NetBeans)."
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:165
+#, no-c-format
+msgid "Command line builds"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:168
+#, no-c-format
+msgid "javac"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:170
+#, no-c-format
+msgid "When compiling on the command line using <ulink url=\"http://java.sun.com/javase/6/docs/technotes/guides/javac/index.html\">javac</ulink>, specify the following JARs using the \"processorpath\" option:"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:176 annotationprocessor.xml:287 annotationprocessor.xml:377
+#, no-c-format
+msgid "validation-api-&bvVersion;.jar"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:180 annotationprocessor.xml:291 annotationprocessor.xml:381
+#, no-c-format
+msgid "hibernate-validator-annotation-processor-&version;.jar"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:184
+#, no-c-format
+msgid "The following listing shows an example. The processor will be detected automatically by the compiler and invoked during compilation."
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:189
+#, no-c-format
+msgid "Using the annotation processor with javac"
+msgstr ""
+
+#. Tag: programlisting
+#: annotationprocessor.xml:191
+#, no-c-format
+msgid ""
+      "javac src/main/java/org/hibernate/validator/ap/demo/Car.java \\\n"
+      "   -cp /path/to/validation-api-&bvVersion;.jar \\ \n"
+      "   -processorpath /path/to/validation-api-&bvVersion;.jar:/path/to/hibernate-validator-annotation-processor-&version;.jar"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:196
+#, no-c-format
+msgid "Apache Ant"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:198
+#, no-c-format
+msgid "Similar to directly working with javac, the annotation processor can be added as as compiler argument when invoking the <ulink url=\"http://ant.apache.org/manual/CoreTasks/javac.html\">javac task</ulink> for <ulink url=\"http://ant.apache.org/\">Apache Ant</ulink>:"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:205
+#, no-c-format
+msgid "Using the annotation processor with Ant"
+msgstr ""
+
+#. Tag: programlisting
+#: annotationprocessor.xml:207
+#, no-c-format
+msgid ""
+      "&lt;javac srcdir=\"src/main\"\n"
+      "       destdir=\"build/classes\"\n"
+      "       classpath=\"/path/to/validation-api-&bvVersion;.jar\"&gt;\n"
+      "       &lt;compilerarg value=\"-processorpath\" /&gt;\n"
+      "       &lt;compilerarg value=\"/path/to/validation-api-&bvVersion;.jar:/path/to/hibernate-validator-annotation-processor-&version;.jar\"/&gt;\n"
+      "&lt;/javac&gt;"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:212
+#, no-c-format
+msgid "Maven"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:214
+#, no-c-format
+msgid "There are several options for integrating the annotation processor with <ulink url=\"http://maven.apache.org/\">Apache Maven</ulink>. Generally it is sufficient to add the Hibernate Validator Annotation Processor as dependency to your project:"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:220
+#, no-c-format
+msgid "Adding the HV Annotation Processor as dependency"
+msgstr ""
+
+#. Tag: programlisting
+#: annotationprocessor.xml:222
+#, no-c-format
+msgid ""
+      "...\n"
+      "&lt;dependency&gt;\n"
+      "    &lt;groupId&gt;org.hibernate&lt;/groupId&gt;\n"
+      "    &lt;artifactId&gt;hibernate-validator-annotation-processor&lt;/artifactId&gt;\n"
+      "    &lt;version&gt;&version;&lt;/version&gt;\n"
+      "    &lt;scope&gt;compile&lt;/scope&gt;\n"
+      "&lt;/dependency&gt;\n"
+      "..."
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:225
+#, no-c-format
+msgid "The processor will then be executed automatically by the compiler. This basically works, but comes with the disadavantage that in some cases messages from the annotation processor are not displayed (see <ulink url=\"http://jira.codehaus.org/browse/MCOMPILER-66\">MCOMPILER-66</ulink>)."
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:231
+#, no-c-format
+msgid "Another option is using the <ulink url=\"http://code.google.com/p/maven-annotation-plugin/\">Maven Annotation Plugin</ulink>. At the time of this writing the plugin is not yet available in any of the well-known repositories. Therefore you have to add the project's own repository to your settings.xml or pom.xml:"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:239
+#, no-c-format
+msgid "Adding the Maven Annotation Plugin repository"
+msgstr ""
+
+#. Tag: programlisting
+#: annotationprocessor.xml:241
+#, no-c-format
+msgid ""
+      "...\n"
+      "&lt;pluginRepositories&gt;\n"
+      "    &lt;pluginRepository&gt;\n"
+      "        &lt;id&gt;maven-annotation-plugin-repo&lt;/id&gt;\n"
+      "        &lt;url&gt;http://maven-annotation-plugin.googlecode.com/svn/trunk/mavenrepo&lt;/url&gt;\n"
+      "    &lt;/pluginRepository&gt;\n"
+      "&lt;/pluginRepositories&gt;\n"
+      "..."
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:242
+#, no-c-format
+msgid "Now disable the standard annotation processing performed by the compiler plugin and configure the annotation plugin by specifying an execution and adding the Hibernate Validator Annotation Processor as plugin dependency (that way the AP is not visible on the project's actual classpath):"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:249
+#, no-c-format
+msgid "Configuring the Maven Annotation Plugin"
+msgstr ""
+
+#. Tag: programlisting
+#: annotationprocessor.xml:251
+#, no-c-format
+msgid ""
+      "...\n"
+      "&lt;plugin&gt;\n"
+      "    &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;\n"
+      "    &lt;configuration&gt;\n"
+      "        &lt;source&gt;1.6&lt;/source&gt;\n"
+      "        &lt;target&gt;1.6&lt;/target&gt;\n"
+      "        &lt;compilerArgument&gt;-proc:none&lt;/compilerArgument&gt;\n"
+      "    &lt;/configuration&gt;\n"
+      "&lt;/plugin&gt;\n"
+      "&lt;plugin&gt;\n"
+      "    &lt;groupId&gt;org.bsc.maven&lt;/groupId&gt;\n"
+      "    &lt;artifactId&gt;maven-processor-plugin&lt;/artifactId&gt;\n"
+      "    &lt;version&gt;1.3.4&lt;/version&gt;\n"
+      "    &lt;executions&gt;\n"
+      "        &lt;execution&gt;\n"
+      "            &lt;id&gt;process&lt;/id&gt;\n"
+      "            &lt;goals&gt;\n"
+      "                &lt;goal&gt;process&lt;/goal&gt;\n"
+      "            &lt;/goals&gt;\n"
+      "            &lt;phase&gt;process-sources&lt;/phase&gt;\n"
+      "        &lt;/execution&gt;\n"
+      "    &lt;/executions&gt;\n"
+      "    &lt;dependencies&gt;\n"
+      "        &lt;dependency&gt;\n"
+      "            &lt;groupId&gt;org.hibernate&lt;/groupId&gt;\n"
+      "            &lt;artifactId&gt;hibernate-validator-annotation-processor&lt;/artifactId&gt;\n"
+      "            &lt;version&gt;&version;&lt;/version&gt;\n"
+      "            &lt;scope&gt;compile&lt;/scope&gt;\n"
+      "        &lt;/dependency&gt;\n"
+      "    &lt;/dependencies&gt;\n"
+      "&lt;/plugin&gt;\n"
+      "..."
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:257
+#, no-c-format
+msgid "IDE builds"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:260
+#, no-c-format
+msgid "Eclipse"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:262
+#, no-c-format
+msgid "Do the following to use the annotation processor within the <ulink url=\"http://www.eclipse.org/\">Eclipse</ulink> IDE:"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:267 annotationprocessor.xml:368
+#, no-c-format
+msgid "Right-click your project, choose \"Properties\""
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:271
+#, no-c-format
+msgid "Go to \"Java Compiler\" and make sure, that \"Compiler compliance level\" is set to \"1.6\". Otherwise the processor won't be activated"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:277
+#, no-c-format
+msgid "Go to \"Java Compiler - Annotation Processing\" and choose \"Enable annotation processing\""
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:282
+#, no-c-format
+msgid "Go to \"Java Compiler - Annotation Processing - Factory Path\" and add the following JARs:"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:297
+#, no-c-format
+msgid "Confirm the workspace rebuild"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:301
+#, no-c-format
+msgid "You now should see any annotation problems as regular error markers within the editor and in the \"Problem\" view:"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:313
+#, no-c-format
+msgid "IntelliJ IDEA"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:315
+#, no-c-format
+msgid "The following steps must be followed to use the annotation processor within <ulink url=\"http://www.jetbrains.com/idea/\">IntelliJ IDEA</ulink> (version 9 and above):"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:321
+#, no-c-format
+msgid "Go to \"File\", then \"Settings\","
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:325
+#, no-c-format
+msgid "Expand the node \"Compiler\", then \"Annotation Processors\""
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:330
+#, no-c-format
+msgid "Choose \"Enable annotation processing\" and enter the following as \"Processor path\": /path/to/validation-api-&bvVersion;.jar:/path/to/hibernate-validator-annotation-processor-&version;.jar"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:336
+#, no-c-format
+msgid "Add the processor's fully qualified name <classname>org.hibernate.validator.ap.ConstraintValidationProcessor</classname> to the \"Annotation Processors\" list"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:342
+#, no-c-format
+msgid "If applicable add you module to the \"Processed Modules\" list"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:347
+#, no-c-format
+msgid "Rebuilding your project then should show any erronous constraint annotations:"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:359
+#, no-c-format
+msgid "NetBeans"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:361
+#, no-c-format
+msgid "Starting with version 6.9, also the <ulink url=\"http://www.netbeans.org/\">NetBeans</ulink> IDE supports using annotation processors within the IDE build. To do so, do the following:"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:372
+#, no-c-format
+msgid "Go to \"Libraries\", tab \"Processor\", and add the following two JARs:"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:387
+#, no-c-format
+msgid "Go to \"Build - Compiling\", select \"Enable Annotation Processing\" and \"Enable Annotation Processing in Editor\". Add the annotation processor by specifying its fully qualified name <classname>org.hibernate.validator.ap.ConstraintValidationProcessor</classname>"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:394
+#, no-c-format
+msgid "Any constraint annotation problems will then be marked directly within the editor:"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:408
+#, no-c-format
+msgid "Known issues"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:410
+#, no-c-format
+msgid "The following known issues exist as of May 2010:"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:414
+#, no-c-format
+msgid "<ulink url=\"http://opensource.atlassian.com/projects/hibernate/browse/HV-308\">HV-308</ulink>: Additional validators registered for a constraint <ulink url=\"http://docs.jboss.org/hibernate/stable/validator/reference/en/html_single/#d0e1957\">using XML</ulink> are not evaluated by the annotation processor."
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:422
+#, no-c-format
+msgid "Sometimes custom constraints can't be <ulink url=\"http://opensource.atlassian.com/projects/hibernate/browse/HV-293\">properly evaluated</ulink> when using the processor within Eclipse. Cleaning the project can help in these situations. This seems to be an issue with the Eclipse JSR 269 API implementation, but further investigation is required here."
+msgstr ""
+

Added: validator/trunk/hibernate-validator/src/main/docbook/pot/modules/bootstrapping.pot
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/pot/modules/bootstrapping.pot	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/pot/modules/bootstrapping.pot	2010-07-06 15:18:26 UTC (rev 19904)
@@ -0,0 +1,426 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-07-06 14:46+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: bootstrapping.xml:25
+#, no-c-format
+msgid "Bootstrapping"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:27
+#, no-c-format
+msgid "We already seen in <xref linkend=\"section-validator-instance\"/> the easiest way to create a <classname>Validator</classname> instance - <methodname>Validation.buildDefaultValidatorFactory</methodname>. In this chapter we have a look at the other methods in <classname>javax.validation.Validation</classname> and how they allow to configure several aspects of Bean Validation at bootstrapping time."
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:34
+#, no-c-format
+msgid "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 <ulink url=\"http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Service%20Provider\">Java Service Provider</ulink> mechanism. A Bean Validation implementation includes the file <filename>javax.validation.spi.ValidationProvider</filename> in <filename>META-INF/services</filename>. This file contains the fully qualified classname of the <classname>ValidationProvider</classname> of the implementation. In the case of Hibernate Validator this is <classname>org.hibernate.validator.HibernateValidator</classname>."
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:47
+#, no-c-format
+msgid "If there are more than one Bean Validation implementation providers in the classpath and <methodname>Validation.buildDefaultValidatorFactory()</methodname> is used, there is no guarantee which provider will be chosen. To enforce the provider <methodname>Validation.byProvider()</methodname> should be used."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:56
+#, no-c-format
+msgid "<classname>Configuration</classname> and <classname>ValidatorFactory</classname>"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:59
+#, no-c-format
+msgid "There are three different methods in the Validation class to create a Validator instance. The easiest in shown in <xref linkend=\"example-build-default-validator-factory\"/>."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:64
+#, no-c-format
+msgid "Validation.buildDefaultValidatorFactory()"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:66
+#, no-c-format
+msgid ""
+      "ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
+      "Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:69
+#, no-c-format
+msgid "You can also use the method <methodname>Validation.byDefaultProvider()</methodname> which will allow you to configure several aspects of the created Validator instance:"
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:74
+#, no-c-format
+msgid "Validation.byDefaultProvider()"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:76
+#, no-c-format
+msgid ""
+      "Configuration&lt;?&gt; config = Validation.byDefaultProvider().configure();\n"
+      "config.messageInterpolator(new MyMessageInterpolator())\n"
+      "    .traversableResolver( new MyTraversableResolver())\n"
+      "    .constraintValidatorFactory(new MyConstraintValidatorFactory());\n"
+      "\n"
+      "ValidatorFactory factory = config.buildValidatorFactory();\n"
+      "Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:79
+#, no-c-format
+msgid "We will learn more about <classname>MessageInterpolator</classname>, <classname>TraversableResolver</classname> and <classname>ConstraintValidatorFactory</classname> in the following sections."
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:84
+#, no-c-format
+msgid "Last but not least you can ask for a Configuration object of a specific Bean Validation provider. This is useful if you have more than one Bean Validation provider in your classpath. In this situation you can make an explicit choice about which implementation to use. In the case of Hibernate Validator the <classname>Validator</classname> creation looks like:"
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:92
+#, no-c-format
+msgid "Validation.byProvider( HibernateValidator.class )"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:94
+#, no-c-format
+msgid ""
+      "HibernateValidatorConfiguration config = Validation.byProvider( HibernateValidator.class ).configure();\n"
+      "config.messageInterpolator(new MyMessageInterpolator())\n"
+      "    .traversableResolver( new MyTraversableResolver())\n"
+      "    .constraintValidatorFactory(new MyConstraintValidatorFactory());\n"
+      "\n"
+      "ValidatorFactory factory = config.buildValidatorFactory();\n"
+      "Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:98
+#, no-c-format
+msgid "The generated <classname>Validator</classname> instance is thread safe and can be cached."
+msgstr ""
+
+#. Tag: classname
+#: bootstrapping.xml:104
+#, no-c-format
+msgid "ValidationProviderResolver"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:106
+#, no-c-format
+msgid "In the case that the Java Service Provider mechanism does not work in your environment or you have a special classloader setup, you are able to provide a custom <classname>ValidationProviderResolver</classname>. An example in an OSGi environment you could plug your custom provider resolver like seen in <xref linkend=\"example-provider-resolver\"/>."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:113
+#, no-c-format
+msgid "Providing a custom ValidationProviderResolver"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:115
+#, no-c-format
+msgid ""
+      "Configuration&lt;?&gt; config = Validation.byDefaultProvider()\n"
+      "    .providerResolver( new OSGiServiceDiscoverer() )\n"
+      "    .configure();\n"
+      "\n"
+      "ValidatorFactory factory = config.buildValidatorFactory();\n"
+      "Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:118
+#, no-c-format
+msgid "Your <classname>OSGiServiceDiscoverer</classname> must in this case implement the interface <classname>ValidationProviderResolver</classname>:"
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:123
+#, no-c-format
+msgid "ValidationProviderResolver interface"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:125
+#, no-c-format
+msgid ""
+      "public interface ValidationProviderResolver {\n"
+      "    /**\n"
+      "     * Returns a list of ValidationProviders available in the runtime environment.\n"
+      "     *\n"
+      "     * @return list of validation providers.  \n"
+      "     */\n"
+      "    List&lt;ValidationProvider&lt;?&gt;&gt; getValidationProviders();\n"
+      "}"
+msgstr ""
+
+#. Tag: classname
+#: bootstrapping.xml:130
+#, no-c-format
+msgid "MessageInterpolator"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:132
+#, no-c-format
+msgid "already discussed the default message interpolation algorithm. If you have special requirements for your message interpolation you can provide a custom interpolator using <methodname>Configuration.messageInterpolator()</methodname>. This message interpolator will be shared by all validators generated by the <classname>ValidatorFactory</classname> created from this <classname>Configuration</classname>(see <xref linkend=\"example-message-interpolator\"/>)."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:143
+#, no-c-format
+msgid "Providing a custom MessageInterpolator"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:145
+#, no-c-format
+msgid ""
+      "Configuration&lt;?&gt; configuration = Validation.byDefaultProvider().configure();\n"
+      "ValidatorFactory factory = configuration\n"
+      "    .messageInterpolator(new ContextualMessageInterpolator(configuration.getDefaultMessageInterpolator()))\n"
+      "    .buildValidatorFactory();\n"
+      "\n"
+      "Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:149
+#, no-c-format
+msgid "It is recommended that <classname>MessageInterpolator</classname> implementations delegate final interpolation to the Bean Validation default <classname>MessageInterpolator</classname> to ensure standard Bean Validation interpolation rules are followed. The default implementation is accessible through <methodname>Configuration.getDefaultMessageInterpolator()</methodname>."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:158
+#, no-c-format
+msgid "ResourceBundleLocator"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:160
+#, no-c-format
+msgid "A common use case is the ability to specify your own resource bundles for message interpolation. The default <classname>MessageInterpolator</classname> implementation in Hibernate Validator is called <classname>ResourceBundleMessageInterpolator</classname> and per default loads resource bundles via <methodname>ResourceBundle.getBundle</methodname>. However, <classname>ResourceBundleMessageInterpolator</classname> also allows you to specify a custom implementation of <classname>ResourceBundleLocator</classname> allowing you to provide your own resource bundles. <xref linkend=\"example-resource-bundle-locator\"/> shows an example. In the example<methodname> HibernateValidatorConfiguration.getDefaultResourceBundleLocator</methodname> is used to retrieve the default <classname>ResourceBundleLocator</classname> which then can be passed to the custom implementation in order implement delegation."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:179
+#, no-c-format
+msgid "Providing a custom ResourceBundleLocator"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:181
+#, no-c-format
+msgid ""
+      "HibernateValidatorConfiguration configure = Validation.byProvider(HibernateValidator.class).configure();\n"
+      "\n"
+      "ResourceBundleLocator defaultResourceBundleLocator = configure.getDefaultResourceBundleLocator(); \n"
+      "ResourceBundleLocator myResourceBundleLocator = new MyCustomResourceBundleLocator(defaultResourceBundleLocator);\n"
+      "\n"
+      "configure.messageInterpolator(new ResourceBundleMessageInterpolator(myResourceBundleLocator));"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:184
+#, no-c-format
+msgid "Hibernate Validator provides the following implementation of <classname>ResourceBundleLocator</classname> - <classname>PlatformResourceBundleLocator</classname> (the default) and <classname>AggregateResourceBundleLocator</classname>. The latter can be used to specify a list of resource bundle names which will get loaded and merged into a single resource bundle. Refer to the JavaDoc documentation for more information."
+msgstr ""
+
+#. Tag: classname
+#: bootstrapping.xml:195
+#, no-c-format
+msgid "TraversableResolver"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:197
+#, no-c-format
+msgid "The usage of the <classname>TraversableResolver</classname> has so far not been discussed. The idea is that in some cases, the state of a property should not be accessed. The most obvious example for that is a lazy loaded property or association of a Java Persistence provider. Validating this lazy property or association would mean that its state would have to be accessed triggering a load from the database. Bean Validation controls which property can and cannot be accessed via the <classname>TraversableResolver</classname> interface (see <xref linkend=\"example-traversable-resolver\"/>). In the example HibernateValidatorConfiguration."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:209
+#, no-c-format
+msgid "TraversableResolver interface"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:211
+#, no-c-format
+msgid ""
+      "/**\n"
+      " * Contract determining if a property can be accessed by the Bean Validation provider\n"
+      " * This contract is called for each property that is being either validated or cascaded.\n"
+      " *\n"
+      " * A traversable resolver implementation must be thread-safe.\n"
+      " *\n"
+      " */\n"
+      "public interface TraversableResolver {\n"
+      "    /**\n"
+      "     * Determine if the Bean Validation provider is allowed to reach the property state\n"
+      "     *\n"
+      "     * @param traversableObject object hosting &lt;code&gt;traversableProperty&lt;/code&gt; or null  \n"
+      "     *                          if validateValue is called\n"
+      "     * @param traversableProperty the traversable property.\n"
+      "     * @param rootBeanType type of the root object passed to the Validator.\n"
+      "     * @param pathToTraversableObject path from the root object to\n"
+      "     *        &lt;code&gt;traversableObject&lt;/code&gt;\n"
+      "     *        (using the path specification defined by Bean Validator).\n"
+      "     * @param elementType either &lt;code&gt;FIELD&lt;/code&gt; or &lt;code&gt;METHOD&lt;/code&gt;.\n"
+      "     *\n"
+      "     * @return &lt;code&gt;true&lt;/code&gt; if the Bean Validation provider is allowed to\n"
+      "     *         reach the property state, &lt;code&gt;false&lt;/code&gt; otherwise.\n"
+      "     */\n"
+      "     boolean isReachable(Object traversableObject,\n"
+      "                         Path.Node traversableProperty,\n"
+      "                         Class&lt;?&gt; rootBeanType,\n"
+      "                         Path pathToTraversableObject,\n"
+      "                         ElementType elementType);\n"
+      "\n"
+      "    /**\n"
+      "     * Determine if the Bean Validation provider is allowed to cascade validation on\n"
+      "     * the bean instance returned by the property value\n"
+      "     * marked as &lt;code&gt;@Valid&lt;/code&gt;.\n"
+      "     * Note that this method is called only if isReachable returns true for the same set of\n"
+      "     * arguments and if the property is marked as &lt;code&gt;@Valid&lt;/code&gt;\n"
+      "     *\n"
+      "     * @param traversableObject object hosting &lt;code&gt;traversableProperty&lt;/code&gt; or null\n"
+      "     *                          if validateValue is called\n"
+      "     * @param traversableProperty the traversable property.\n"
+      "     * @param rootBeanType type of the root object passed to the Validator.\n"
+      "     * @param pathToTraversableObject path from the root object to\n"
+      "     *        &lt;code&gt;traversableObject&lt;/code&gt;\n"
+      "     *        (using the path specification defined by Bean Validator).\n"
+      "     * @param elementType either &lt;code&gt;FIELD&lt;/code&gt; or &lt;code&gt;METHOD&lt;/code&gt;.\n"
+      "     *\n"
+      "     * @return &lt;code&gt;true&lt;/code&gt; if the Bean Validation provider is allowed to\n"
+      "     *         cascade validation, &lt;code&gt;false&lt;/code&gt; otherwise.\n"
+      "     */\n"
+      "     boolean isCascadable(Object traversableObject,\n"
+      "                          Path.Node traversableProperty,\n"
+      "                          Class&lt;?&gt; rootBeanType,\n"
+      "                          Path pathToTraversableObject,\n"
+      "                          ElementType elementType);\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:214
+#, no-c-format
+msgid "Hibernate Validator provides two <classname>TraversableResolver</classname>s out of the box which will be enabled automatically depending on your environment. The first is the <classname>DefaultTraversableResolver</classname> which will always return true for <methodname>isReachable()</methodname> and i<methodname>sTraversable()</methodname>. The second is the <classname>JPATraversableResolver</classname> which gets enabled when 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 <classname>Configuration</classname> object as seen in <xref linkend=\"example-traversable-resolver-config\"/>."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:227
+#, no-c-format
+msgid "Providing a custom TraversableResolver"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:229
+#, no-c-format
+msgid ""
+      "Configuration&lt;?&gt; configuration = Validation.byDefaultProvider().configure();\n"
+      "ValidatorFactory factory = configuration\n"
+      "    .traversableResolver(new MyTraversableResolver())\n"
+      "    .buildValidatorFactory();\n"
+      "\n"
+      "Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: classname
+#: bootstrapping.xml:234
+#, no-c-format
+msgid "ConstraintValidatorFactory"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:236
+#, no-c-format
+msgid "Last but not least, there is one more configuration option to discuss, the <classname>ConstraintValidatorFactory</classname>. The default <classname>ConstraintValidatorFactory</classname> provided by Hibernate Validator requires a public no-arg constructor to instantiate <classname>ConstraintValidator</classname> instances (see <xref linkend=\"section-constraint-validator\"/>). Using a custom <classname>ConstraintValidatorFactory</classname> offers for example the possibility to use dependency injection in constraint implementations. The configuration of the custom factory is once more via the <classname>Configuration</classname> (<xref linkend=\"example-constraint-validator-factory\"/>)."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:249
+#, no-c-format
+msgid "Providing a custom ConstraintValidatorFactory"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:251
+#, no-c-format
+msgid ""
+      "Configuration&lt;?&gt; configuration = Validation.byDefaultProvider().configure();\n"
+      "ValidatorFactory factory = configuration\n"
+      "    .constraintValidatorFactory(new IOCConstraintValidatorFactory())\n"
+      "    .buildValidatorFactory();\n"
+      "\n"
+      "Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:254
+#, no-c-format
+msgid "The interface you have to implement is:"
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:257
+#, no-c-format
+msgid "ConstraintValidatorFactory interface"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:259
+#, no-c-format
+msgid ""
+      "public interface ConstraintValidatorFactory {\n"
+      "    /**\n"
+      "     * @param key The class of the constraint validator to instantiate.\n"
+      "     *\n"
+      "     * @return A constraint validator instance of the specified class.\n"
+      "     */\n"
+      "     &lt;T extends ConstraintValidator&lt;?,?&gt;&gt; T getInstance(Class&lt;T&gt; key);\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:263
+#, no-c-format
+msgid "Any constraint implementation relying on <classname>ConstraintValidatorFactory</classname> behaviors specific to an implementation (dependency injection, no no-arg constructor and so on) are not considered portable."
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:270
+#, no-c-format
+msgid "ConstraintValidatorFactory should not cache instances as the state of each instance can be altered in the initialize method."
+msgstr ""
+

Added: validator/trunk/hibernate-validator/src/main/docbook/pot/modules/customconstraints.pot
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/pot/modules/customconstraints.pot	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/pot/modules/customconstraints.pot	2010-07-06 15:18:26 UTC (rev 19904)
@@ -0,0 +1,675 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-07-06 14:46+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: customconstraints.xml:25
+#, no-c-format
+msgid "Creating custom constraints"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:27
+#, no-c-format
+msgid "Though the Bean Validation API defines a whole set of standard constraint annotations one can easily think of situations in which these standard annotations won't suffice. For these cases you are able to create custom constraints tailored to your specific validation requirements in a simple manner."
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:34
+#, no-c-format
+msgid "Creating a simple constraint"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:36
+#, no-c-format
+msgid "To create a custom constraint, the following three steps are required:"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:41
+#, no-c-format
+msgid "Create a constraint annotation"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:45
+#, no-c-format
+msgid "Implement a validator"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:49
+#, no-c-format
+msgid "Define a default error message"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:54
+#, no-c-format
+msgid "The constraint annotation"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:56
+#, no-c-format
+msgid "Let's write a constraint annotation, that can be used to express that a given string shall either be upper case or lower case. We'll apply it later on to the <property>licensePlate</property> field of the <classname>Car</classname> class from <xref linkend=\"validator-gettingstarted\"/> to ensure, that the field is always an upper-case string."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:63
+#, no-c-format
+msgid "First we need a way to express the two case modes. We might use <classname>String</classname> constants, but a better way to go is to use a Java 5 enum for that purpose:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:68
+#, no-c-format
+msgid "Enum <classname>CaseMode</classname> to express upper vs. lower case"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:71
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "public enum CaseMode {\n"
+      "    UPPER, \n"
+      "    LOWER;\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:74
+#, no-c-format
+msgid "Now we can define the actual constraint annotation. If you've never designed an annotation before, this may look a bit scary, but actually it's not that hard:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:79
+#, no-c-format
+msgid "Defining CheckCase constraint annotation"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:81
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import static java.lang.annotation.ElementType.*;\n"
+      "import static java.lang.annotation.RetentionPolicy.*;\n"
+      "\n"
+      "import java.lang.annotation.Documented;\n"
+      "import java.lang.annotation.Retention;\n"
+      "import java.lang.annotation.Target;\n"
+      "\n"
+      "import javax.validation.Constraint;\n"
+      "import javax.validation.Payload;\n"
+      "\n"
+      "@Target( { METHOD, FIELD, ANNOTATION_TYPE })\n"
+      "@Retention(RUNTIME)\n"
+      "@Constraint(validatedBy = CheckCaseValidator.class)\n"
+      "@Documented\n"
+      "public @interface CheckCase {\n"
+      "\n"
+      "    String message() default \"{com.mycompany.constraints.checkcase}\";\n"
+      "\n"
+      "    Class&lt;?&gt;[] groups() default {};\n"
+      "\n"
+      "    Class&lt;? extends Payload&gt;[] payload() default {};\n"
+      "    \n"
+      "    CaseMode value();\n"
+      "\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:84
+#, no-c-format
+msgid "An annotation type is defined using the <code>@interface</code> keyword. All attributes of an annotation type are declared in a method-like manner. The specification of the Bean Validation API demands, that any constraint annotation defines"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:91
+#, no-c-format
+msgid "an attribute <property>message</property> that returns the default key for creating error messages in case the constraint is violated"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:97
+#, no-c-format
+msgid "an attribute <property>groups</property> that allows the specification of validation groups, to which this constraint belongs (see <xref linkend=\"validator-usingvalidator-validationgroups\"/>). This must default to an empty array of type <classname>Class&lt;?&gt;</classname>."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:105
+#, no-c-format
+msgid "an attribute <classname>payload</classname> that can be used by clients of the Bean Validation API to assign custom payload objects to a constraint. This attribute is not used by the API itself."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:109
+#, no-c-format
+msgid "An example for a custom payload could be the definition of a severity."
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:112
+#, no-c-format
+msgid ""
+      "public class Severity {\n"
+      "    public static class Info extends Payload {};\n"
+      "    public static class Error extends Payload {};\n"
+      "}\n"
+      "\n"
+      "public class ContactDetails {\n"
+      "    @NotNull(message=\"Name is mandatory\", payload=Severity.Error.class)\n"
+      "    private String name;\n"
+      "\n"
+      "    @NotNull(message=\"Phone number not specified, but not mandatory\", payload=Severity.Info.class)\n"
+      "    private String phoneNumber;\n"
+      "\n"
+      "    // ...\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:114
+#, no-c-format
+msgid "Now a client can after the validation of a <classname>ContactDetails</classname> instance access the severity of a constraint using <methodname>ConstraintViolation.getConstraintDescriptor().getPayload()</methodname> and adjust its behaviour depending on the severity."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:123
+#, no-c-format
+msgid "Besides those three mandatory attributes (<property>message</property>, <property>groups</property> and <property>payload</property>) we add another one allowing for the required case mode to be specified. The name <property>value</property> is a special one, which can be omitted upon using the annotation, if it is the only attribute specified, as e.g. in <code>@CheckCase(CaseMode.UPPER)</code>."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:131
+#, no-c-format
+msgid "In addition we annotate the annotation type with a couple of so-called meta annotations:"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:136
+#, no-c-format
+msgid "<code>@Target({ METHOD, FIELD, ANNOTATION_TYPE })</code>: Says, that methods, fields and annotation declarations may be annotated with @CheckCase (but not type declarations e.g.)"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:142
+#, no-c-format
+msgid "<code>@Retention(RUNTIME)</code>: Specifies, that annotations of this type will be available at runtime by the means of reflection"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:148
+#, no-c-format
+msgid "<code>@Constraint(validatedBy = CheckCaseValidator.class)</code>: Specifies the validator to be used to validate elements annotated with @CheckCase"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:154
+#, no-c-format
+msgid "<code>@Documented</code>: Says, that the use of <code>@CheckCase</code> will be contained in the JavaDoc of elements annotated with it"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:162
+#, no-c-format
+msgid "The constraint validator"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:165
+#, no-c-format
+msgid "Next, we need to implement a constraint validator, that's able to validate elements with a <classname>@CheckCase</classname> annotation. To do so, we implement the interface ConstraintValidator as shown below:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:171
+#, no-c-format
+msgid "Implementing a constraint validator for the constraint <classname>CheckCase</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:174
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import javax.validation.ConstraintValidator;\n"
+      "import javax.validation.ConstraintValidatorContext;\n"
+      "\n"
+      "public class CheckCaseValidator implements ConstraintValidator&lt;CheckCase, String&gt; {\n"
+      "\n"
+      "    private CaseMode caseMode;\n"
+      "\n"
+      "    public void initialize(CheckCase constraintAnnotation) {\n"
+      "        this.caseMode = constraintAnnotation.value();\n"
+      "    }\n"
+      "\n"
+      "    public boolean isValid(String object, ConstraintValidatorContext constraintContext) {\n"
+      "\n"
+      "        if (object == null)\n"
+      "            return true;\n"
+      "\n"
+      "        if (caseMode == CaseMode.UPPER)\n"
+      "            return object.equals(object.toUpperCase());\n"
+      "        else\n"
+      "            return object.equals(object.toLowerCase());\n"
+      "    }\n"
+      "\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:177
+#, no-c-format
+msgid "The <classname>ConstraintValidator</classname> interface defines two type parameters, which we set in our implementation. The first one specifies the annotation type to be validated (in our example <classname>CheckCase</classname>), the second one the type of elements, which the validator can handle (here <classname>String</classname>)."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:184
+#, no-c-format
+msgid "In case a constraint annotation is allowed at elements of different types, a <classname>ConstraintValidator</classname> for each allowed type has to be implemented and registered at the constraint annotation as shown above."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:189
+#, no-c-format
+msgid "The implementation of the validator is straightforward. The <methodname>initialize()</methodname> method gives us access to the attribute values of the annotation to be validated. In the example we store the <classname>CaseMode</classname> in a field of the validator for further usage."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:195
+#, no-c-format
+msgid "In the <methodname>isValid()</methodname> method we implement the logic, that determines, whether a <classname>String</classname> is valid according to a given <classname>@CheckCase</classname> annotation or not. This decision depends on the case mode retrieved in <classname>initialize()</classname>. As the Bean Validation specification recommends, we consider <code>null</code> values as being valid. If <code>null</code> is not a valid value for an element, it should be annotated with <code>@NotNull</code> explicitly."
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:205
+#, no-c-format
+msgid "The ConstraintValidatorContext"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:207
+#, no-c-format
+msgid "relies on the default error message generation by just returning <constant>true</constant> or <constant>false</constant> from the <methodname>isValid</methodname> call. Using the passed <classname>ConstraintValidatorContext</classname> object it is possible to either add additional error messages or completely disable the default error message generation and solely define custom error messages. The <classname>ConstraintValidatorContext</classname> API is modeled as fluent interface and is best demonstrated with an example:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:219
+#, no-c-format
+msgid "Use of ConstraintValidatorContext to define custom error messages"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:222
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import javax.validation.ConstraintValidator;\n"
+      "import javax.validation.ConstraintValidatorContext;\n"
+      "\n"
+      "public class CheckCaseValidator implements ConstraintValidator&lt;CheckCase, String&gt; {\n"
+      "\n"
+      "    private CaseMode caseMode;\n"
+      "\n"
+      "    public void initialize(CheckCase constraintAnnotation) {\n"
+      "        this.caseMode = constraintAnnotation.value();\n"
+      "    }\n"
+      "\n"
+      "    public boolean isValid(String object, ConstraintValidatorContext constraintContext) {\n"
+      "\n"
+      "        if (object == null)\n"
+      "            return true;\n"
+      "        \n"
+      "        boolean isValid;\n"
+      "        if (caseMode == CaseMode.UPPER) {\n"
+      "            isValid = object.equals(object.toUpperCase());\n"
+      "        }\n"
+      "        else {\n"
+      "            isValid = object.equals(object.toLowerCase());\n"
+      "        }\n"
+      "        \n"
+      "        if(!isValid) {\n"
+      "            constraintContext.disableDefaultConstraintViolation();\n"
+      "            constraintContext.buildConstraintViolationWithTemplate( \"{com.mycompany.constraints.CheckCase.message}\"  ).addConstraintViolation();\n"
+      "        }\n"
+      "        return result;\n"
+      "    }\n"
+      "\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:225
+#, no-c-format
+msgid "shows how you can disable the default error message generation and add a custom error message using a specified message template. In this example the use of the <classname>ConstraintValidatorContext</classname> results in the same error message as the default error message generation."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:231
+#, no-c-format
+msgid "It is important to end each new constraint violation with <methodname>addConstraintViolation</methodname>. Only after that the new constraint violation will be created."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:236
+#, no-c-format
+msgid "In case you are implementing a <classname>ConstraintValidator</classname> a class level constraint it is also possible to adjust set the property path for the created constraint violations. This is important for the case where you validate multiple properties of the class or even traverse the object graph. A custom property path creation could look like <xref linkend=\"example-custom-error\"/>."
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:245
+#, no-c-format
+msgid "Adding new <classname>ConstraintViolation</classname> with custom property path"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:248
+#, no-c-format
+msgid ""
+      "public boolean isValid(Group group, ConstraintValidatorContext constraintValidatorContext) {\n"
+      "    boolean isValid = false;\n"
+      "    ...\n"
+      "\n"
+      "    if(!isValid) {\n"
+      "        constraintValidatorContext\n"
+      "            .buildConstraintViolationWithTemplate( \"{my.custom.template}\" )\n"
+      "            .addNode( \"myProperty\" ).addConstraintViolation();\n"
+      "    }\n"
+      "    return isValid;\n"
+      "}"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:254
+#, no-c-format
+msgid "The error message"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:256
+#, no-c-format
+msgid "Finally we need to specify the error message, that shall be used, in case a <classname>@CheckCase</classname> constraint is violated. To do so, we add the following to our custom <filename>ValidationMessages.properties</filename> (see also <xref linkend=\"section-message-interpolation\"/>)"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:263
+#, no-c-format
+msgid "Defining a custom error message for the <classname>CheckCase</classname> constraint"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:266
+#, no-c-format
+msgid "com.mycompany.constraints.CheckCase.message=Case mode must be {value}."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:269
+#, no-c-format
+msgid "If a validation error occurs, the validation runtime will use the default value, that we specified for the message attribute of the <classname>@CheckCase</classname> annotation to look up the error message in this file."
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:276
+#, no-c-format
+msgid "Using the constraint"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:278
+#, no-c-format
+msgid "Now that our first custom constraint is completed, we can use it in the <classname>Car</classname> class from the <xref linkend=\"validator-gettingstarted\"/> chapter to specify that the <property>licensePlate</property> field shall only contain upper-case strings:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:285
+#, no-c-format
+msgid "Applying the <classname>CheckCase</classname> constraint"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:288
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import javax.validation.constraints.Min;\n"
+      "import javax.validation.constraints.NotNull;\n"
+      "import javax.validation.constraints.Size;\n"
+      "\n"
+      "public class Car {\n"
+      "\n"
+      "    @NotNull\n"
+      "    private String manufacturer;\n"
+      "\n"
+      "    @NotNull\n"
+      "    @Size(min = 2, max = 14)\n"
+      "    @CheckCase(CaseMode.UPPER)\n"
+      "    private String licensePlate;\n"
+      "\n"
+      "    @Min(2)\n"
+      "    private int seatCount;\n"
+      "    \n"
+      "    public Car(String manufacturer, String licencePlate, int seatCount) {\n"
+      "\n"
+      "        this.manufacturer = manufacturer;\n"
+      "        this.licensePlate = licencePlate;\n"
+      "        this.seatCount = seatCount;\n"
+      "    }\n"
+      "\n"
+      "    //getters and setters ...\n"
+      "\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:291
+#, no-c-format
+msgid "Finally let's demonstrate in a little test that the <classname>@CheckCase</classname> constraint is properly validated:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:296
+#, no-c-format
+msgid "Testcase demonstrating the <classname>CheckCase</classname> validation"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:299
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import static org.junit.Assert.*;\n"
+      "\n"
+      "import java.util.Set;\n"
+      "\n"
+      "import javax.validation.ConstraintViolation;\n"
+      "import javax.validation.Validation;\n"
+      "import javax.validation.Validator;\n"
+      "import javax.validation.ValidatorFactory;\n"
+      "\n"
+      "import org.junit.BeforeClass;\n"
+      "import org.junit.Test;\n"
+      "\n"
+      "public class CarTest {\n"
+      "\n"
+      "    private static Validator validator;\n"
+      "\n"
+      "    @BeforeClass\n"
+      "    public static void setUp() {\n"
+      "        ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
+      "        validator = factory.getValidator();\n"
+      "    }\n"
+      "\n"
+      "    @Test\n"
+      "    public void testLicensePlateNotUpperCase() {\n"
+      "\n"
+      "        Car car = new Car(\"Morris\", \"dd-ab-123\", 4);\n"
+      "\n"
+      "        Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations =\n"
+      "            validator.validate(car);\n"
+      "        assertEquals(1, constraintViolations.size());\n"
+      "        assertEquals(\n"
+      "            \"Case mode must be UPPER.\", \n"
+      "            constraintViolations.iterator().next().getMessage());\n"
+      "    }\n"
+      "\n"
+      "    @Test\n"
+      "    public void carIsValid() {\n"
+      "\n"
+      "        Car car = new Car(\"Morris\", \"DD-AB-123\", 4);\n"
+      "\n"
+      "        Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations =\n"
+      "            validator.validate(car);\n"
+      "\n"
+      "        assertEquals(0, constraintViolations.size());\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:305
+#, no-c-format
+msgid "Constraint composition"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:307
+#, no-c-format
+msgid "Looking at the <property>licensePlate</property> field of the <classname>Car</classname> class in <xref linkend=\"example-car-with-checkcase\"/>, we see three constraint annotations already. In complexer scenarios, where even more constraints could be applied to one element, this might become a bit confusing easily. Furthermore, if we had a <property>licensePlate</property> field in another class, we would have to copy all constraint declarations to the other class as well, violating the DRY principle."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:316
+#, no-c-format
+msgid "This problem can be tackled using compound constraints. In the following we create a new constraint annotation <classname>@ValidLicensePlate</classname>, that comprises the constraints <classname>@NotNull</classname>, <classname>@Size</classname> and <classname>@CheckCase</classname>:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:323
+#, no-c-format
+msgid "Creating a composing constraint <classname>ValidLicensePlate</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:326
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import static java.lang.annotation.ElementType.*;\n"
+      "import static java.lang.annotation.RetentionPolicy.*;\n"
+      "\n"
+      "import java.lang.annotation.Documented;\n"
+      "import java.lang.annotation.Retention;\n"
+      "import java.lang.annotation.Target;\n"
+      "\n"
+      "import javax.validation.Constraint;\n"
+      "import javax.validation.Payload;\n"
+      "import javax.validation.constraints.NotNull;\n"
+      "import javax.validation.constraints.Size;\n"
+      "\n"
+      "@NotNull\n"
+      "@Size(min = 2, max = 14)\n"
+      "@CheckCase(CaseMode.UPPER)\n"
+      "@Target( { METHOD, FIELD, ANNOTATION_TYPE })\n"
+      "@Retention(RUNTIME)\n"
+      "@Constraint(validatedBy = {})\n"
+      "@Documented\n"
+      "public @interface ValidLicensePlate {\n"
+      "\n"
+      "    String message() default \"{com.mycompany.constraints.validlicenseplate}\";\n"
+      "\n"
+      "    Class&lt;?&gt;[] groups() default {};\n"
+      "\n"
+      "    Class&lt;? extends Payload&gt;[] payload() default {};\n"
+      "\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:329
+#, no-c-format
+msgid "To do so, we just have to annotate the constraint declaration with its comprising constraints (btw. that's exactly why we allowed annotation types as target for the <classname>@CheckCase</classname> annotation). As no additional validation is required for the <classname>@ValidLicensePlate</classname> annotation itself, we don't declare a validator within the <classname>@Constraint </classname>meta annotation."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:337
+#, no-c-format
+msgid "Using the new compound constraint at the <property>licensePlate</property> field now is fully equivalent to the previous version, where we declared the three constraints directly at the field itself:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:343
+#, no-c-format
+msgid "Application of composing constraint <classname>ValidLicensePlate</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:346
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "public class Car {\n"
+      "\n"
+      "    @ValidLicensePlate\n"
+      "    private String licensePlate;\n"
+      "\n"
+      "    //...\n"
+      "\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:349
+#, no-c-format
+msgid "The set of <classname>ConstraintViolations</classname> retrieved when validating a <classname>Car</classname> instance will contain an entry for each violated composing constraint of the <classname>@ValidLicensePlate</classname> constraint. If you rather prefer a single <classname>ConstraintViolation</classname> in case any of the composing constraints is violated, the <classname>@ReportAsSingleViolation</classname> meta constraint can be used as follows:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:359
+#, no-c-format
+msgid "Usage of <classname>@ReportAsSingleViolation</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:361
+#, no-c-format
+msgid ""
+      "//...\n"
+      "@ReportAsSingleViolation\n"
+      "public @interface ValidLicensePlate {\n"
+      "\n"
+      "    String message() default \"{com.mycompany.constraints.validlicenseplate}\";\n"
+      "\n"
+      "    Class&lt;?&gt;[] groups() default {};\n"
+      "\n"
+      "    Class&lt;? extends Payload&gt;[] payload() default {};\n"
+      "\n"
+      "}"
+msgstr ""
+

Added: validator/trunk/hibernate-validator/src/main/docbook/pot/modules/furtherreading.pot
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/pot/modules/furtherreading.pot	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/pot/modules/furtherreading.pot	2010-07-06 15:18:26 UTC (rev 19904)
@@ -0,0 +1,40 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-07-06 14:46+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: furtherreading.xml:25
+#, no-c-format
+msgid "Further reading"
+msgstr ""
+
+#. Tag: para
+#: furtherreading.xml:27
+#, no-c-format
+msgid "Last but not least, a few pointers to further information. A great source for examples is the Bean Validation TCK which can is available for anonymous access in the Hibernate <ulink url=\"http://anonsvn.jboss.org/repos/hibernate/validator/trunk\">SVN repository</ulink>. Alternatively you can view the tests using <ulink url=\"http://fisheye.jboss.org/browse/Hibernate/beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests\">Hibernate's fisheye</ulink> installation. <ulink url=\"http://jcp.org/en/jsr/detail?id=303\">The JSR 303</ulink> specification itself is also a great way to deepen your understanding of Bean Validation resp. Hibernate Validator."
+msgstr ""
+
+#. Tag: para
+#: furtherreading.xml:38
+#, no-c-format
+msgid "If you have any further questions to Hibernate Validator or want to share some of your use cases have a look at the <ulink url=\"http://community.jboss.org/en/hibernate/validator\">Hibernate Validator Wiki</ulink> and the <ulink url=\"https://forum.hibernate.org/viewforum.php?f=9\">Hibernate Validator Forum</ulink>."
+msgstr ""
+
+#. Tag: para
+#: furtherreading.xml:45
+#, no-c-format
+msgid "In case you would like to report a bug use <ulink url=\"http://opensource.atlassian.com/projects/hibernate/browse/HV\">Hibernate's Jira</ulink> instance. Feedback is always welcome!"
+msgstr ""
+

Added: validator/trunk/hibernate-validator/src/main/docbook/pot/modules/gettingstarted.pot
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/pot/modules/gettingstarted.pot	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/pot/modules/gettingstarted.pot	2010-07-06 15:18:26 UTC (rev 19904)
@@ -0,0 +1,347 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-07-06 14:51+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: gettingstarted.xml:25
+#, no-c-format
+msgid "Getting started"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:27
+#, no-c-format
+msgid "This chapter will show you how to get started with Hibernate Validator, the reference implementation (RI) of Bean Validation. For the following quickstart you need:"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:33
+#, no-c-format
+msgid "A JDK &gt;= 5"
+msgstr ""
+
+#. Tag: ulink
+#: gettingstarted.xml:37
+#, no-c-format
+msgid "Apache Maven"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:41
+#, no-c-format
+msgid "An Internet connection (Maven has to download all required libraries)"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:46
+#, no-c-format
+msgid ""
+      "A properly configured remote repository. Add the following to your <filename>settings.xml</filename>: <example> <title>Configuring the JBoss Maven repository in <filename>settings.xml</filename></title> <programlisting>&lt;repositories&gt;\n"
+      "    &lt;repository&gt;\n"
+      "        &lt;id&gt;jboss&lt;/id&gt;\n"
+      "        &lt;url&gt;http://repository.jboss.com/maven2&lt;/url&gt;\n"
+      "        &lt;releases&gt;\n"
+      "            &lt;enabled&gt;true&lt;/enabled&gt;\n"
+      "        &lt;/releases&gt;\n"
+      "        &lt;snapshots&gt;\n"
+      "            &lt;enabled&gt;false&lt;/enabled&gt;\n"
+      "        &lt;/snapshots&gt;\n"
+      "    &lt;/repository&gt;\n"
+      "&lt;/repositories&gt;</programlisting> </example>More information about <filename>settings.xml</filename> can be found in the <ulink url=\"http://maven.apache.org/ref/2.0.8/maven-settings/settings.html\">Maven Local Settings Model</ulink>."
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:60
+#, no-c-format
+msgid ""
+      "Hibernate Validator uses JAXB for XML parsing. JAXB is part of the Java Class Library since Java 6 which means that if you run Hibernate Validator with Java 5 you will have to add additional JAXB dependencies. Using maven you have to add the following dependencies:<programlisting>&lt;dependency&gt;\n"
+      "    &lt;groupId&gt;javax.xml.bind&lt;/groupId&gt;\n"
+      "    &lt;artifactId&gt;jaxb-api&lt;/artifactId&gt;\n"
+      "    &lt;version&gt;2.2&lt;/version&gt;\n"
+      "&lt;/dependency&gt;\n"
+      "&lt;dependency&gt;\n"
+      "    &lt;groupId&gt;com.sun.xml.bind&lt;/groupId&gt;\n"
+      "    &lt;artifactId&gt;jaxb-impl&lt;/artifactId&gt;\n"
+      "    &lt;version&gt;2.1.12&lt;/version&gt;\n"
+      "&lt;/dependency&gt;\n"
+      "</programlisting> if you are using the SourceForge package you find the necessary libraries in the <filename>lib/jdk5</filename> directory. In case you are not using the XML configuration you can also disable it explicitly by calling <methodname>Configuration.ignoreXmlConfiguration()</methodname> during <classname>ValidationFactory</classname> creation. In this case the JAXB dependencies are not needed."
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:73
+#, no-c-format
+msgid "Setting up a new Maven project"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:75
+#, no-c-format
+msgid "Start by creating new Maven project using the Maven archetype plugin as follows:"
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:79
+#, no-c-format
+msgid "Using Maven's archetype plugin to create a sample project using Hibernate Validator"
+msgstr ""
+
+#. Tag: programlisting
+#: gettingstarted.xml:82
+#, no-c-format
+msgid ""
+      "mvn archetype:create -DarchetypeGroupId=org.hibernate \\\n"
+      "                     -DarchetypeArtifactId=hibernate-validator-quickstart-archetype \\\n"
+      "                     -DarchetypeVersion=&version; \\\n"
+      "                     -DgroupId=com.mycompany \n"
+      "                     -DartifactId=hv-quickstart"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:85
+#, no-c-format
+msgid "Maven will create your project in the directory hv-quickstart. Change into this directory and run:"
+msgstr ""
+
+#. Tag: programlisting
+#: gettingstarted.xml:88
+#, no-c-format
+msgid "mvn test"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:88
+#, no-c-format
+msgid "Maven will compile the example code and run the implemented unit tests. Let's have a look at the actual code."
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:94
+#, no-c-format
+msgid "Applying constraints"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:96
+#, no-c-format
+msgid "Open the project in the IDE of your choice and have a look at the class <classname>Car</classname>:"
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:100
+#, no-c-format
+msgid "Class Car annotated with constraints"
+msgstr ""
+
+#. Tag: programlisting
+#: gettingstarted.xml:102
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import javax.validation.constraints.Min;\n"
+      "import javax.validation.constraints.NotNull;\n"
+      "import javax.validation.constraints.Size;\n"
+      "\n"
+      "public class Car {\n"
+      "\n"
+      "    @NotNull\n"
+      "    private String manufacturer;\n"
+      "\n"
+      "    @NotNull\n"
+      "    @Size(min = 2, max = 14)\n"
+      "    private String licensePlate;\n"
+      "\n"
+      "    @Min(2)\n"
+      "    private int seatCount;\n"
+      "    \n"
+      "    public Car(String manufacturer, String licencePlate, int seatCount) {\n"
+      "        this.manufacturer = manufacturer;\n"
+      "        this.licensePlate = licencePlate;\n"
+      "        this.seatCount = seatCount;\n"
+      "    }\n"
+      "\n"
+      "    //getters and setters ...\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:105
+#, no-c-format
+msgid "<classname>@NotNull</classname>, <classname>@Size</classname> and <classname>@Min</classname> are so-called constraint annotations, that we use to declare constraints, which shall be applied to the fields of a <classname>Car</classname> instance:"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:112
+#, no-c-format
+msgid "<property>manufacturer</property> shall never be null"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:116
+#, no-c-format
+msgid "<property>licensePlate</property> shall never be null and must be between 2 and 14 characters long"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:121
+#, no-c-format
+msgid "<property>seatCount</property> shall be at least 2."
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:127
+#, no-c-format
+msgid "Validating constraints"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:129
+#, no-c-format
+msgid "To perform a validation of these constraints, we use a <classname>Validator</classname> instance. Let's have a look at the <classname>CarTest</classname> class:"
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:134
+#, no-c-format
+msgid "Class CarTest showing validation examples"
+msgstr ""
+
+#. Tag: programlisting
+#: gettingstarted.xml:136
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import static org.junit.Assert.*;\n"
+      "\n"
+      "import java.util.Set;\n"
+      "\n"
+      "import javax.validation.ConstraintViolation;\n"
+      "import javax.validation.Validation;\n"
+      "import javax.validation.Validator;\n"
+      "import javax.validation.ValidatorFactory;\n"
+      "\n"
+      "import org.junit.BeforeClass;\n"
+      "import org.junit.Test;\n"
+      "\n"
+      "public class CarTest {\n"
+      "\n"
+      "    private static Validator validator;\n"
+      "\n"
+      "    @BeforeClass\n"
+      "    public static void setUp() {\n"
+      "        ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
+      "        validator = factory.getValidator();\n"
+      "    }\n"
+      "\n"
+      "    @Test\n"
+      "    public void manufacturerIsNull() {\n"
+      "        Car car = new Car(null, \"DD-AB-123\", 4);\n"
+      "\n"
+      "        Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations =\n"
+      "            validator.validate(car);\n"
+      "\n"
+      "        assertEquals(1, constraintViolations.size());\n"
+      "        assertEquals(\"may not be null\", constraintViolations.iterator().next().getMessage());\n"
+      "    }\n"
+      "\n"
+      "    @Test\n"
+      "    public void licensePlateTooShort() {\n"
+      "        Car car = new Car(\"Morris\", \"D\", 4);\n"
+      "\n"
+      "        Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations = \n"
+      "            validator.validate(car);\n"
+      "\n"
+      "        assertEquals(1, constraintViolations.size());\n"
+      "        assertEquals(\"size must be between 2 and 14\", constraintViolations.iterator().next().getMessage());\n"
+      "    }\n"
+      "    \n"
+      "    @Test\n"
+      "    public void seatCountTooLow() {\n"
+      "        Car car = new Car(\"Morris\", \"DD-AB-123\", 1);\n"
+      "\n"
+      "        Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations =\n"
+      "            validator.validate(car);\n"
+      "\n"
+      "        assertEquals(1, constraintViolations.size());\n"
+      "        assertEquals(\"must be greater than or equal to 2\", constraintViolations.iterator().next().getMessage());\n"
+      "    }\n"
+      "\n"
+      "    @Test\n"
+      "    public void carIsValid() {\n"
+      "        Car car = new Car(\"Morris\", \"DD-AB-123\", 2);\n"
+      "\n"
+      "        Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations =\n"
+      "            validator.validate(car);\n"
+      "\n"
+      "        assertEquals(0, constraintViolations.size());\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:139
+#, no-c-format
+msgid "In the <methodname>setUp()</methodname> method we get a <classname>Validator</classname> instance from the <classname>ValidatorFactory</classname>. A <classname>Validator</classname> instance is thread-safe and may be reused multiple times. For this reason we store it as field of our test class. We can use the <classname>Validator</classname> now to validate the different car instances in the test methods."
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:147
+#, no-c-format
+msgid "The <methodname>validate()</methodname> method returns a set of <classname>ConstraintViolation</classname> instances, which we can iterate in order to see which validation errors occurred. The first three test methods show some expected constraint violations:"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:154
+#, no-c-format
+msgid "The <classname>@NotNull</classname> constraint on manufacturer is violated in <methodname>manufacturerIsNull()</methodname>"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:159
+#, no-c-format
+msgid "The <classname>@Size</classname> constraint on licensePlate is violated in <methodname>licensePlateTooShort()</methodname>"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:164
+#, no-c-format
+msgid "The <classname>@Min</classname> constraint on seatCount is violated in <methodname>seatCountTooLow()</methodname>"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:169
+#, no-c-format
+msgid "If the object validates successfully, <methodname>validate()</methodname> returns an empty set."
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:172
+#, no-c-format
+msgid "Note that we only use classes from the package <package>javax.validation</package> from the Bean Validation 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."
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:180
+#, no-c-format
+msgid "Where to go next?"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:182
+#, no-c-format
+msgid "That concludes our 5 minute tour through the world of Hibernate Validator. Continue exploring the code examples or look at further examples referenced in <xref linkend=\"chapter-further-reading\"/>. To deepen your understanding of Hibernate Validator just continue reading <xref linkend=\"validator-usingvalidator\"/>. In case your application has specific validation requirements have a look at <xref linkend=\"validator-customconstraints\"/>."
+msgstr ""
+

Added: validator/trunk/hibernate-validator/src/main/docbook/pot/modules/integration.pot
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/pot/modules/integration.pot	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/pot/modules/integration.pot	2010-07-06 15:18:26 UTC (rev 19904)
@@ -0,0 +1,191 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-07-06 14:46+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: integration.xml:25
+#, no-c-format
+msgid "Integration with other frameworks"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:27
+#, no-c-format
+msgid "Hibernate Validator is intended to be used to implement multi-layered data validation, where constraints are expressed in a single place (the annotated domain model) and checked in various different layers of the application."
+msgstr ""
+
+#. Tag: title
+#: integration.xml:33
+#, no-c-format
+msgid "OSGi"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:35
+#, no-c-format
+msgid "The Hibernate Validator jar file is conform to the OSGi specification and can be used within any OSGi container. The classes in the following packages are exported by Hibernate Validator and are considered part of the public API - <package>org.hibernate.validator</package>, <package>org.hibernate.validator.constraints</package>, <package>org.hibernate.validator.messageinterpolation</package> and <package>org.hibernate.validator.resourceloading</package>."
+msgstr ""
+
+#. Tag: title
+#: integration.xml:46
+#, no-c-format
+msgid "Database schema-level validation"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:48
+#, no-c-format
+msgid "Out of the box, Hibernate Annotations (as of Hibernate 3.5.x) will translate the constraints you have defined for your entities into mapping metadata. For example, if a property of your entity is annotated <literal>@NotNull</literal>, its columns will be declared as <literal>not null</literal> in the DDL schema generated by Hibernate."
+msgstr ""
+
+#. Tag: para
+#: integration.xml:54
+#, no-c-format
+msgid "If, for some reason, the feature needs to be disabled, set <literal>hibernate.validator.apply_to_ddl</literal> to <literal>false</literal>. See also <xref linkend=\"table-builtin-constraints\"/>."
+msgstr ""
+
+#. Tag: para
+#: integration.xml:59
+#, no-c-format
+msgid "You can also limit the DDL constraint generation to a subset of the defined constraints by setting the property <property>org.hibernate.validator.group.ddl</property>. The property specifies the comma-separated, fully specified class names of the groups a constraint has to be part of in order to be considered for DDL schema generation."
+msgstr ""
+
+#. Tag: title
+#: integration.xml:68
+#, no-c-format
+msgid "ORM integration"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:70
+#, no-c-format
+msgid "Hibernate Validator integrates with both Hibernate and all pure Java Persistence providers."
+msgstr ""
+
+#. Tag: title
+#: integration.xml:74
+#, no-c-format
+msgid "Hibernate event-based validation"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:76
+#, no-c-format
+msgid "Hibernate Validator has a built-in Hibernate event listener - <ulink url=\"http://fisheye.jboss.org/browse/Hibernate/core/trunk/annotations/src/main/java/org/hibernate/cfg/beanvalidation/BeanValidationEventListener.java\"><classname>org.hibernate.cfg.beanvalidation.BeanValidationEventListener</classname></ulink> - which is part of Hibernate Annotations (as of Hibernate 3.5.x). Whenever a <literal>PreInsertEvent</literal>, <literal>PreUpdateEvent</literal> or <classname>PreDeleteEvent</classname> occurs, the listener will verify all constraints of the entity instance and throw an exception if any constraint is violated. Per default objects will be checked before any inserts or updates are made by Hibernate. Pre deletion events will per default not trigger a validation. You can configure the groups to be validated per event type using the properties <property>javax.persistence.validation.group.pre-persist</property>, <property>javax.persistence.validation.group.pre-upd!
 ate</property> and <property>javax.persistence.validation.group.pre-remove</property>. The values of these properties are the comma-separated, fully specified class names of the groups to validate. <xref linkend=\"example-beanvalidationeventlistener-config\"/> shows the default values for these properties. In this case they could also be omitted."
+msgstr ""
+
+#. Tag: para
+#: integration.xml:97
+#, no-c-format
+msgid "On constraint violation, the event will raise a runtime <classname>ConstraintViolationException</classname> which contains a set of <literal>ConstraintViolation</literal>s describing each failure."
+msgstr ""
+
+#. Tag: para
+#: integration.xml:102
+#, no-c-format
+msgid "If Hibernate Validator is present in the classpath, Hibernate Annotations (or Hibernate EntityManager) will use it transparently. To avoid validation even though Hibernate Validator is in the classpath set <property>javax.persistence.validation.mode</property> to <constant>none</constant>."
+msgstr ""
+
+#. Tag: para
+#: integration.xml:109
+#, no-c-format
+msgid "If the beans are not annotated with validation annotations, there is no runtime performance cost."
+msgstr ""
+
+#. Tag: para
+#: integration.xml:113
+#, no-c-format
+msgid "In case you need to manually set the event listeners for Hibernate Core, use the following configuration in <literal>hibernate.cfg.xml</literal>:"
+msgstr ""
+
+#. Tag: title
+#: integration.xml:118
+#, no-c-format
+msgid "Manual configuration of <classname>BeanValidationEvenListener</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: integration.xml:121
+#, no-c-format
+msgid ""
+      "&lt;hibernate-configuration&gt;\n"
+      "    &lt;session-factory&gt;\n"
+      "       ...\n"
+      "       &lt;property name=\"javax.persistence.validation.group.pre-persist\"&gt;javax.validation.groups.Default&lt;/property&gt;\n"
+      "       &lt;property name=\"javax.persistence.validation.group.pre-update\"&gt;javax.validation.groups.Default&lt;/property&gt;\n"
+      "       &lt;property name=\"javax.persistence.validation.group.pre-remove\"&gt;&lt;/property&gt;\n"
+      "       ...\n"
+      "       &lt;event type=\"pre-update\"&gt;\n"
+      "         &lt;listener class=\"org.hibernate.cfg.beanvalidation.BeanValidationEventListener\"/&gt;\n"
+      "       &lt;/event&gt;\n"
+      "       &lt;event type=\"pre-insert\"&gt;\n"
+      "         &lt;listener class=\"org.hibernate.cfg.beanvalidation.BeanValidationEventListener\"/&gt;\n"
+      "       &lt;/event&gt;\n"
+      "       &lt;event type=\"pre-delete\"&gt;\n"
+      "         &lt;listener class=\"org.hibernate.cfg.beanvalidation.BeanValidationEventListener\"/&gt;\n"
+      "       &lt;/event&gt;\n"
+      "    &lt;/session-factory&gt;\n"
+      "&lt;/hibernate-configuration&gt;"
+msgstr ""
+
+#. Tag: title
+#: integration.xml:126
+#, no-c-format
+msgid "<title>JPA</title>"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:128
+#, no-c-format
+msgid "If you are using JPA 2 and Hibernate Validator is in the classpath the JPA2 specification requires that Bean Validation gets enabled. The properties <property>javax.persistence.validation.group.pre-persist</property>, <property>javax.persistence.validation.group.pre-update</property> and <property>javax.persistence.validation.group.pre-remove</property> as described in <xref linkend=\"validator-checkconstraints-orm-hibernateevent\"/> can in this case be configured in <filename>persistence.xml</filename>. <filename>persistence.xml</filename> also defines a node validation-mode while can be set to <constant>AUTO</constant>, <constant>CALLBACK</constant>, <constant>NONE</constant>. The default is <constant>AUTO</constant>."
+msgstr ""
+
+#. Tag: para
+#: integration.xml:142
+#, no-c-format
+msgid "In a JPA 1 you will have to create and register Hibernate Validator yourself. In case you are using Hibernate EntityManager you can add a customized version of the <classname>BeanValidationEventListener</classname> described in <xref linkend=\"validator-checkconstraints-orm-hibernateevent\"/> to your project and register it manually."
+msgstr ""
+
+#. Tag: title
+#: integration.xml:152
+#, no-c-format
+msgid "Presentation layer validation"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:154
+#, no-c-format
+msgid "When working with JSF2 or <productname>JBoss Seam</productname> and Hibernate Validator (Bean Validation) is present in the runtime environment validation is triggered for every field in the application. <xref linkend=\"example-jsf2\"/> shows an example of the f:validateBean tag in a JSF page. For more information refer to the Seam documentation or the JSF 2 specification."
+msgstr ""
+
+#. Tag: title
+#: integration.xml:162
+#, no-c-format
+msgid "Usage of Bean Validation within JSF2"
+msgstr ""
+
+#. Tag: programlisting
+#: integration.xml:164
+#, no-c-format
+msgid ""
+      "&lt;h:form&gt;\n"
+      "  <emphasis role=\"bold\">&lt;f:validateBean&gt;</emphasis>\n"
+      "    &lt;h:inputText value=”#{model.property}” /&gt;\n"
+      "    &lt;h:selectOneRadio value=”#{model.radioProperty}” &gt; ... &lt;/h:selectOneRadio&gt;\n"
+      "    &lt;!-- other input components here --&gt;\n"
+      "  <emphasis role=\"bold\">&lt;/f:validateBean&gt;</emphasis>\n"
+      "&lt;/h:form&gt;"
+msgstr ""
+

Added: validator/trunk/hibernate-validator/src/main/docbook/pot/modules/preface.pot
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/pot/modules/preface.pot	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/pot/modules/preface.pot	2010-07-06 15:18:26 UTC (rev 19904)
@@ -0,0 +1,40 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-07-06 14:46+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: preface.xml:25
+#, no-c-format
+msgid "Preface"
+msgstr ""
+
+#. Tag: para
+#: preface.xml:27
+#, no-c-format
+msgid "Validating data is a common task that occurs throughout any application, from the presentation layer to the persistence layer. Often the same validation logic is implemented in each layer, proving time consuming and error-prone. To avoid duplication of these validations in each layer, developers often bundle validation logic directly into the domain model, cluttering domain classes with validation code which is really metadata about the class itself."
+msgstr ""
+
+#. Tag: para
+#: preface.xml:46
+#, no-c-format
+msgid "JSR 303 - Bean Validation - defines a metadata model and API for entity validation. The default metadata source is annotations, with the ability to override and extend the meta-data through the use of XML. The API is not tied to a specific application tier or programming model. It is specifically not tied to either the web tier or the persistence tier, and is available for both server-side application programming, as well as rich client Swing application developers."
+msgstr ""
+
+#. Tag: para
+#: preface.xml:65
+#, no-c-format
+msgid "Hibernate Validator is the reference implementation of this JSR."
+msgstr ""
+

Added: validator/trunk/hibernate-validator/src/main/docbook/pot/modules/programmaticapi.pot
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/pot/modules/programmaticapi.pot	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/pot/modules/programmaticapi.pot	2010-07-06 15:18:26 UTC (rev 19904)
@@ -0,0 +1,133 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-07-06 14:46+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: programmaticapi.xml:25 programmaticapi.xml:48
+#, no-c-format
+msgid "Programmatic constraint definition"
+msgstr ""
+
+#. Tag: para
+#: programmaticapi.xml:28
+#, no-c-format
+msgid "Use of the features described in the following sections is not portable between Bean Validation providers/implementations."
+msgstr ""
+
+#. Tag: para
+#: programmaticapi.xml:32
+#, no-c-format
+msgid "Hibernate Validator allows to configure constraints not only via annotations and xml, but also via a programmatic API. This API can be used exclusively or in combination with annotations and xml. If used in combination programmatic constraints are additive to otherwise configured constraints."
+msgstr ""
+
+#. Tag: para
+#: programmaticapi.xml:38
+#, no-c-format
+msgid "The programmatic API is centered around the <classname>ConstraintMapping</classname> class which can be found together with its supporting classes in the <package>org.hibernate.validator.cfg</package> package. <classname>ConstraintMapping</classname> is the entry point to a fluent API allowing the definition of constraints. <xref lang=\"\" linkend=\"example-constraint-mapping\"/> shows how the API can be used."
+msgstr ""
+
+#. Tag: programlisting
+#: programmaticapi.xml:50
+#, no-c-format
+msgid ""
+      "ConstraintMapping mapping = new ConstraintMapping();\n"
+      "mapping.type( Car.class )\n"
+      "    .property( \"manufacturer\", FIELD )\n"
+      "        .constraint( NotNullDef.class )\n"
+      "    .property( \"licensePlate\", FIELD )\n"
+      "        .constraint( NotNullDef.class )\n"
+      "        .constraint( SizeDef.class )\n"
+      "            .min( 2 )\n"
+      "            .max( 14 )\n"
+      "    .property( \"seatCount\", FIELD )\n"
+      "        .constraint( MinDef.class )\n"
+      "            .value ( 2 )\n"
+      ".type( RentalCar.class )\n"
+      "    .property( \"rentalStation\", METHOD)\n"
+      "        .constraint( NotNullDef.class );"
+msgstr ""
+
+#. Tag: para
+#: programmaticapi.xml:53
+#, no-c-format
+msgid "As you can see you can configure constraints on multiple classes and properties using method chaining. The constraint definition classes <classname>NotNullDef</classname>, <classname>SizeDef</classname> and <classname>MinDef</classname> are helper classes which allow to configure constraint parameters in a type-safe fashion. Definition classes exists for all built-in constraints in the <classname>org.hibernate.validator.cfg.defs</classname> package. For a custom constraint you can either create your own definition class extending <classname>ConstraintDef</classname> or you can use <classname>GenericConstraintDef</classname> as seen in <xref linkend=\"example-generic-constraint-mapping\"/>."
+msgstr ""
+
+#. Tag: title
+#: programmaticapi.xml:66
+#, no-c-format
+msgid "Programmatic constraint definition using <classname>GenericConstraintDef</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: programmaticapi.xml:69
+#, no-c-format
+msgid ""
+      "ConstraintMapping mapping = new ConstraintMapping();\n"
+      "mapping.type( Car.class )\n"
+      "    .property( \"licensePlate\", FIELD )\n"
+      "        .constraint( GenericConstraintDef.class )\n"
+      "            .constraintType( CheckCase.class )\n"
+      "            .param( \"value\", CaseMode.UPPER );"
+msgstr ""
+
+#. Tag: para
+#: programmaticapi.xml:72
+#, no-c-format
+msgid "Last but not least, you can also define cascading constraints as well as the default group sequence of an entity."
+msgstr ""
+
+#. Tag: title
+#: programmaticapi.xml:76
+#, no-c-format
+msgid "Cascading constraints and group redefinition"
+msgstr ""
+
+#. Tag: programlisting
+#: programmaticapi.xml:78
+#, no-c-format
+msgid ""
+      "ConstraintMapping mapping = new ConstraintMapping();\n"
+      "mapping.type( Car.class )\n"
+      "    .valid( \"driver\", FIELD )\n"
+      ".type( RentalCar.class)\n"
+      "    .defaultGroupSequence( RentalCar.class, CarChecks.class );"
+msgstr ""
+
+#. Tag: para
+#: programmaticapi.xml:81
+#, no-c-format
+msgid "Once you have your <classname>ConstraintMapping</classname> you will have to pass it to the configuration. Since the programmatic configuration is not part of the official Bean Validation specification you will have to get hold of the Hibernate Validator specific configuration instance. See <xref linkend=\"example-hibernate-specific-config\"/>."
+msgstr ""
+
+#. Tag: title
+#: programmaticapi.xml:88
+#, no-c-format
+msgid "Creating a Hibernate Validator specific configuration"
+msgstr ""
+
+#. Tag: programlisting
+#: programmaticapi.xml:90
+#, no-c-format
+msgid ""
+      "ConstraintMapping mapping = new ConstraintMapping();\n"
+      "// configure mapping instance\n"
+      "\n"
+      "HibernateValidatorConfiguration config = Validation.byProvider( HibernateValidator.class ).configure();\n"
+      "config.addMapping( mapping );\n"
+      "ValidatorFactory factory = config.buildValidatorFactory();\n"
+      "Validator validator = factory.getValidator();"
+msgstr ""
+

Added: validator/trunk/hibernate-validator/src/main/docbook/pot/modules/usingvalidator.pot
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/pot/modules/usingvalidator.pot	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/pot/modules/usingvalidator.pot	2010-07-06 15:18:26 UTC (rev 19904)
@@ -0,0 +1,1593 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-07-06 14:46+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: usingvalidator.xml:25
+#, no-c-format
+msgid "Validation step by step"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:27
+#, no-c-format
+msgid "In this chapter we will see in more detail how to use Hibernate Validator to validate constraints for a given entity model. We will also learn which default constraints the Bean Validation specification provides and which additional constraints are only provided by Hibernate Validator. Let's start with how to add constraints to an entity."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:34
+#, no-c-format
+msgid "Defining constraints"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:36
+#, no-c-format
+msgid "Constraints in Bean Validation are expressed via Java annotations. In this section we show how to annotate an object model with these annotations. We have to differentiate between three different type of constraint annotations - field-, property-, and class-level annotations."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:43
+#, no-c-format
+msgid "Not all constraints can be placed on all of these levels. In fact, none of the default constraints defined by Bean Validation can be placed at class level. The <classname>java.lang.annotation.Target</classname> annotation in the constraint annotation itself determines on which elements a constraint can be placed. See <xref linkend=\"validator-customconstraints\"/> for more information."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:52
+#, no-c-format
+msgid "Field-level constraints"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:54
+#, no-c-format
+msgid "Constraints can be expressed by annotating a field of a class. <xref linkend=\"example-field-level\"/> shows a field level configuration example:"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:59
+#, no-c-format
+msgid "Field level constraint"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:61
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import javax.validation.constraints.NotNull;\n"
+      "\n"
+      "public class Car {\n"
+      "\n"
+      "    @NotNull\n"
+      "    private String manufacturer;\n"
+      "\n"
+      "    @AssertTrue\n"
+      "    private boolean isRegistered;\n"
+      "\n"
+      "    public Car(String manufacturer, boolean isRegistered) {\n"
+      "        super();\n"
+      "        this.manufacturer = manufacturer;\n"
+      "        this.isRegistered = isRegistered;\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:64
+#, no-c-format
+msgid "When using field level constraints field access strategy is used to access the value to be validated. This means the bean validation provider directly accesses the instance variable and does not invoke the property accessor method also if such a method exists."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:70
+#, no-c-format
+msgid "The access type (private, protected or public) does not matter."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:75
+#, no-c-format
+msgid "Static fields and properties cannot be validated."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:80
+#, no-c-format
+msgid "Property-level constraints"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:82
+#, no-c-format
+msgid "If your model class adheres to the <ulink type=\"\" url=\"http://java.sun.com/javase/technologies/desktop/javabeans/index.jsp\">JavaBeans</ulink> standard, it is also possible to annotate the properties of a bean class instead of its fields. <xref linkend=\"example-property-level\"/> uses the same entity as in <xref linkend=\"example-field-level\"/>, however, property level constraints are used."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:88
+#, no-c-format
+msgid "The property's getter method has to be annotated, not its setter."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:93
+#, no-c-format
+msgid "Property level constraint"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:95
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import javax.validation.constraints.AssertTrue;\n"
+      "import javax.validation.constraints.NotNull;\n"
+      "\n"
+      "public class Car {\n"
+      "\n"
+      "    private String manufacturer;\n"
+      "\n"
+      "    private boolean isRegistered;\n"
+      "      \n"
+      "    public Car(String manufacturer, boolean isRegistered) {\n"
+      "        super();\n"
+      "        this.manufacturer = manufacturer;\n"
+      "        this.isRegistered = isRegistered;\n"
+      "    }\n"
+      "\n"
+      "    @NotNull\n"
+      "    public String getManufacturer() {\n"
+      "        return manufacturer;\n"
+      "    }\n"
+      "\n"
+      "    public void setManufacturer(String manufacturer) {\n"
+      "        this.manufacturer = manufacturer;\n"
+      "    }\n"
+      "\n"
+      "    @AssertTrue\n"
+      "    public boolean isRegistered() {\n"
+      "        return isRegistered;\n"
+      "    }\n"
+      "\n"
+      "    public void setRegistered(boolean isRegistered) {\n"
+      "        this.isRegistered = isRegistered;\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:98
+#, no-c-format
+msgid "When using property level constraints property access strategy is used to access the value to be validated. This means the bean validation provider accesses the state via the property accessor method."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:103
+#, no-c-format
+msgid "It is recommended to stick either to field <emphasis>or</emphasis> property annotation within one class. It is not recommended to annotate a field <emphasis>and</emphasis> the accompanying getter method as this would cause the field to be validated twice."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:112
+#, no-c-format
+msgid "Class-level constraints"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:115
+#, no-c-format
+msgid "Last but not least, a constraint can also be placed on class level. When a constraint annotation is placed on this level the class instance itself passed to the <classname>ConstraintValidator</classname>. Class level constraints are useful if it is necessary to inspect more than a single property of the class to validate it or if a correlation between different state variables has to be evaluated. In <xref linkend=\"example-class-level\"/> we add the property <property>passengers</property> to the class <classname>Car</classname>. We also add the constraint <classname>PassengerCount</classname> on the class level. We will later see how we can actually create this custom constraint (see <xref linkend=\"validator-customconstraints\"/>). For now we it is enough to know that <classname>PassengerCount</classname> will ensure that there cannot be more passengers in a car than there are seats."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:131
+#, no-c-format
+msgid "Class level constraint"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:133
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import javax.validation.constraints.Min;\n"
+      "import javax.validation.constraints.NotNull;\n"
+      "import javax.validation.constraints.Size;\n"
+      "\n"
+      "@PassengerCount\n"
+      "public class Car {\n"
+      "\n"
+      "    @NotNull\n"
+      "    private String manufacturer;\n"
+      "\n"
+      "    @NotNull\n"
+      "    @Size(min = 2, max = 14)\n"
+      "    private String licensePlate;\n"
+      "\n"
+      "    @Min(2)\n"
+      "    private int seatCount;\n"
+      "    \n"
+      "    private List&lt;Person&gt; passengers;\n"
+      "    \n"
+      "    public Car(String manufacturer, String licencePlate, int seatCount) {\n"
+      "        this.manufacturer = manufacturer;\n"
+      "        this.licensePlate = licencePlate;\n"
+      "        this.seatCount = seatCount;\n"
+      "    }\n"
+      "\n"
+      "    //getters and setters ...\n"
+      "}"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:138
+#, no-c-format
+msgid "Constraint inheritance"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:140
+#, no-c-format
+msgid "When validating an object that implements an interface or extends another class, all constraint annotations on the implemented interface and parent class apply in the same manner as the constraints specified on the validated object itself. To make things clearer let's have a look at the following example:"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:147
+#, no-c-format
+msgid "Constraint inheritance using RentalCar"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:149
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import javax.validation.constraints.NotNull;\n"
+      "\n"
+      "public class RentalCar extends Car {\n"
+      "\n"
+      "    private String rentalStation;\n"
+      "    \n"
+      "    public RentalCar(String manufacturer, String rentalStation) {\n"
+      "        super(manufacturer);\n"
+      "        this.rentalStation = rentalStation;\n"
+      "    }\n"
+      "    \n"
+      "    @NotNull\n"
+      "    public String getRentalStation() {\n"
+      "        return rentalStation;\n"
+      "    }\n"
+      "\n"
+      "    public void setRentalStation(String rentalStation) {\n"
+      "        this.rentalStation = rentalStation;\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:152
+#, no-c-format
+msgid "Our well-known class <classname>Car</classname> is now extended by <classname>RentalCar</classname> with the additional property <property>rentalStation</property>. If an instance of <classname>RentalCar</classname> is validated, not only the <classname>@NotNull</classname> constraint on <property>rentalStation</property> is validated, but also the constraint on <property>manufacturer</property> from the parent class."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:160
+#, no-c-format
+msgid "The same would hold true, if <classname>Car</classname> were an interface implemented by <classname>RentalCar</classname>."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:163
+#, no-c-format
+msgid "Constraint annotations are aggregated if methods are overridden. If <classname>RentalCar</classname> would override the <methodname>getManufacturer()</methodname> method from <classname>Car</classname> any constraints annotated at the overriding method would be evaluated in addition to the <classname>@NotNull</classname> constraint from the super-class."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:172
+#, no-c-format
+msgid "Object graphs"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:174
+#, no-c-format
+msgid "The Bean Validation API does not only allow to validate single class instances but also complete object graphs. To do so, just annotate a field or property representing a reference to another object with <classname>@Valid</classname>. If the parent object is validated, all referenced objects annotated with <classname>@Valid</classname> will be validated as well (as will be their children etc.). See <xref linkend=\"example-car-with-driver\"/>."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:183
+#, no-c-format
+msgid "Class Person"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:185
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import javax.validation.constraints.NotNull;\n"
+      "\n"
+      "public class Person {\n"
+      "\n"
+      "    @NotNull\n"
+      "    private String name;\n"
+      "    \n"
+      "    public Person(String name) {\n"
+      "        super();\n"
+      "        this.name = name;\n"
+      "    }\n"
+      "\n"
+      "    public String getName() {\n"
+      "        return name;\n"
+      "    }\n"
+      "\n"
+      "    public void setName(String name) {\n"
+      "        this.name = name;\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:189
+#, no-c-format
+msgid "Adding a driver to the car"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:191
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import javax.validation.Valid;\n"
+      "import javax.validation.constraints.NotNull;\n"
+      "\n"
+      "public class Car {\n"
+      "\n"
+      "    @NotNull\n"
+      "    @Valid\n"
+      "    private Person driver;\n"
+      "    \n"
+      "    public Car(Person driver) {\n"
+      "        this.driver = driver;\n"
+      "    }\n"
+      "\n"
+      "    //getters and setters ...\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:194
+#, no-c-format
+msgid "If an instance of <classname>Car</classname> is validated, the referenced <classname>Person</classname> object will be validated as well, as the <property>driver</property> field is annotated with <classname>@Valid</classname>. Therefore the validation of a <classname>Car</classname> will fail if the <property>name</property> field of the referenced <classname>Person</classname> instance is <code>null</code>."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:202
+#, no-c-format
+msgid "Object graph validation also works for collection-typed fields. That means any attributes that"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:207
+#, no-c-format
+msgid "are arrays"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:211
+#, no-c-format
+msgid "implement <classname>java.lang.Iterable</classname> (especially <classname>Collection</classname>, <classname>List</classname> and <classname>Set</classname>)"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:217
+#, no-c-format
+msgid "implement <classname>java.util.Map</classname>"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:221
+#, no-c-format
+msgid "can be annotated with <classname>@Valid</classname>, which will cause each contained element to be validated, when the parent object is validated."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:226
+#, no-c-format
+msgid "Car with a list of passengers"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:228
+#, no-c-format
+msgid ""
+      "package com.mycompany;\n"
+      "\n"
+      "import java.util.ArrayList;\n"
+      "import java.util.List;\n"
+      "\n"
+      "import javax.validation.Valid;\n"
+      "import javax.validation.constraints.NotNull;\n"
+      "\n"
+      "public class Car {\n"
+      "\n"
+      "    @NotNull\n"
+      "    @Valid\n"
+      "    private List&lt;Person&gt; passengers = new ArrayList&lt;Person&gt;();\n"
+      "\n"
+      "    public Car(List&lt;Person&gt; passengers) {\n"
+      "        this.passengers = passengers;\n"
+      "    }\n"
+      "\n"
+      "    //getters and setters ...\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:231
+#, no-c-format
+msgid "If a <classname>Car</classname> instance is validated, a <classname>ConstraintValidation</classname> will be created, if any of the <classname>Person</classname> objects contained in the <property>passengers</property> list has a <code>null</code> name."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:235
+#, no-c-format
+msgid "<classname>null</classname> values are getting ignored when validating object graphs."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:242
+#, no-c-format
+msgid "Validating constraints"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:244
+#, no-c-format
+msgid "The <classname>Validator</classname> interface is the main entry point to Bean Validation. In <xref linkend=\"section-validator-instance\"/> we will first show how to obtain an <classname>Validator</classname> instance. Afterwards we will learn how to use the different methods of the <classname>Validator</classname> interface."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:251
+#, no-c-format
+msgid "Obtaining a <classname>Validator</classname> instance"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:253
+#, no-c-format
+msgid "The first step towards validating an entity instance is to get hold of a <classname>Validator</classname> instance. The road to this instance leads via the <classname>Validation</classname> class and a <classname>ValidatorFactory</classname>. The easiest way is to use the static <methodname>Validation.buildDefaultValidatorFactory()</methodname> method:"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:262
+#, no-c-format
+msgid "Validation.buildDefaultValidatorFactory()"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:264
+#, no-c-format
+msgid ""
+      "ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
+      "Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:267
+#, no-c-format
+msgid "For other ways of obtaining a Validator instance see <xref linkend=\"validator-bootstrapping\"/>. For now we just want to see how we can use the <classname>Validator</classname> instance to validate entity instances."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:274
+#, no-c-format
+msgid "Validator methods"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:276
+#, no-c-format
+msgid "The <classname>Validator</classname> interface contains three methods that can be used to either validate entire entities or just a single properties of the entity."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:280
+#, no-c-format
+msgid "All three methods return a <classname>Set&lt;ConstraintViolation&gt;</classname>. The set is empty, if the validation succeeds. Otherwise a <classname>ConstraintViolation</classname> instance is added for each violated constraint."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:286
+#, no-c-format
+msgid "All the validation methods have a var-args parameter which can be used to specify, which validation groups shall be considered when performing the validation. If the parameter is not specified the default validation group (<classname>javax.validation.groups.Default</classname>) will be used. We will go into more detail on the topic of validation groups in"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:295
+#, no-c-format
+msgid "validate"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:297
+#, no-c-format
+msgid "Use the <methodname>validate()</methodname> method to perform validation of all constraints of a given entity instance (see <xref linkend=\"example-validator-validate\"/> )."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:302
+#, no-c-format
+msgid "Usage of <methodname>Validator.validate()</methodname>"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:305
+#, no-c-format
+msgid ""
+      "ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
+      "Validator validator = factory.getValidator();\n"
+      "\n"
+      "Car car = new Car(null);\n"
+      "\n"
+      "Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations = validator.validate(car);\n"
+      "\n"
+      "assertEquals(1, constraintViolations.size());\n"
+      "assertEquals(\"may not be null\", constraintViolations.iterator().next().getMessage());"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:310
+#, no-c-format
+msgid "validateProperty"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:312
+#, no-c-format
+msgid "With help of the <methodname>validateProperty()</methodname> a single named property of a given object can be validated. The property name is the JavaBeans property name."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:317
+#, no-c-format
+msgid "Usage of <methodname>Validator.validateProperty()</methodname>"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:320
+#, no-c-format
+msgid ""
+      "Validator validator = Validation.buildDefaultValidatorFactory().getValidator();\n"
+      "\n"
+      "Car car = new Car(null);\n"
+      "\n"
+      "Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations = validator.validateProperty(car, \"manufacturer\");\n"
+      "\n"
+      "assertEquals(1, constraintViolations.size());\n"
+      "assertEquals(\"may not be null\", constraintViolations.iterator().next().getMessage());"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:323
+#, no-c-format
+msgid "<methodname>Validator.validateProperty</methodname> is for example used in the integration of Bean Validation into JSF 2 (see <xref linkend=\"section-presentation-layer\"/>)."
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:329
+#, no-c-format
+msgid "validateValue"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:331
+#, no-c-format
+msgid "Using the <methodname>validateValue() </methodname>method you can check, whether a single property of a given class can be validated successfully, if the property had the specified value:"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:336
+#, no-c-format
+msgid "Usage of <methodname>Validator.validateValue()</methodname>"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:339
+#, no-c-format
+msgid ""
+      "Validator validator = Validation.buildDefaultValidatorFactory().getValidator();\n"
+      "\n"
+      "Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations = validator.validateValue(Car.class, \"manufacturer\", null);\n"
+      "\n"
+      "assertEquals(1, constraintViolations.size());\n"
+      "assertEquals(\"may not be null\", constraintViolations.iterator().next().getMessage());"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:343
+#, no-c-format
+msgid "<classname>@Valid</classname> is not honored by <methodname>validateProperty()</methodname> or <methodname>validateValue()</methodname>."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:351
+#, no-c-format
+msgid "<classname>ConstraintViolation</classname> methods"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:353
+#, no-c-format
+msgid "Now it is time to have a closer look at what a <classname>ConstraintViolation</classname>. Using the different methods of <classname>ConstraintViolation</classname> a lot of useful information about the cause of the validation failure can be determined. <xref linkend=\"table-constraint-violation\"/> gives an overview of these methods:"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:361
+#, no-c-format
+msgid "The various <classname>ConstraintViolation</classname> methods"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:367
+#, no-c-format
+msgid "Method"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:369
+#, no-c-format
+msgid "Usage"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:371
+#, no-c-format
+msgid "Example (referring to <xref linkend=\"example-validator-validate\"/>)"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:378
+#, no-c-format
+msgid "getMessage()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:380
+#, no-c-format
+msgid "The interpolated error message."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:382
+#, no-c-format
+msgid "may not be null"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:386
+#, no-c-format
+msgid "getMessageTemplate()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:388
+#, no-c-format
+msgid "The non-interpolated error message."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:390
+#, no-c-format
+msgid "{javax.validation.constraints.NotNull.message}"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:394
+#, no-c-format
+msgid "getRootBean()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:396
+#, no-c-format
+msgid "The root bean being validated."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:398 usingvalidator.xml:416
+#, no-c-format
+msgid "<entry>car</entry>"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:402
+#, no-c-format
+msgid "getRootBeanClass()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:404
+#, no-c-format
+msgid "The class of the root bean being validated."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:406
+#, no-c-format
+msgid "Car.class"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:410
+#, no-c-format
+msgid "getLeafBean()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:412
+#, no-c-format
+msgid "If a bean constraint, the bean instance the constraint is applied on. If a property constraint, the bean instance hosting the property the constraint is applied on."
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:420
+#, no-c-format
+msgid "getPropertyPath()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:422
+#, no-c-format
+msgid "The property path to the value from root bean."
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:428
+#, no-c-format
+msgid "getInvalidValue()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:430
+#, no-c-format
+msgid "The value failing to pass the constraint."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:432
+#, no-c-format
+msgid "passengers"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:436
+#, no-c-format
+msgid "getConstraintDescriptor()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:438
+#, no-c-format
+msgid "Constraint metadata reported to fail."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:448
+#, no-c-format
+msgid "Message interpolation"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:450
+#, no-c-format
+msgid "As we will see in <xref linkend=\"validator-customconstraints\"/> each constraint definition must define a default message descriptor. This message can be overridden at declaration time using the <methodname>message</methodname> attribute of the constraint. You can see this in <xref linkend=\"example-driver\"/>. This message descriptors get interpolated when a constraint validation fails using the configured <classname>MessageInterpolator</classname>. The interpolator will try to resolve any message parameters, meaning string literals enclosed in braces. In order to resolve these parameters Hibernate Validator's default <classname>MessageInterpolator</classname> first recursively resolves parameters against a custom <classname>ResourceBundle</classname> called <filename>ValidationMessages.properties</filename> at the root of the classpath (It is up to you to create this file). If no further replacements are possible against the custom bundle the default <classname>Re!
 sourceBundle</classname> under <filename>/org/hibernate/validator/ValidationMessages.properties</filename> gets evaluated. If a replacement occurs against the default bundle the algorithm looks again at the custom bundle (and so on). Once no further replacements against these two resource bundles are possible remaining parameters are getting resolved against the attributes of the constraint to be validated."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:473
+#, no-c-format
+msgid "Since the braces { and } have special meaning in the messages they need to be escaped if they are used literally. The following The following rules apply:"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:477
+#, no-c-format
+msgid "\\{ is considered as the literal {"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:481
+#, no-c-format
+msgid "\\} is considered as the literal }"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:485
+#, no-c-format
+msgid "\\\\ is considered as the literal \\"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:489
+#, no-c-format
+msgid "If the default message interpolator does not fit your requirements it is possible to plug a custom <classname>MessageInterpolator</classname> when the <classname>ValidatorFactory</classname> gets created. This can be seen in <xref linkend=\"validator-bootstrapping\"/>."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:498
+#, no-c-format
+msgid "Validating groups"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:500
+#, no-c-format
+msgid "Groups allow you to restrict the set of constraints applied during validation. This makes for example wizard like validation possible where in each step only a specified subset of constraints get validated. The groups targeted are passed as var-args parameters to <methodname>validate</methodname>, <methodname>validateProperty</methodname> and <methodname>validateValue</methodname>. Let's have a look at an extended <classname>Car</classname> with <classname>Driver</classname> example. First we have the class <classname>Person</classname> (<xref linkend=\"example-person\"/>) which has a <classname>@NotNull </classname>constraint on <property>name</property>. Since no group is specified for this annotation its default group is <classname>javax.validation.groups.Default</classname>."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:515
+#, no-c-format
+msgid "When more than one group is requested, the order in which the groups are evaluated is not deterministic. If no group is specified the default group <classname>javax.validation.groups.Default</classname> is assumed."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:522
+#, no-c-format
+msgid "Person"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:524
+#, no-c-format
+msgid ""
+      "public class Person {\n"
+      "    @NotNull\n"
+      "    private String name;\n"
+      "\n"
+      "    public Person(String name) {\n"
+      "        this.name = name;\n"
+      "    }\n"
+      "    // getters and setters ...\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:527
+#, no-c-format
+msgid "Next we have the class <classname>Driver</classname> (<xref linkend=\"example-driver\"/>) extending <classname>Person</classname>. Here we are adding the properties <property>age</property> and <property>hasDrivingLicense</property>. In order to drive you must be at least 18 (<classname>@Min(18)</classname>) and you must have a driving license (<classname>@AssertTrue</classname>). Both constraints defined on these properties belong to the group <classname>DriverChecks</classname>. As you can see in <xref linkend=\"example-group-interfaces\"/> the group <classname>DriverChecks</classname> is just a simple tagging interface. Using interfaces makes the usage of groups type safe and allows for easy refactoring. It also means that groups can inherit from each other via class inheritance."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:541
+#, no-c-format
+msgid "The Bean Validation specification does not enforce that groups have to be interfaces. Non interface classes could be used as well, but we recommend to stick to interfaces."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:547
+#, no-c-format
+msgid "Driver"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:549
+#, no-c-format
+msgid ""
+      "public class Driver extends Person {\n"
+      "    @Min(value = 18, message = \"You have to be 18 to drive a car\", groups = DriverChecks.class)\n"
+      "    public int age;\n"
+      "\n"
+      "    @AssertTrue(message = \"You first have to pass the driving test\", groups = DriverChecks.class)\n"
+      "    public boolean hasDrivingLicense;\n"
+      "\n"
+      "    public Driver(String name) {\n"
+      "        super( name );\n"
+      "    }\n"
+      "\n"
+      "    public void passedDrivingTest(boolean b) {\n"
+      "        hasDrivingLicense = b;\n"
+      "    }\n"
+      "\n"
+      "    public int getAge() {\n"
+      "        return age;\n"
+      "    }\n"
+      "\n"
+      "    public void setAge(int age) {\n"
+      "        this.age = age;\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:553
+#, no-c-format
+msgid "Group interfaces"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:555
+#, no-c-format
+msgid ""
+      "public interface DriverChecks {\n"
+      "}\n"
+      "\n"
+      "public interface CarChecks {\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:558
+#, no-c-format
+msgid "Last but not least we add the property <property>passedVehicleInspection</property> to the <classname>Car</classname> class (<xref linkend=\"example-car\"/>) indicating whether a car passed the road worthy tests."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:564
+#, no-c-format
+msgid "<title>Car</title>"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:566
+#, no-c-format
+msgid ""
+      "public class Car {\n"
+      "    @NotNull\n"
+      "    private String manufacturer;\n"
+      "\n"
+      "    @NotNull\n"
+      "    @Size(min = 2, max = 14)\n"
+      "    private String licensePlate;\n"
+      "\n"
+      "    @Min(2)\n"
+      "    private int seatCount;\n"
+      "\n"
+      "    @AssertTrue(message = \"The car has to pass the vehicle inspection first\", groups = CarChecks.class)\n"
+      "    private boolean passedVehicleInspection;\n"
+      "\n"
+      "    @Valid\n"
+      "    private Driver driver;\n"
+      "\n"
+      "    public Car(String manufacturer, String licencePlate, int seatCount) {\n"
+      "        this.manufacturer = manufacturer;\n"
+      "        this.licensePlate = licencePlate;\n"
+      "        this.seatCount = seatCount;\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:569
+#, no-c-format
+msgid "Overall three different groups are used in our example. <property>Person.name</property>, <property>Car.manufacturer</property>, <property>Car.licensePlate</property> and <property>Car.seatCount</property> all belong to the <classname>Default</classname> group. <property>Driver.age</property> and <property>Driver.hasDrivingLicense</property> belong to <classname>DriverChecks</classname> and last but not least <property>Car.passedVehicleInspection</property> belongs to the group <classname>CarChecks</classname>. <xref linkend=\"example-drive-away\"/> shows how passing different group combinations to the <methodname>Validator.validate</methodname> method result in different validation results."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:583
+#, no-c-format
+msgid "Drive away"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:585
+#, no-c-format
+msgid ""
+      "public class GroupTest {\n"
+      "\n"
+      "    private static Validator validator;\n"
+      "\n"
+      "    @BeforeClass\n"
+      "    public static void setUp() {\n"
+      "        ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
+      "        validator = factory.getValidator();\n"
+      "    }\n"
+      "\n"
+      "    @Test\n"
+      "    public void driveAway() {\n"
+      "        // create a car and check that everything is ok with it.\n"
+      "        Car car = new Car( \"Morris\", \"DD-AB-123\", 2 );\n"
+      "        Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations = validator.validate( car );\n"
+      "        assertEquals( 0, constraintViolations.size() );\n"
+      "\n"
+      "        // but has it passed the vehicle inspection?\n"
+      "        constraintViolations = validator.validate( car, CarChecks.class );\n"
+      "        assertEquals( 1, constraintViolations.size() );\n"
+      "        assertEquals(\"The car has to pass the vehicle inspection first\", constraintViolations.iterator().next().getMessage());\n"
+      "\n"
+      "        // let's go to the vehicle inspection\n"
+      "        car.setPassedVehicleInspection( true );\n"
+      "        assertEquals( 0, validator.validate( car ).size() );\n"
+      "\n"
+      "        // now let's add a driver. He is 18, but has not passed the driving test yet\n"
+      "        Driver john = new Driver( \"John Doe\" );\n"
+      "        john.setAge( 18 );\n"
+      "        car.setDriver( john );\n"
+      "        constraintViolations = validator.validate( car, DriverChecks.class );\n"
+      "        assertEquals( 1, constraintViolations.size() );\n"
+      "        assertEquals( \"You first have to pass the driving test\", constraintViolations.iterator().next().getMessage() );\n"
+      "\n"
+      "        // ok, John passes the test\n"
+      "        john.passedDrivingTest( true );\n"
+      "        assertEquals( 0, validator.validate( car, DriverChecks.class ).size() );\n"
+      "\n"
+      "        // just checking that everything is in order now\n"
+      "        assertEquals( 0, validator.validate( car, Default.class, CarChecks.class, DriverChecks.class ).size() );\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:588
+#, no-c-format
+msgid "First we create a car and validate it using no explicit group. There are no validation errors, even though the property <property>passedVehicleInspection</property> is per default <constant>false</constant>. However, the constraint defined on this property does not belong to the default group. Next we just validate the <classname>CarChecks</classname> group which will fail until we make sure that the car passes the vehicle inspection. When we then add a driver to the car and validate against <classname>DriverChecks</classname> we get again a constraint violation due to the fact that the driver has not yet passed the driving test. Only after setting <property>passedDrivingTest</property> to true the validation against <classname>DriverChecks</classname> will pass."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:601
+#, no-c-format
+msgid "Last but not least, we show that all constraints are passing by validating against all defined groups."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:605
+#, no-c-format
+msgid "Group sequences"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:607
+#, no-c-format
+msgid "By default, constraints are evaluated in no particular order and this regardless of which groups they belong to. In some situations, however, it is useful to control the order of the constraints evaluation. In our example from <xref linkend=\"validator-usingvalidator-validationgroups\"/> we could for example require that first all default car constraints are passing before we check the road worthiness of the car. Finally before we drive away we check the actual driver constraints. In order to implement such an order one would define a new interface and annotate it with <classname>@GroupSequence</classname> defining the order in which the groups have to be validated."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:620
+#, no-c-format
+msgid "If at least one constraints fails in a sequenced group none of the constraints of the following groups in the sequence get validated."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:626
+#, no-c-format
+msgid "Interface with @GroupSequence"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:628
+#, no-c-format
+msgid ""
+      "@GroupSequence({Default.class, CarChecks.class, DriverChecks.class})\n"
+      "public interface OrderedChecks {\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:632
+#, no-c-format
+msgid "Groups defining a sequence and groups composing a sequence must not be involved in a cyclic dependency either directly or indirectly, either through cascaded sequence definition or group inheritance. If a group containing such a circularity is evaluated, a <classname>GroupDefinitionException</classname> is raised."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:636
+#, no-c-format
+msgid "The usage of the new sequence could then look like in <xref linkend=\"example-group-sequence\"/>."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:641
+#, no-c-format
+msgid "Usage of a group sequence"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:643
+#, no-c-format
+msgid ""
+      "@Test\n"
+      "public void testOrderedChecks() {\n"
+      "    Car car = new Car( \"Morris\", \"DD-AB-123\", 2 );\n"
+      "    car.setPassedVehicleInspection( true );\n"
+      "\n"
+      "    Driver john = new Driver( \"John Doe\" );\n"
+      "    john.setAge( 18 );\n"
+      "    john.passedDrivingTest( true );\n"
+      "    car.setDriver( john );\n"
+      "\n"
+      "    assertEquals( 0, validator.validate( car, OrderedChecks.class ).size() );\n"
+      "}"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:648
+#, no-c-format
+msgid "Redefining the default group sequence of a class"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:650
+#, no-c-format
+msgid "The @GroupSequence annotation also fulfills a second purpose. It allows you to redefine what the Default group means for a given class. To redefine <classname>Default</classname> for a class, place a <classname>@GroupSequence</classname> annotation on the class. The defined groups in the annotation express the sequence of groups that substitute <classname>Default</classname> for this class. <xref linkend=\"example-rental-car\"/> introduces a new class RentalCar with a redfined default group. With this definition the check for all three groups can be rewritten as seen in <xref linkend=\"example-testOrderedChecksWithRedefinedDefault\"/>."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:662
+#, no-c-format
+msgid "RentalCar"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:664
+#, no-c-format
+msgid ""
+      "@GroupSequence({ RentalCar.class, CarChecks.class })\n"
+      "public class RentalCar extends Car {\n"
+      "    public RentalCar(String manufacturer, String licencePlate, int seatCount) {\n"
+      "        super( manufacturer, licencePlate, seatCount );\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:668
+#, no-c-format
+msgid "testOrderedChecksWithRedefinedDefault"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:670
+#, no-c-format
+msgid ""
+      "@Test\n"
+      "public void testOrderedChecksWithRedefinedDefault() {\n"
+      "    RentalCar rentalCar = new RentalCar( \"Morris\", \"DD-AB-123\", 2 );\n"
+      "    rentalCar.setPassedVehicleInspection( true );\n"
+      "\n"
+      "    Driver john = new Driver( \"John Doe\" );\n"
+      "    john.setAge( 18 );\n"
+      "    john.passedDrivingTest( true );\n"
+      "    rentalCar.setDriver( john );\n"
+      "\n"
+      "    assertEquals( 0, validator.validate( rentalCar, Default.class, DriverChecks.class ).size() );\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:674
+#, no-c-format
+msgid "Due to the fact that there cannot be a cyclic dependency in the group and group sequence definitions one cannot just add <classname>Default</classname> to the sequence redefining <classname>Default</classname> for a class. Instead the class itself should be added!"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:684 usingvalidator.xml:692
+#, no-c-format
+msgid "Built-in constraints"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:686
+#, no-c-format
+msgid "Hibernate Validator implements all of the default constraints specified in Bean Validation as well as some custom ones. <xref linkend=\"table-builtin-constraints\"/> list all constraints available in Hibernate Validator."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:699
+#, no-c-format
+msgid "Annotation"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:701
+#, no-c-format
+msgid "Part of Bean Validation Specification"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:703
+#, no-c-format
+msgid "Apply on"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:705
+#, no-c-format
+msgid "<entry>Use</entry>"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:707
+#, no-c-format
+msgid "Hibernate Metadata impact"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:713
+#, no-c-format
+msgid "@AssertFalse"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:715 usingvalidator.xml:728 usingvalidator.xml:758 usingvalidator.xml:778 usingvalidator.xml:798 usingvalidator.xml:830 usingvalidator.xml:858 usingvalidator.xml:876 usingvalidator.xml:894 usingvalidator.xml:936 usingvalidator.xml:949 usingvalidator.xml:963 usingvalidator.xml:995 usingvalidator.xml:1049
+#, no-c-format
+msgid "<entry>yes</entry>"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:717 usingvalidator.xml:730 usingvalidator.xml:896 usingvalidator.xml:909 usingvalidator.xml:938
+#, no-c-format
+msgid "field/property"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:719
+#, no-c-format
+msgid "Check that the annotated element is <constant>false</constant>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:722 usingvalidator.xml:735 usingvalidator.xml:752 usingvalidator.xml:772 usingvalidator.xml:792 usingvalidator.xml:824 usingvalidator.xml:838 usingvalidator.xml:916 usingvalidator.xml:930 usingvalidator.xml:943 usingvalidator.xml:957 usingvalidator.xml:971 usingvalidator.xml:989 usingvalidator.xml:1026 usingvalidator.xml:1043 usingvalidator.xml:1059
+#, no-c-format
+msgid "none"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:726
+#, no-c-format
+msgid "@AssertTrue"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:732
+#, no-c-format
+msgid "Check that the annotated element is <constant>true</constant>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:739
+#, no-c-format
+msgid "@CreditCardNumber"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:741 usingvalidator.xml:817 usingvalidator.xml:844 usingvalidator.xml:907 usingvalidator.xml:922 usingvalidator.xml:977 usingvalidator.xml:1011 usingvalidator.xml:1032
+#, no-c-format
+msgid "<entry>no</entry>"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:743 usingvalidator.xml:1034
+#, no-c-format
+msgid "field/property. The supported type is <classname>String</classname>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:746
+#, no-c-format
+msgid "Check that the annotated string passes the Luhn checksum test. Note, this validation aims to check for user mistake, not credit card validity! See also <ulink url=\"http://www.merriampark.com/anatomycc.htm\">Anatomy of Credit Card Numbers</ulink>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:756
+#, no-c-format
+msgid "@DecimalMax"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:760 usingvalidator.xml:780 usingvalidator.xml:800 usingvalidator.xml:860 usingvalidator.xml:878 usingvalidator.xml:979
+#, no-c-format
+msgid "field/property. Supported types are <classname>BigDecimal</classname>, <classname>BigInteger</classname>, <classname>String</classname>, <classname>byte</classname>, <classname>short</classname>, <classname>int</classname>, <classname>long</classname> and the respective wrappers of the primitive types."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:767
+#, no-c-format
+msgid "The annotated element must be a number whose value must be lower or equal to the specified maximum. The parameter value is the string representation of the max value according to the <classname>BigDecimal</classname> string representation."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:776
+#, no-c-format
+msgid "@DecimalMin"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:787
+#, no-c-format
+msgid "The annotated element must be a number whose value must be higher or equal to the specified minimum. The parameter value is the string representation of the min value according to the <classname>BigDecimal</classname> string representation."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:796
+#, no-c-format
+msgid "@Digits(integer=, fraction=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:807
+#, no-c-format
+msgid "Check whether the property is a number having up to <literal>integer</literal> digits and <literal>fraction</literal> fractional digits."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:811
+#, no-c-format
+msgid "Define column precision and scale."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:815
+#, no-c-format
+msgid "@Email"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:819 usingvalidator.xml:846 usingvalidator.xml:965
+#, no-c-format
+msgid "field/property. Needs to be a string."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:821
+#, no-c-format
+msgid "Check whether the specified string is a valid email address."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:828
+#, no-c-format
+msgid "@Future"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:832 usingvalidator.xml:951
+#, no-c-format
+msgid "field/property. Supported types are <classname>java.util.Date</classname> and <classname>java.util.Calendar</classname>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:836
+#, no-c-format
+msgid "Checks whether the annotated date is in the future."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:842
+#, no-c-format
+msgid "@Length(min=, max=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:848
+#, no-c-format
+msgid "Validate that the annotated string is between <parameter>min</parameter> and <parameter>max</parameter> included."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:852 usingvalidator.xml:1005
+#, no-c-format
+msgid "Column length will be set to max."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:856
+#, no-c-format
+msgid "@Max"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:867
+#, no-c-format
+msgid "Checks whether the annotated value is less than or equal to the specified maximum."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:870 usingvalidator.xml:888
+#, no-c-format
+msgid "Add a check constraint on the column."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:874
+#, no-c-format
+msgid "@Min"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:885
+#, no-c-format
+msgid "Checks whether the annotated value is higher than or equal to the specified minimum."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:892
+#, no-c-format
+msgid "@NotNull"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:898
+#, no-c-format
+msgid "Check that the annotated value is not <constant>null.</constant>"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:901
+#, no-c-format
+msgid "Column(s) are not null."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:905
+#, no-c-format
+msgid "@NotBlank"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:911
+#, no-c-format
+msgid "Check that the annotated string is not null and the trimmed length is greater than 0. The difference to @NotEmpty is that this constraint can only be applied on strings and that trailing whitespaces are ignored."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:920
+#, no-c-format
+msgid "@NotEmpty"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:924
+#, no-c-format
+msgid "field/property. Supported types are String, Collection, Map and arrays."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:927
+#, no-c-format
+msgid "Check whether the annotated element is not <constant>null</constant> nor empty."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:934
+#, no-c-format
+msgid "@Null"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:940
+#, no-c-format
+msgid "Check that the annotated value is <constant>null.</constant>"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:947
+#, no-c-format
+msgid "@Past"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:955
+#, no-c-format
+msgid "Checks whether the annotated date is in the past."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:961
+#, no-c-format
+msgid "@Pattern(regex=, flag=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:967
+#, no-c-format
+msgid "Checks if the annotated string matches the regular expression <parameter>regex</parameter> considering the given flag <parameter>match</parameter>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:975
+#, no-c-format
+msgid "@Range(min=, max=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:986
+#, no-c-format
+msgid "Check whether the annotated value lies between (inclusive) the specified minimum and maximum."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:993
+#, no-c-format
+msgid "@Size(min=, max=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:997
+#, no-c-format
+msgid "field/property. Supported types are <classname>String</classname>, <classname>Collection</classname>, <classname>Map</classname> and <classname>arrays</classname>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1002
+#, no-c-format
+msgid "Check if the annotated element size is between min and max (inclusive)."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1009
+#, no-c-format
+msgid "@ScriptAssert(lang=, script=, alias=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1013
+#, no-c-format
+msgid "type"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1015
+#, no-c-format
+msgid "Checks whether the given script can successfully be evaluated against the annotated element. In order to use this constraint, an implementation of the Java Scripting API as defined by JSR 223 (\"Scripting for the Java<superscript>TM</superscript> Platform\") must part of the class path. This is automatically the case when running on Java 6. For older Java versions, the JSR 223 RI can be added manually to the class path.The expressions to be evaluated can be written in any scripting or expression language, for which a JSR 223 compatible engine can be found in the class path."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1030
+#, no-c-format
+msgid "@URL(protocol=, host=, port=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1037
+#, no-c-format
+msgid "Check if the annotated string is a valid URL. If any of parameters <parameter>protocol</parameter>, <parameter>host</parameter> or <parameter>port</parameter> is specified the URL must match the specified values in the according part."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1047
+#, no-c-format
+msgid "@Valid"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1051
+#, no-c-format
+msgid "field/property. Any non-primitive types are supported."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1054
+#, no-c-format
+msgid "Performs validation recursively on the associated object. If the object is a collection or an array, the elements are validated recursively. If the object is a map, the value elements are validated recursively."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:1066
+#, no-c-format
+msgid "On top of the parameters indicated in <xref linkend=\"table-builtin-constraints\"/> each constraint supports the parameters <parameter>message</parameter>, <parameter>groups</parameter> and <parameter>payload</parameter>. This is a requirement of the Bean Validation specification."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:1073
+#, no-c-format
+msgid "In some cases these built-in constraints will not fulfill your requirements. In this case you can literally in a minute write your own constraints. We will discuss this in"
+msgstr ""
+

Added: validator/trunk/hibernate-validator/src/main/docbook/pot/modules/xmlconfiguration.pot
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/pot/modules/xmlconfiguration.pot	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/pot/modules/xmlconfiguration.pot	2010-07-06 15:18:26 UTC (rev 19904)
@@ -0,0 +1,190 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-07-06 14:46+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: xmlconfiguration.xml:25
+#, no-c-format
+msgid "XML configuration"
+msgstr ""
+
+#. Tag: filename
+#: xmlconfiguration.xml:28
+#, no-c-format
+msgid "<filename>validation.xml</filename>"
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:30
+#, no-c-format
+msgid "The key to enable XML configuration for Hibernate Validator is the file <filename>validation.xml</filename>. If this file exists in the classpath its configuration will be applied when the <classname>ValidationFactory</classname> gets created. <xref linkend=\"image-validation-configuration\"/> shows a model view of the xsd <filename>valiation.xml</filename> has to adhere to."
+msgstr ""
+
+#. Tag: title
+#: xmlconfiguration.xml:37
+#, no-c-format
+msgid "validation-configuration-1.0.xsd"
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:52
+#, no-c-format
+msgid "shows the several configuration options of <filename>validation.xml</filename>."
+msgstr ""
+
+#. Tag: title
+#: xmlconfiguration.xml:56
+#, no-c-format
+msgid "<title>validation.xml</title>"
+msgstr ""
+
+#. Tag: programlisting
+#: xmlconfiguration.xml:58
+#, no-c-format
+msgid ""
+      "&lt;validation-config xmlns=\"http://jboss.org/xml/ns/javax/validation/configuration\"\n"
+      " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+      " xsi:schemaLocation=\"http://jboss.org/xml/ns/javax/validation/configuration\"&gt;\n"
+      "    &lt;default-provider&gt;org.hibernate.validator.HibernateValidator&lt;/default-provider&gt;\n"
+      "    &lt;message-interpolator&gt;org.hibernate.validator.engine.ResourceBundleMessageInterpolator&lt;/message-interpolator&gt;\n"
+      "    &lt;traversable-resolver&gt;org.hibernate.validator.engine.resolver.DefaultTraversableResolver&lt;/traversable-resolver&gt;\n"
+      "    &lt;constraint-validator-factory&gt;org.hibernate.validator.engine.ConstraintValidatorFactoryImpl&lt;/constraint-validator-factory&gt;\n"
+      "    &lt;constraint-mapping&gt;/constraints-car.xml&lt;/constraint-mapping&gt;\n"
+      "    &lt;property name=\"prop1\"&gt;value1&lt;/property&gt;\n"
+      "    &lt;property name=\"prop2\"&gt;value2&lt;/property&gt;\n"
+      "&lt;/validation-config&gt;"
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:62
+#, no-c-format
+msgid "There can only be one <filename>validation.xml</filename> in the classpath. If more than one is found an exception is thrown."
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:66
+#, no-c-format
+msgid "All settings shown in the <filename>validation.xml</filename> are optional and in the case of <xref linkend=\"example-validation-xml\"/> show the defaults used within Hibernate Validator. The node <property>default-provider</property> allows to choose the Bean Validation provider. This is useful if there is more than one provider in the classpath. <property>message-interpolator</property>, <property>traversable-resolver</property> and <property>constraint-validator-factory</property> allow to customize the <classname>javax.validation.MessageInterpolator</classname>, <classname>javax.validation.TraversableResolver</classname> resp. <classname>javax.validation.ConstraintValidatorFactory</classname>. The same configuration options are also available programmatically through the <classname>javax.validation.Configuration</classname>. In fact XML configuration will be overridden by values explicitly specified via the API. It is even possible to ignore the XML configuration!
  completely via <methodname> Configuration.ignoreXmlConfiguration()</methodname>. See also <xref linkend=\"validator-bootstrapping\"/>."
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:84
+#, no-c-format
+msgid "Via the <property>constraint-mapping</property> you can list an arbitrary number of additional XML files containing the actual constraint configuration. See <xref linkend=\"section-mapping-constraints\"/>."
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:88
+#, no-c-format
+msgid "Last but not least, you can specify provider specific properties via the <property>property</property> nodes. Hibernate Validator does currently not make use of any custom properties."
+msgstr ""
+
+#. Tag: title
+#: xmlconfiguration.xml:94
+#, no-c-format
+msgid "Mapping constraints"
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:96
+#, no-c-format
+msgid "Expressing constraints in XML is possible via files adhering to the xsd seen in <xref linkend=\"image-mapping-configuration\"/>. Note that these mapping files are only processed if listed via <property>constraint-mapping</property> in your <filename>validation.xml</filename>."
+msgstr ""
+
+#. Tag: title
+#: xmlconfiguration.xml:103
+#, no-c-format
+msgid "validation-mapping-1.0.xsd"
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:118
+#, no-c-format
+msgid "shows how our classes Car and RentalCar from <xref linkend=\"example-car\"/> resp. <xref linkend=\"example-rental-car\"/> could be mapped in XML."
+msgstr ""
+
+#. Tag: title
+#: xmlconfiguration.xml:123
+#, no-c-format
+msgid "constraints-car.xml"
+msgstr ""
+
+#. Tag: programlisting
+#: xmlconfiguration.xml:125
+#, no-c-format
+msgid ""
+      "&lt;constraint-mappings xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+      "                     xsi:schemaLocation=\"http://jboss.org/xml/ns/javax/validation/mapping validation-mapping-1.0.xsd\"\n"
+      "                     xmlns=\"http://jboss.org/xml/ns/javax/validation/mapping\"&gt;\n"
+      "    &lt;default-package&gt;org.hibernate.validator.quickstart&lt;/default-package&gt;\n"
+      "    &lt;bean class=\"Car\" ignore-annotations=\"true\"&gt;\n"
+      "        &lt;field name=\"manufacturer\"&gt;\n"
+      "            &lt;constraint annotation=\"javax.validation.constraints.NotNull\"/&gt;\n"
+      "        &lt;/field&gt;\n"
+      "        &lt;field name=\"licensePlate\"&gt;\n"
+      "            &lt;constraint annotation=\"javax.validation.constraints.NotNull\"/&gt;\n"
+      "        &lt;/field&gt;\n"
+      "        &lt;field name=\"seatCount\"&gt;\n"
+      "            &lt;constraint annotation=\"javax.validation.constraints.Min\"&gt;\n"
+      "                &lt;element name=\"value\"&gt;2&lt;/element&gt;\n"
+      "            &lt;/constraint&gt;\n"
+      "        &lt;/field&gt;\n"
+      "        &lt;field name=\"driver\"&gt;\n"
+      "            &lt;valid/&gt;\n"
+      "        &lt;/field&gt;\n"
+      "        &lt;getter name=\"passedVehicleInspection\" ignore-annotations=\"true\"&gt;\n"
+      "            &lt;constraint annotation=\"javax.validation.constraints.AssertTrue\"&gt;\n"
+      "                &lt;message&gt;The car has to pass the vehicle inspection first&lt;/message&gt;\n"
+      "                &lt;groups&gt;\n"
+      "                    &lt;value&gt;CarChecks&lt;/value&gt;\n"
+      "                &lt;/groups&gt;\n"
+      "                &lt;element name=\"max\"&gt;10&lt;/element&gt;\n"
+      "            &lt;/constraint&gt;\n"
+      "        &lt;/getter&gt;\n"
+      "    &lt;/bean&gt;\n"
+      "    &lt;bean class=\"RentalCar\" ignore-annotations=\"true\"&gt;\n"
+      "        &lt;class ignore-annotations=\"true\"&gt;\n"
+      "            &lt;group-sequence&gt;\n"
+      "                &lt;value&gt;RentalCar&lt;/value&gt;\n"
+      "                &lt;value&gt;CarChecks&lt;/value&gt;\n"
+      "            &lt;/group-sequence&gt;\n"
+      "        &lt;/class&gt;\n"
+      "    &lt;/bean&gt;\n"
+      "    &lt;constraint-definition annotation=\"org.mycompany.CheckCase\" include-existing-validator=\"false\"&gt;\n"
+      "        &lt;validated-by include-existing-validators=\"false\"&gt;\n"
+      "            &lt;value&gt;org.mycompany.CheckCaseValidator&lt;/value&gt;\n"
+      "        &lt;/validated-by&gt;\n"
+      "    &lt;/constraint-definition&gt;\n"
+      "&lt;/constraint-mappings&gt;"
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:128
+#, no-c-format
+msgid "The XML configuration is closely mirroring the programmatic API. For this reason it should suffice to just add some comments. <property>default-package</property> is used for all fields where a classname is expected. If the specified class is not fully qualified the configured default package will be used. Every mapping file can then have several <property>bean</property> nodes, each describing the constraints on the entity with the specified class name.<warning> <para>A given entity can only be configured once across all configuration files. If the same class is configured more than once an exception is thrown.</para> </warning>Settings <property>ignore-annotations</property> to true means that constraint annotations placed on the configured bean are ignored. The default for this value is <constant>true</constant>. ignore-annotations is also available for the nodes <property>class</property>, <property>fields</property> and <property>getter</property>. If not explic!
 itly specified on these levels the configured <property>bean</property> value applies. Otherwise do the nodes <property>class</property>, <property>fields</property> and <property>getter</property> determine on which level the constraints are placed (see <xref linkend=\"validator-usingvalidator-annotate\"/>). The <property>constraint</property> node is then used to add a constraint on the corresponding level. Each constraint definition must define the class via the annotation attribute. The constraint attributes required by the Bean Validation specification (<property>message</property>, <property>groups</property> and <property>payload</property>) have dedicated nodes. All other constraint specific attributes are configured using the the <property>element</property> node."
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:156
+#, no-c-format
+msgid "The class node also allows to reconfigure the default group sequence (see <xref linkend=\"section-default-group-class\"/>) via the <property>group-sequence</property> node."
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:160
+#, no-c-format
+msgid "Last but not least, the list of <classname>ConstraintValidator</classname>s associated to a given constraint can be altered via the <property>constraint-definition</property> node. The <property>annotation</property> attribute represents the constraint annotation being altered. The <property>validated-by</property> elements represent the (ordered) list of <classname>ConstraintValidator</classname> implementations associated to the constraint. If <property>include-existing-validator</property> is set to <constant>false</constant>, validators defined on the constraint annotation are ignored. If set to <constant>true</constant>, the list of ConstraintValidators described in XML are concatenated to the list of validators described on the annotation."
+msgstr ""
+

Added: validator/trunk/hibernate-validator/src/main/docbook/zh-CN/master.po
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/zh-CN/master.po	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/zh-CN/master.po	2010-07-06 15:18:26 UTC (rev 19904)
@@ -0,0 +1,50 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-07-06 14:46+0000\n"
+"PO-Revision-Date: 2010-07-06 14:46+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: master.xml:26
+#, no-c-format
+msgid "Hibernate Validator"
+msgstr ""
+
+#. Tag: subtitle
+#: master.xml:27
+#, no-c-format
+msgid "JSR 303 Reference Implementation"
+msgstr ""
+
+#. Tag: subtitle
+#: master.xml:28
+#, no-c-format
+msgid "Reference Guide"
+msgstr ""
+
+#. Tag: holder
+#: master.xml:34
+#, no-c-format
+msgid "&copyrightHolder;"
+msgstr ""
+
+#. Tag: author
+#: master.xml:37
+#, no-c-format
+msgid "<firstname>Hardy</firstname> <surname>Ferentschik</surname>"
+msgstr ""
+
+#. Tag: author
+#: master.xml:41
+#, no-c-format
+msgid "<firstname>Gunnar</firstname> <surname>Morling</surname>"
+msgstr ""

Added: validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/annotationprocessor.po
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/annotationprocessor.po	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/annotationprocessor.po	2010-07-06 15:18:26 UTC (rev 19904)
@@ -0,0 +1,643 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-07-06 14:46+0000\n"
+"PO-Revision-Date: 2010-07-06 14:46+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: annotationprocessor.xml:25
+#, no-c-format
+msgid "Annotation Processor (EXPERIMENTAL)"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:27
+#, no-c-format
+msgid "Have you ever caught yourself by unintentionally doing things like"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:32
+#, no-c-format
+msgid ""
+"annotating Strings with @Min to specify a minimum length (instead of using "
+"@Size)"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:37
+#, no-c-format
+msgid ""
+"annotating the setter of a JavaBean property (instead of the getter method)"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:42
+#, no-c-format
+msgid ""
+"annotating static fields/methods with constraint annotations (which is not "
+"supported)?"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:47
+#, no-c-format
+msgid ""
+"Then the Hibernate Validator Annotation Processor is the right thing for "
+"you. It helps preventing such mistakes by plugging into the build process "
+"and raising compilation errors whenever constraint annotations are "
+"incorrectly used."
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:53
+#, no-c-format
+msgid ""
+"A first version of the Hibernate Validator Annotation Processor is part of "
+"Hibernate Validator since release 4.1. It is currently still under "
+"development and should therefore be considered as an experimental feature. "
+"Some <link linkend=\"section-known-issues\">known issues</link> can be found "
+"at the end of this chapter. In case any problems arise when using the "
+"processor feel free to ask for help at the <ulink url=\"https://forum."
+"hibernate.org/viewforum.php?f=9\">forum</ulink> or create an issue "
+"within<ulink url=\"http://opensource.atlassian.com/projects/hibernate/browse/"
+"HV/component/10356\"> JIRA</ulink>."
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:66
+#, no-c-format
+msgid "Prerequisites"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:68
+#, no-c-format
+msgid ""
+"The Hibernate Validator Annotation Processor is based on the \"Pluggable "
+"Annotation Processing API\" as defined by <ulink url=\"http://jcp.org/en/jsr/"
+"detail?id=269\">JSR 269</ulink>. This API is part of the Java Platform since "
+"Java 6. So be sure to use this or a later version."
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:76
+#, no-c-format
+msgid "Features"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:78
+#, no-c-format
+msgid ""
+"As of Hibernate Validator 4.1 the Hibernate Validator Annotation Processor "
+"checks that:"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:83
+#, no-c-format
+msgid ""
+"constraint annotations are allowed for the type of the annotated element"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:88
+#, no-c-format
+msgid "JavaBean getter methods are annotated in case of property validation"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:93
+#, no-c-format
+msgid ""
+"only non-static fields or properties are annotated with constraint "
+"annotations"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:98
+#, no-c-format
+msgid "only non-primitive fields or properties are annotated with @Valid"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:103
+#, no-c-format
+msgid ""
+"only such annotation types are annotated with constraint annotations which "
+"are constraint annotations themselves"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:110
+#, no-c-format
+msgid "Options"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:112
+#, no-c-format
+msgid ""
+"The behavior of the Hibernate Validator Annotation Processor can be "
+"controlled using the <ulink url=\"http://java.sun.com/javase/6/docs/"
+"technotes/tools/windows/javac.html#options\">processor options</ulink> "
+"listed in table<xref linkend=\"table_processor_options\"/>:"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:119
+#, no-c-format
+msgid "Hibernate Validator Annotation Processor options"
+msgstr ""
+
+#. Tag: entry
+#: annotationprocessor.xml:124
+#, no-c-format
+msgid "Option"
+msgstr ""
+
+#. Tag: entry
+#: annotationprocessor.xml:126
+#, no-c-format
+msgid "Explanation"
+msgstr ""
+
+#. Tag: varname
+#: annotationprocessor.xml:132
+#, no-c-format
+msgid "diagnosticKind"
+msgstr ""
+
+#. Tag: entry
+#: annotationprocessor.xml:134
+#, no-c-format
+msgid ""
+"Controls how constraint problems are reported. Must be the string "
+"representation of one of the values from the enum <classname>javax.tools."
+"Diagnostic.Kind</classname>, e.g. <classname>WARNING</classname>. A value of "
+"<classname>ERROR</classname> will cause compilation to halt whenever the AP "
+"detects a constraint problem. Defaults to <classname>ERROR</classname>."
+msgstr ""
+
+#. Tag: varname
+#: annotationprocessor.xml:144
+#, no-c-format
+msgid "verbose"
+msgstr ""
+
+#. Tag: entry
+#: annotationprocessor.xml:146
+#, no-c-format
+msgid ""
+"Controls whether detailed processing information shall be displayed or not, "
+"useful for debugging purposes. Must be either <varname>true</varname> "
+"or<varname>false</varname>. Defaults to <varname>false</varname>."
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:157
+#, no-c-format
+msgid "Using the Annotation Processor"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:159
+#, no-c-format
+msgid ""
+"This section shows in detail how to integrate the Hibernate Validator "
+"Annotation Processor into command line builds (javac, Ant, Maven) as well as "
+"IDE-based builds (Eclipse, IntelliJ IDEA, NetBeans)."
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:165
+#, no-c-format
+msgid "Command line builds"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:168
+#, no-c-format
+msgid "javac"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:170
+#, no-c-format
+msgid ""
+"When compiling on the command line using <ulink url=\"http://java.sun.com/"
+"javase/6/docs/technotes/guides/javac/index.html\">javac</ulink>, specify the "
+"following JARs using the \"processorpath\" option:"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:176 annotationprocessor.xml:287
+#: annotationprocessor.xml:377
+#, no-c-format
+msgid "validation-api-&bvVersion;.jar"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:180 annotationprocessor.xml:291
+#: annotationprocessor.xml:381
+#, no-c-format
+msgid "hibernate-validator-annotation-processor-&version;.jar"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:184
+#, no-c-format
+msgid ""
+"The following listing shows an example. The processor will be detected "
+"automatically by the compiler and invoked during compilation."
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:189
+#, no-c-format
+msgid "Using the annotation processor with javac"
+msgstr ""
+
+#. Tag: programlisting
+#: annotationprocessor.xml:191
+#, no-c-format
+msgid ""
+"javac src/main/java/org/hibernate/validator/ap/demo/Car.java \\\n"
+"   -cp /path/to/validation-api-&bvVersion;.jar \\ \n"
+"   -processorpath /path/to/validation-api-&bvVersion;.jar:/path/to/hibernate-"
+"validator-annotation-processor-&version;.jar"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:196
+#, no-c-format
+msgid "Apache Ant"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:198
+#, no-c-format
+msgid ""
+"Similar to directly working with javac, the annotation processor can be "
+"added as as compiler argument when invoking the <ulink url=\"http://ant."
+"apache.org/manual/CoreTasks/javac.html\">javac task</ulink> for <ulink url="
+"\"http://ant.apache.org/\">Apache Ant</ulink>:"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:205
+#, no-c-format
+msgid "Using the annotation processor with Ant"
+msgstr ""
+
+#. Tag: programlisting
+#: annotationprocessor.xml:207
+#, no-c-format
+msgid ""
+"&lt;javac srcdir=\"src/main\"\n"
+"       destdir=\"build/classes\"\n"
+"       classpath=\"/path/to/validation-api-&bvVersion;.jar\"&gt;\n"
+"       &lt;compilerarg value=\"-processorpath\" /&gt;\n"
+"       &lt;compilerarg value=\"/path/to/validation-api-&bvVersion;.jar:/path/"
+"to/hibernate-validator-annotation-processor-&version;.jar\"/&gt;\n"
+"&lt;/javac&gt;"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:212
+#, no-c-format
+msgid "Maven"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:214
+#, no-c-format
+msgid ""
+"There are several options for integrating the annotation processor with "
+"<ulink url=\"http://maven.apache.org/\">Apache Maven</ulink>. Generally it "
+"is sufficient to add the Hibernate Validator Annotation Processor as "
+"dependency to your project:"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:220
+#, no-c-format
+msgid "Adding the HV Annotation Processor as dependency"
+msgstr ""
+
+#. Tag: programlisting
+#: annotationprocessor.xml:222
+#, no-c-format
+msgid ""
+"...\n"
+"&lt;dependency&gt;\n"
+"    &lt;groupId&gt;org.hibernate&lt;/groupId&gt;\n"
+"    &lt;artifactId&gt;hibernate-validator-annotation-processor&lt;/"
+"artifactId&gt;\n"
+"    &lt;version&gt;&version;&lt;/version&gt;\n"
+"    &lt;scope&gt;compile&lt;/scope&gt;\n"
+"&lt;/dependency&gt;\n"
+"..."
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:225
+#, no-c-format
+msgid ""
+"The processor will then be executed automatically by the compiler. This "
+"basically works, but comes with the disadavantage that in some cases "
+"messages from the annotation processor are not displayed (see <ulink url="
+"\"http://jira.codehaus.org/browse/MCOMPILER-66\">MCOMPILER-66</ulink>)."
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:231
+#, no-c-format
+msgid ""
+"Another option is using the <ulink url=\"http://code.google.com/p/maven-"
+"annotation-plugin/\">Maven Annotation Plugin</ulink>. At the time of this "
+"writing the plugin is not yet available in any of the well-known "
+"repositories. Therefore you have to add the project's own repository to your "
+"settings.xml or pom.xml:"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:239
+#, no-c-format
+msgid "Adding the Maven Annotation Plugin repository"
+msgstr ""
+
+#. Tag: programlisting
+#: annotationprocessor.xml:241
+#, no-c-format
+msgid ""
+"...\n"
+"&lt;pluginRepositories&gt;\n"
+"    &lt;pluginRepository&gt;\n"
+"        &lt;id&gt;maven-annotation-plugin-repo&lt;/id&gt;\n"
+"        &lt;url&gt;http://maven-annotation-plugin.googlecode.com/svn/trunk/"
+"mavenrepo&lt;/url&gt;\n"
+"    &lt;/pluginRepository&gt;\n"
+"&lt;/pluginRepositories&gt;\n"
+"..."
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:242
+#, no-c-format
+msgid ""
+"Now disable the standard annotation processing performed by the compiler "
+"plugin and configure the annotation plugin by specifying an execution and "
+"adding the Hibernate Validator Annotation Processor as plugin dependency "
+"(that way the AP is not visible on the project's actual classpath):"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:249
+#, no-c-format
+msgid "Configuring the Maven Annotation Plugin"
+msgstr ""
+
+#. Tag: programlisting
+#: annotationprocessor.xml:251
+#, no-c-format
+msgid ""
+"...\n"
+"&lt;plugin&gt;\n"
+"    &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;\n"
+"    &lt;configuration&gt;\n"
+"        &lt;source&gt;1.6&lt;/source&gt;\n"
+"        &lt;target&gt;1.6&lt;/target&gt;\n"
+"        &lt;compilerArgument&gt;-proc:none&lt;/compilerArgument&gt;\n"
+"    &lt;/configuration&gt;\n"
+"&lt;/plugin&gt;\n"
+"&lt;plugin&gt;\n"
+"    &lt;groupId&gt;org.bsc.maven&lt;/groupId&gt;\n"
+"    &lt;artifactId&gt;maven-processor-plugin&lt;/artifactId&gt;\n"
+"    &lt;version&gt;1.3.4&lt;/version&gt;\n"
+"    &lt;executions&gt;\n"
+"        &lt;execution&gt;\n"
+"            &lt;id&gt;process&lt;/id&gt;\n"
+"            &lt;goals&gt;\n"
+"                &lt;goal&gt;process&lt;/goal&gt;\n"
+"            &lt;/goals&gt;\n"
+"            &lt;phase&gt;process-sources&lt;/phase&gt;\n"
+"        &lt;/execution&gt;\n"
+"    &lt;/executions&gt;\n"
+"    &lt;dependencies&gt;\n"
+"        &lt;dependency&gt;\n"
+"            &lt;groupId&gt;org.hibernate&lt;/groupId&gt;\n"
+"            &lt;artifactId&gt;hibernate-validator-annotation-processor&lt;/"
+"artifactId&gt;\n"
+"            &lt;version&gt;&version;&lt;/version&gt;\n"
+"            &lt;scope&gt;compile&lt;/scope&gt;\n"
+"        &lt;/dependency&gt;\n"
+"    &lt;/dependencies&gt;\n"
+"&lt;/plugin&gt;\n"
+"..."
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:257
+#, no-c-format
+msgid "IDE builds"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:260
+#, no-c-format
+msgid "Eclipse"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:262
+#, no-c-format
+msgid ""
+"Do the following to use the annotation processor within the <ulink url="
+"\"http://www.eclipse.org/\">Eclipse</ulink> IDE:"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:267 annotationprocessor.xml:368
+#, no-c-format
+msgid "Right-click your project, choose \"Properties\""
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:271
+#, no-c-format
+msgid ""
+"Go to \"Java Compiler\" and make sure, that \"Compiler compliance level\" is "
+"set to \"1.6\". Otherwise the processor won't be activated"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:277
+#, no-c-format
+msgid ""
+"Go to \"Java Compiler - Annotation Processing\" and choose \"Enable "
+"annotation processing\""
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:282
+#, no-c-format
+msgid ""
+"Go to \"Java Compiler - Annotation Processing - Factory Path\" and add the "
+"following JARs:"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:297
+#, no-c-format
+msgid "Confirm the workspace rebuild"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:301
+#, no-c-format
+msgid ""
+"You now should see any annotation problems as regular error markers within "
+"the editor and in the \"Problem\" view:"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:313
+#, no-c-format
+msgid "IntelliJ IDEA"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:315
+#, no-c-format
+msgid ""
+"The following steps must be followed to use the annotation processor within "
+"<ulink url=\"http://www.jetbrains.com/idea/\">IntelliJ IDEA</ulink> (version "
+"9 and above):"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:321
+#, no-c-format
+msgid "Go to \"File\", then \"Settings\","
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:325
+#, no-c-format
+msgid "Expand the node \"Compiler\", then \"Annotation Processors\""
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:330
+#, no-c-format
+msgid ""
+"Choose \"Enable annotation processing\" and enter the following as "
+"\"Processor path\": /path/to/validation-api-&bvVersion;.jar:/path/to/"
+"hibernate-validator-annotation-processor-&version;.jar"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:336
+#, no-c-format
+msgid ""
+"Add the processor's fully qualified name <classname>org.hibernate.validator."
+"ap.ConstraintValidationProcessor</classname> to the \"Annotation Processors"
+"\" list"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:342
+#, no-c-format
+msgid "If applicable add you module to the \"Processed Modules\" list"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:347
+#, no-c-format
+msgid ""
+"Rebuilding your project then should show any erronous constraint annotations:"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:359
+#, no-c-format
+msgid "NetBeans"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:361
+#, no-c-format
+msgid ""
+"Starting with version 6.9, also the <ulink url=\"http://www.netbeans.org/"
+"\">NetBeans</ulink> IDE supports using annotation processors within the IDE "
+"build. To do so, do the following:"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:372
+#, no-c-format
+msgid "Go to \"Libraries\", tab \"Processor\", and add the following two JARs:"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:387
+#, no-c-format
+msgid ""
+"Go to \"Build - Compiling\", select \"Enable Annotation Processing\" and "
+"\"Enable Annotation Processing in Editor\". Add the annotation processor by "
+"specifying its fully qualified name <classname>org.hibernate.validator.ap."
+"ConstraintValidationProcessor</classname>"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:394
+#, no-c-format
+msgid ""
+"Any constraint annotation problems will then be marked directly within the "
+"editor:"
+msgstr ""
+
+#. Tag: title
+#: annotationprocessor.xml:408
+#, no-c-format
+msgid "Known issues"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:410
+#, no-c-format
+msgid "The following known issues exist as of May 2010:"
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:414
+#, no-c-format
+msgid ""
+"<ulink url=\"http://opensource.atlassian.com/projects/hibernate/browse/HV-308"
+"\">HV-308</ulink>: Additional validators registered for a constraint <ulink "
+"url=\"http://docs.jboss.org/hibernate/stable/validator/reference/en/"
+"html_single/#d0e1957\">using XML</ulink> are not evaluated by the annotation "
+"processor."
+msgstr ""
+
+#. Tag: para
+#: annotationprocessor.xml:422
+#, no-c-format
+msgid ""
+"Sometimes custom constraints can't be <ulink url=\"http://opensource."
+"atlassian.com/projects/hibernate/browse/HV-293\">properly evaluated</ulink> "
+"when using the processor within Eclipse. Cleaning the project can help in "
+"these situations. This seems to be an issue with the Eclipse JSR 269 API "
+"implementation, but further investigation is required here."
+msgstr ""

Added: validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/bootstrapping.po
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/bootstrapping.po	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/bootstrapping.po	2010-07-06 15:18:26 UTC (rev 19904)
@@ -0,0 +1,564 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-07-06 14:46+0000\n"
+"PO-Revision-Date: 2010-07-06 14:46+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: bootstrapping.xml:25
+#, no-c-format
+msgid "Bootstrapping"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:27
+#, no-c-format
+msgid ""
+"We already seen in <xref linkend=\"section-validator-instance\"/> the "
+"easiest way to create a <classname>Validator</classname> instance - "
+"<methodname>Validation.buildDefaultValidatorFactory</methodname>. In this "
+"chapter we have a look at the other methods in <classname>javax.validation."
+"Validation</classname> and how they allow to configure several aspects of "
+"Bean Validation at bootstrapping time."
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:34
+#, no-c-format
+msgid ""
+"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 <ulink url=\"http://java.sun.com/"
+"j2se/1.3/docs/guide/jar/jar.html#Service%20Provider\">Java Service Provider</"
+"ulink> mechanism. A Bean Validation implementation includes the file "
+"<filename>javax.validation.spi.ValidationProvider</filename> in "
+"<filename>META-INF/services</filename>. This file contains the fully "
+"qualified classname of the <classname>ValidationProvider</classname> of the "
+"implementation. In the case of Hibernate Validator this is <classname>org."
+"hibernate.validator.HibernateValidator</classname>."
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:47
+#, no-c-format
+msgid ""
+"If there are more than one Bean Validation implementation providers in the "
+"classpath and <methodname>Validation.buildDefaultValidatorFactory()</"
+"methodname> is used, there is no guarantee which provider will be chosen. To "
+"enforce the provider <methodname>Validation.byProvider()</methodname> should "
+"be used."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:56
+#, no-c-format
+msgid ""
+"<classname>Configuration</classname> and <classname>ValidatorFactory</"
+"classname>"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:59
+#, no-c-format
+msgid ""
+"There are three different methods in the Validation class to create a "
+"Validator instance. The easiest in shown in <xref linkend=\"example-build-"
+"default-validator-factory\"/>."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:64
+#, no-c-format
+msgid "Validation.buildDefaultValidatorFactory()"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:66
+#, no-c-format
+msgid ""
+"ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
+"Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:69
+#, no-c-format
+msgid ""
+"You can also use the method <methodname>Validation.byDefaultProvider()</"
+"methodname> which will allow you to configure several aspects of the created "
+"Validator instance:"
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:74
+#, no-c-format
+msgid "Validation.byDefaultProvider()"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:76
+#, no-c-format
+msgid ""
+"Configuration&lt;?&gt; config = Validation.byDefaultProvider().configure();\n"
+"config.messageInterpolator(new MyMessageInterpolator())\n"
+"    .traversableResolver( new MyTraversableResolver())\n"
+"    .constraintValidatorFactory(new MyConstraintValidatorFactory());\n"
+"\n"
+"ValidatorFactory factory = config.buildValidatorFactory();\n"
+"Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:79
+#, no-c-format
+msgid ""
+"We will learn more about <classname>MessageInterpolator</classname>, "
+"<classname>TraversableResolver</classname> and "
+"<classname>ConstraintValidatorFactory</classname> in the following sections."
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:84
+#, no-c-format
+msgid ""
+"Last but not least you can ask for a Configuration object of a specific Bean "
+"Validation provider. This is useful if you have more than one Bean "
+"Validation provider in your classpath. In this situation you can make an "
+"explicit choice about which implementation to use. In the case of Hibernate "
+"Validator the <classname>Validator</classname> creation looks like:"
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:92
+#, no-c-format
+msgid "Validation.byProvider( HibernateValidator.class )"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:94
+#, no-c-format
+msgid ""
+"HibernateValidatorConfiguration config = Validation.byProvider"
+"( HibernateValidator.class ).configure();\n"
+"config.messageInterpolator(new MyMessageInterpolator())\n"
+"    .traversableResolver( new MyTraversableResolver())\n"
+"    .constraintValidatorFactory(new MyConstraintValidatorFactory());\n"
+"\n"
+"ValidatorFactory factory = config.buildValidatorFactory();\n"
+"Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:98
+#, no-c-format
+msgid ""
+"The generated <classname>Validator</classname> instance is thread safe and "
+"can be cached."
+msgstr ""
+
+#. Tag: classname
+#: bootstrapping.xml:104
+#, no-c-format
+msgid "ValidationProviderResolver"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:106
+#, no-c-format
+msgid ""
+"In the case that the Java Service Provider mechanism does not work in your "
+"environment or you have a special classloader setup, you are able to provide "
+"a custom <classname>ValidationProviderResolver</classname>. An example in an "
+"OSGi environment you could plug your custom provider resolver like seen in "
+"<xref linkend=\"example-provider-resolver\"/>."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:113
+#, no-c-format
+msgid "Providing a custom ValidationProviderResolver"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:115
+#, no-c-format
+msgid ""
+"Configuration&lt;?&gt; config = Validation.byDefaultProvider()\n"
+"    .providerResolver( new OSGiServiceDiscoverer() )\n"
+"    .configure();\n"
+"\n"
+"ValidatorFactory factory = config.buildValidatorFactory();\n"
+"Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:118
+#, no-c-format
+msgid ""
+"Your <classname>OSGiServiceDiscoverer</classname> must in this case "
+"implement the interface <classname>ValidationProviderResolver</classname>:"
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:123
+#, no-c-format
+msgid "ValidationProviderResolver interface"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:125
+#, no-c-format
+msgid ""
+"public interface ValidationProviderResolver {\n"
+"    /**\n"
+"     * Returns a list of ValidationProviders available in the runtime "
+"environment.\n"
+"     *\n"
+"     * @return list of validation providers.  \n"
+"     */\n"
+"    List&lt;ValidationProvider&lt;?&gt;&gt; getValidationProviders();\n"
+"}"
+msgstr ""
+
+#. Tag: classname
+#: bootstrapping.xml:130
+#, no-c-format
+msgid "MessageInterpolator"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:132
+#, no-c-format
+msgid ""
+"already discussed the default message interpolation algorithm. If you have "
+"special requirements for your message interpolation you can provide a custom "
+"interpolator using <methodname>Configuration.messageInterpolator()</"
+"methodname>. This message interpolator will be shared by all validators "
+"generated by the <classname>ValidatorFactory</classname> created from this "
+"<classname>Configuration</classname>(see <xref linkend=\"example-message-"
+"interpolator\"/>)."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:143
+#, no-c-format
+msgid "Providing a custom MessageInterpolator"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:145
+#, no-c-format
+msgid ""
+"Configuration&lt;?&gt; configuration = Validation.byDefaultProvider()."
+"configure();\n"
+"ValidatorFactory factory = configuration\n"
+"    .messageInterpolator(new ContextualMessageInterpolator(configuration."
+"getDefaultMessageInterpolator()))\n"
+"    .buildValidatorFactory();\n"
+"\n"
+"Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:149
+#, no-c-format
+msgid ""
+"It is recommended that <classname>MessageInterpolator</classname> "
+"implementations delegate final interpolation to the Bean Validation default "
+"<classname>MessageInterpolator</classname> to ensure standard Bean "
+"Validation interpolation rules are followed. The default implementation is "
+"accessible through <methodname>Configuration.getDefaultMessageInterpolator()"
+"</methodname>."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:158
+#, no-c-format
+msgid "ResourceBundleLocator"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:160
+#, no-c-format
+msgid ""
+"A common use case is the ability to specify your own resource bundles for "
+"message interpolation. The default <classname>MessageInterpolator</"
+"classname> implementation in Hibernate Validator is called "
+"<classname>ResourceBundleMessageInterpolator</classname> and per default "
+"loads resource bundles via <methodname>ResourceBundle.getBundle</"
+"methodname>. However, <classname>ResourceBundleMessageInterpolator</"
+"classname> also allows you to specify a custom implementation of "
+"<classname>ResourceBundleLocator</classname> allowing you to provide your "
+"own resource bundles. <xref linkend=\"example-resource-bundle-locator\"/> "
+"shows an example. In the example<methodname> HibernateValidatorConfiguration."
+"getDefaultResourceBundleLocator</methodname> is used to retrieve the default "
+"<classname>ResourceBundleLocator</classname> which then can be passed to the "
+"custom implementation in order implement delegation."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:179
+#, no-c-format
+msgid "Providing a custom ResourceBundleLocator"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:181
+#, no-c-format
+msgid ""
+"HibernateValidatorConfiguration configure = Validation.byProvider"
+"(HibernateValidator.class).configure();\n"
+"\n"
+"ResourceBundleLocator defaultResourceBundleLocator = configure."
+"getDefaultResourceBundleLocator(); \n"
+"ResourceBundleLocator myResourceBundleLocator = new "
+"MyCustomResourceBundleLocator(defaultResourceBundleLocator);\n"
+"\n"
+"configure.messageInterpolator(new ResourceBundleMessageInterpolator"
+"(myResourceBundleLocator));"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:184
+#, no-c-format
+msgid ""
+"Hibernate Validator provides the following implementation of "
+"<classname>ResourceBundleLocator</classname> - "
+"<classname>PlatformResourceBundleLocator</classname> (the default) and "
+"<classname>AggregateResourceBundleLocator</classname>. The latter can be "
+"used to specify a list of resource bundle names which will get loaded and "
+"merged into a single resource bundle. Refer to the JavaDoc documentation for "
+"more information."
+msgstr ""
+
+#. Tag: classname
+#: bootstrapping.xml:195
+#, no-c-format
+msgid "TraversableResolver"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:197
+#, no-c-format
+msgid ""
+"The usage of the <classname>TraversableResolver</classname> has so far not "
+"been discussed. The idea is that in some cases, the state of a property "
+"should not be accessed. The most obvious example for that is a lazy loaded "
+"property or association of a Java Persistence provider. Validating this lazy "
+"property or association would mean that its state would have to be accessed "
+"triggering a load from the database. Bean Validation controls which property "
+"can and cannot be accessed via the <classname>TraversableResolver</"
+"classname> interface (see <xref linkend=\"example-traversable-resolver\"/>). "
+"In the example HibernateValidatorConfiguration."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:209
+#, no-c-format
+msgid "TraversableResolver interface"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:211
+#, no-c-format
+msgid ""
+"/**\n"
+" * Contract determining if a property can be accessed by the Bean Validation "
+"provider\n"
+" * This contract is called for each property that is being either validated "
+"or cascaded.\n"
+" *\n"
+" * A traversable resolver implementation must be thread-safe.\n"
+" *\n"
+" */\n"
+"public interface TraversableResolver {\n"
+"    /**\n"
+"     * Determine if the Bean Validation provider is allowed to reach the "
+"property state\n"
+"     *\n"
+"     * @param traversableObject object hosting &lt;code&gt;"
+"traversableProperty&lt;/code&gt; or null  \n"
+"     *                          if validateValue is called\n"
+"     * @param traversableProperty the traversable property.\n"
+"     * @param rootBeanType type of the root object passed to the Validator.\n"
+"     * @param pathToTraversableObject path from the root object to\n"
+"     *        &lt;code&gt;traversableObject&lt;/code&gt;\n"
+"     *        (using the path specification defined by Bean Validator).\n"
+"     * @param elementType either &lt;code&gt;FIELD&lt;/code&gt; or &lt;"
+"code&gt;METHOD&lt;/code&gt;.\n"
+"     *\n"
+"     * @return &lt;code&gt;true&lt;/code&gt; if the Bean Validation provider "
+"is allowed to\n"
+"     *         reach the property state, &lt;code&gt;false&lt;/code&gt; "
+"otherwise.\n"
+"     */\n"
+"     boolean isReachable(Object traversableObject,\n"
+"                         Path.Node traversableProperty,\n"
+"                         Class&lt;?&gt; rootBeanType,\n"
+"                         Path pathToTraversableObject,\n"
+"                         ElementType elementType);\n"
+"\n"
+"    /**\n"
+"     * Determine if the Bean Validation provider is allowed to cascade "
+"validation on\n"
+"     * the bean instance returned by the property value\n"
+"     * marked as &lt;code&gt;@Valid&lt;/code&gt;.\n"
+"     * Note that this method is called only if isReachable returns true for "
+"the same set of\n"
+"     * arguments and if the property is marked as &lt;code&gt;@Valid&lt;/"
+"code&gt;\n"
+"     *\n"
+"     * @param traversableObject object hosting &lt;code&gt;"
+"traversableProperty&lt;/code&gt; or null\n"
+"     *                          if validateValue is called\n"
+"     * @param traversableProperty the traversable property.\n"
+"     * @param rootBeanType type of the root object passed to the Validator.\n"
+"     * @param pathToTraversableObject path from the root object to\n"
+"     *        &lt;code&gt;traversableObject&lt;/code&gt;\n"
+"     *        (using the path specification defined by Bean Validator).\n"
+"     * @param elementType either &lt;code&gt;FIELD&lt;/code&gt; or &lt;"
+"code&gt;METHOD&lt;/code&gt;.\n"
+"     *\n"
+"     * @return &lt;code&gt;true&lt;/code&gt; if the Bean Validation provider "
+"is allowed to\n"
+"     *         cascade validation, &lt;code&gt;false&lt;/code&gt; "
+"otherwise.\n"
+"     */\n"
+"     boolean isCascadable(Object traversableObject,\n"
+"                          Path.Node traversableProperty,\n"
+"                          Class&lt;?&gt; rootBeanType,\n"
+"                          Path pathToTraversableObject,\n"
+"                          ElementType elementType);\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:214
+#, no-c-format
+msgid ""
+"Hibernate Validator provides two <classname>TraversableResolver</classname>s "
+"out of the box which will be enabled automatically depending on your "
+"environment. The first is the <classname>DefaultTraversableResolver</"
+"classname> which will always return true for <methodname>isReachable()</"
+"methodname> and i<methodname>sTraversable()</methodname>. The second is the "
+"<classname>JPATraversableResolver</classname> which gets enabled when "
+"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 "
+"<classname>Configuration</classname> object as seen in <xref linkend="
+"\"example-traversable-resolver-config\"/>."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:227
+#, no-c-format
+msgid "Providing a custom TraversableResolver"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:229
+#, no-c-format
+msgid ""
+"Configuration&lt;?&gt; configuration = Validation.byDefaultProvider()."
+"configure();\n"
+"ValidatorFactory factory = configuration\n"
+"    .traversableResolver(new MyTraversableResolver())\n"
+"    .buildValidatorFactory();\n"
+"\n"
+"Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: classname
+#: bootstrapping.xml:234
+#, no-c-format
+msgid "ConstraintValidatorFactory"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:236
+#, no-c-format
+msgid ""
+"Last but not least, there is one more configuration option to discuss, the "
+"<classname>ConstraintValidatorFactory</classname>. The default "
+"<classname>ConstraintValidatorFactory</classname> provided by Hibernate "
+"Validator requires a public no-arg constructor to instantiate "
+"<classname>ConstraintValidator</classname> instances (see <xref linkend="
+"\"section-constraint-validator\"/>). Using a custom "
+"<classname>ConstraintValidatorFactory</classname> offers for example the "
+"possibility to use dependency injection in constraint implementations. The "
+"configuration of the custom factory is once more via the "
+"<classname>Configuration</classname> (<xref linkend=\"example-constraint-"
+"validator-factory\"/>)."
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:249
+#, no-c-format
+msgid "Providing a custom ConstraintValidatorFactory"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:251
+#, no-c-format
+msgid ""
+"Configuration&lt;?&gt; configuration = Validation.byDefaultProvider()."
+"configure();\n"
+"ValidatorFactory factory = configuration\n"
+"    .constraintValidatorFactory(new IOCConstraintValidatorFactory())\n"
+"    .buildValidatorFactory();\n"
+"\n"
+"Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:254
+#, no-c-format
+msgid "The interface you have to implement is:"
+msgstr ""
+
+#. Tag: title
+#: bootstrapping.xml:257
+#, no-c-format
+msgid "ConstraintValidatorFactory interface"
+msgstr ""
+
+#. Tag: programlisting
+#: bootstrapping.xml:259
+#, no-c-format
+msgid ""
+"public interface ConstraintValidatorFactory {\n"
+"    /**\n"
+"     * @param key The class of the constraint validator to instantiate.\n"
+"     *\n"
+"     * @return A constraint validator instance of the specified class.\n"
+"     */\n"
+"     &lt;T extends ConstraintValidator&lt;?,?&gt;&gt; T getInstance(Class&lt;"
+"T&gt; key);\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:263
+#, no-c-format
+msgid ""
+"Any constraint implementation relying on "
+"<classname>ConstraintValidatorFactory</classname> behaviors specific to an "
+"implementation (dependency injection, no no-arg constructor and so on) are "
+"not considered portable."
+msgstr ""
+
+#. Tag: para
+#: bootstrapping.xml:270
+#, no-c-format
+msgid ""
+"ConstraintValidatorFactory should not cache instances as the state of each "
+"instance can be altered in the initialize method."
+msgstr ""

Added: validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/customconstraints.po
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/customconstraints.po	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/customconstraints.po	2010-07-06 15:18:26 UTC (rev 19904)
@@ -0,0 +1,829 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-07-06 14:46+0000\n"
+"PO-Revision-Date: 2010-07-06 14:46+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: customconstraints.xml:25
+#, no-c-format
+msgid "Creating custom constraints"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:27
+#, no-c-format
+msgid ""
+"Though the Bean Validation API defines a whole set of standard constraint "
+"annotations one can easily think of situations in which these standard "
+"annotations won't suffice. For these cases you are able to create custom "
+"constraints tailored to your specific validation requirements in a simple "
+"manner."
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:34
+#, no-c-format
+msgid "Creating a simple constraint"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:36
+#, no-c-format
+msgid "To create a custom constraint, the following three steps are required:"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:41
+#, no-c-format
+msgid "Create a constraint annotation"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:45
+#, no-c-format
+msgid "Implement a validator"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:49
+#, no-c-format
+msgid "Define a default error message"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:54
+#, no-c-format
+msgid "The constraint annotation"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:56
+#, no-c-format
+msgid ""
+"Let's write a constraint annotation, that can be used to express that a "
+"given string shall either be upper case or lower case. We'll apply it later "
+"on to the <property>licensePlate</property> field of the <classname>Car</"
+"classname> class from <xref linkend=\"validator-gettingstarted\"/> to "
+"ensure, that the field is always an upper-case string."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:63
+#, no-c-format
+msgid ""
+"First we need a way to express the two case modes. We might use "
+"<classname>String</classname> constants, but a better way to go is to use a "
+"Java 5 enum for that purpose:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:68
+#, no-c-format
+msgid "Enum <classname>CaseMode</classname> to express upper vs. lower case"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:71
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"public enum CaseMode {\n"
+"    UPPER, \n"
+"    LOWER;\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:74
+#, no-c-format
+msgid ""
+"Now we can define the actual constraint annotation. If you've never designed "
+"an annotation before, this may look a bit scary, but actually it's not that "
+"hard:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:79
+#, no-c-format
+msgid "Defining CheckCase constraint annotation"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:81
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import static java.lang.annotation.ElementType.*;\n"
+"import static java.lang.annotation.RetentionPolicy.*;\n"
+"\n"
+"import java.lang.annotation.Documented;\n"
+"import java.lang.annotation.Retention;\n"
+"import java.lang.annotation.Target;\n"
+"\n"
+"import javax.validation.Constraint;\n"
+"import javax.validation.Payload;\n"
+"\n"
+"@Target( { METHOD, FIELD, ANNOTATION_TYPE })\n"
+"@Retention(RUNTIME)\n"
+"@Constraint(validatedBy = CheckCaseValidator.class)\n"
+"@Documented\n"
+"public @interface CheckCase {\n"
+"\n"
+"    String message() default \"{com.mycompany.constraints.checkcase}\";\n"
+"\n"
+"    Class&lt;?&gt;[] groups() default {};\n"
+"\n"
+"    Class&lt;? extends Payload&gt;[] payload() default {};\n"
+"    \n"
+"    CaseMode value();\n"
+"\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:84
+#, no-c-format
+msgid ""
+"An annotation type is defined using the <code>@interface</code> keyword. All "
+"attributes of an annotation type are declared in a method-like manner. The "
+"specification of the Bean Validation API demands, that any constraint "
+"annotation defines"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:91
+#, no-c-format
+msgid ""
+"an attribute <property>message</property> that returns the default key for "
+"creating error messages in case the constraint is violated"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:97
+#, no-c-format
+msgid ""
+"an attribute <property>groups</property> that allows the specification of "
+"validation groups, to which this constraint belongs (see <xref linkend="
+"\"validator-usingvalidator-validationgroups\"/>). This must default to an "
+"empty array of type <classname>Class&lt;?&gt;</classname>."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:105
+#, no-c-format
+msgid ""
+"an attribute <classname>payload</classname> that can be used by clients of "
+"the Bean Validation API to assign custom payload objects to a constraint. "
+"This attribute is not used by the API itself."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:109
+#, no-c-format
+msgid "An example for a custom payload could be the definition of a severity."
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:112
+#, no-c-format
+msgid ""
+"public class Severity {\n"
+"    public static class Info extends Payload {};\n"
+"    public static class Error extends Payload {};\n"
+"}\n"
+"\n"
+"public class ContactDetails {\n"
+"    @NotNull(message=\"Name is mandatory\", payload=Severity.Error.class)\n"
+"    private String name;\n"
+"\n"
+"    @NotNull(message=\"Phone number not specified, but not mandatory\", "
+"payload=Severity.Info.class)\n"
+"    private String phoneNumber;\n"
+"\n"
+"    // ...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:114
+#, no-c-format
+msgid ""
+"Now a client can after the validation of a <classname>ContactDetails</"
+"classname> instance access the severity of a constraint using "
+"<methodname>ConstraintViolation.getConstraintDescriptor().getPayload()</"
+"methodname> and adjust its behaviour depending on the severity."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:123
+#, no-c-format
+msgid ""
+"Besides those three mandatory attributes (<property>message</property>, "
+"<property>groups</property> and <property>payload</property>) we add another "
+"one allowing for the required case mode to be specified. The name "
+"<property>value</property> is a special one, which can be omitted upon using "
+"the annotation, if it is the only attribute specified, as e.g. in "
+"<code>@CheckCase(CaseMode.UPPER)</code>."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:131
+#, no-c-format
+msgid ""
+"In addition we annotate the annotation type with a couple of so-called meta "
+"annotations:"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:136
+#, no-c-format
+msgid ""
+"<code>@Target({ METHOD, FIELD, ANNOTATION_TYPE })</code>: Says, that "
+"methods, fields and annotation declarations may be annotated with @CheckCase "
+"(but not type declarations e.g.)"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:142
+#, no-c-format
+msgid ""
+"<code>@Retention(RUNTIME)</code>: Specifies, that annotations of this type "
+"will be available at runtime by the means of reflection"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:148
+#, no-c-format
+msgid ""
+"<code>@Constraint(validatedBy = CheckCaseValidator.class)</code>: Specifies "
+"the validator to be used to validate elements annotated with @CheckCase"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:154
+#, no-c-format
+msgid ""
+"<code>@Documented</code>: Says, that the use of <code>@CheckCase</code> will "
+"be contained in the JavaDoc of elements annotated with it"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:162
+#, no-c-format
+msgid "The constraint validator"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:165
+#, no-c-format
+msgid ""
+"Next, we need to implement a constraint validator, that's able to validate "
+"elements with a <classname>@CheckCase</classname> annotation. To do so, we "
+"implement the interface ConstraintValidator as shown below:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:171
+#, no-c-format
+msgid ""
+"Implementing a constraint validator for the constraint <classname>CheckCase</"
+"classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:174
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.ConstraintValidator;\n"
+"import javax.validation.ConstraintValidatorContext;\n"
+"\n"
+"public class CheckCaseValidator implements ConstraintValidator&lt;CheckCase, "
+"String&gt; {\n"
+"\n"
+"    private CaseMode caseMode;\n"
+"\n"
+"    public void initialize(CheckCase constraintAnnotation) {\n"
+"        this.caseMode = constraintAnnotation.value();\n"
+"    }\n"
+"\n"
+"    public boolean isValid(String object, ConstraintValidatorContext "
+"constraintContext) {\n"
+"\n"
+"        if (object == null)\n"
+"            return true;\n"
+"\n"
+"        if (caseMode == CaseMode.UPPER)\n"
+"            return object.equals(object.toUpperCase());\n"
+"        else\n"
+"            return object.equals(object.toLowerCase());\n"
+"    }\n"
+"\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:177
+#, no-c-format
+msgid ""
+"The <classname>ConstraintValidator</classname> interface defines two type "
+"parameters, which we set in our implementation. The first one specifies the "
+"annotation type to be validated (in our example <classname>CheckCase</"
+"classname>), the second one the type of elements, which the validator can "
+"handle (here <classname>String</classname>)."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:184
+#, no-c-format
+msgid ""
+"In case a constraint annotation is allowed at elements of different types, a "
+"<classname>ConstraintValidator</classname> for each allowed type has to be "
+"implemented and registered at the constraint annotation as shown above."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:189
+#, no-c-format
+msgid ""
+"The implementation of the validator is straightforward. The "
+"<methodname>initialize()</methodname> method gives us access to the "
+"attribute values of the annotation to be validated. In the example we store "
+"the <classname>CaseMode</classname> in a field of the validator for further "
+"usage."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:195
+#, no-c-format
+msgid ""
+"In the <methodname>isValid()</methodname> method we implement the logic, "
+"that determines, whether a <classname>String</classname> is valid according "
+"to a given <classname>@CheckCase</classname> annotation or not. This "
+"decision depends on the case mode retrieved in <classname>initialize()</"
+"classname>. As the Bean Validation specification recommends, we consider "
+"<code>null</code> values as being valid. If <code>null</code> is not a valid "
+"value for an element, it should be annotated with <code>@NotNull</code> "
+"explicitly."
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:205
+#, no-c-format
+msgid "The ConstraintValidatorContext"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:207
+#, no-c-format
+msgid ""
+"relies on the default error message generation by just returning "
+"<constant>true</constant> or <constant>false</constant> from the "
+"<methodname>isValid</methodname> call. Using the passed "
+"<classname>ConstraintValidatorContext</classname> object it is possible to "
+"either add additional error messages or completely disable the default error "
+"message generation and solely define custom error messages. The "
+"<classname>ConstraintValidatorContext</classname> API is modeled as fluent "
+"interface and is best demonstrated with an example:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:219
+#, no-c-format
+msgid "Use of ConstraintValidatorContext to define custom error messages"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:222
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.ConstraintValidator;\n"
+"import javax.validation.ConstraintValidatorContext;\n"
+"\n"
+"public class CheckCaseValidator implements ConstraintValidator&lt;CheckCase, "
+"String&gt; {\n"
+"\n"
+"    private CaseMode caseMode;\n"
+"\n"
+"    public void initialize(CheckCase constraintAnnotation) {\n"
+"        this.caseMode = constraintAnnotation.value();\n"
+"    }\n"
+"\n"
+"    public boolean isValid(String object, ConstraintValidatorContext "
+"constraintContext) {\n"
+"\n"
+"        if (object == null)\n"
+"            return true;\n"
+"        \n"
+"        boolean isValid;\n"
+"        if (caseMode == CaseMode.UPPER) {\n"
+"            isValid = object.equals(object.toUpperCase());\n"
+"        }\n"
+"        else {\n"
+"            isValid = object.equals(object.toLowerCase());\n"
+"        }\n"
+"        \n"
+"        if(!isValid) {\n"
+"            constraintContext.disableDefaultConstraintViolation();\n"
+"            constraintContext.buildConstraintViolationWithTemplate( \"{com."
+"mycompany.constraints.CheckCase.message}\"  ).addConstraintViolation();\n"
+"        }\n"
+"        return result;\n"
+"    }\n"
+"\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:225
+#, no-c-format
+msgid ""
+"shows how you can disable the default error message generation and add a "
+"custom error message using a specified message template. In this example the "
+"use of the <classname>ConstraintValidatorContext</classname> results in the "
+"same error message as the default error message generation."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:231
+#, no-c-format
+msgid ""
+"It is important to end each new constraint violation with "
+"<methodname>addConstraintViolation</methodname>. Only after that the new "
+"constraint violation will be created."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:236
+#, no-c-format
+msgid ""
+"In case you are implementing a <classname>ConstraintValidator</classname> a "
+"class level constraint it is also possible to adjust set the property path "
+"for the created constraint violations. This is important for the case where "
+"you validate multiple properties of the class or even traverse the object "
+"graph. A custom property path creation could look like <xref linkend="
+"\"example-custom-error\"/>."
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:245
+#, no-c-format
+msgid ""
+"Adding new <classname>ConstraintViolation</classname> with custom property "
+"path"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:248
+#, no-c-format
+msgid ""
+"public boolean isValid(Group group, ConstraintValidatorContext "
+"constraintValidatorContext) {\n"
+"    boolean isValid = false;\n"
+"    ...\n"
+"\n"
+"    if(!isValid) {\n"
+"        constraintValidatorContext\n"
+"            .buildConstraintViolationWithTemplate( \"{my.custom.template}"
+"\" )\n"
+"            .addNode( \"myProperty\" ).addConstraintViolation();\n"
+"    }\n"
+"    return isValid;\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:254
+#, no-c-format
+msgid "The error message"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:256
+#, no-c-format
+msgid ""
+"Finally we need to specify the error message, that shall be used, in case a "
+"<classname>@CheckCase</classname> constraint is violated. To do so, we add "
+"the following to our custom <filename>ValidationMessages.properties</"
+"filename> (see also <xref linkend=\"section-message-interpolation\"/>)"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:263
+#, no-c-format
+msgid ""
+"Defining a custom error message for the <classname>CheckCase</classname> "
+"constraint"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:266
+#, no-c-format
+msgid "com.mycompany.constraints.CheckCase.message=Case mode must be {value}."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:269
+#, no-c-format
+msgid ""
+"If a validation error occurs, the validation runtime will use the default "
+"value, that we specified for the message attribute of the "
+"<classname>@CheckCase</classname> annotation to look up the error message in "
+"this file."
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:276
+#, no-c-format
+msgid "Using the constraint"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:278
+#, no-c-format
+msgid ""
+"Now that our first custom constraint is completed, we can use it in the "
+"<classname>Car</classname> class from the <xref linkend=\"validator-"
+"gettingstarted\"/> chapter to specify that the <property>licensePlate</"
+"property> field shall only contain upper-case strings:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:285
+#, no-c-format
+msgid "Applying the <classname>CheckCase</classname> constraint"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:288
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.constraints.Min;\n"
+"import javax.validation.constraints.NotNull;\n"
+"import javax.validation.constraints.Size;\n"
+"\n"
+"public class Car {\n"
+"\n"
+"    @NotNull\n"
+"    private String manufacturer;\n"
+"\n"
+"    @NotNull\n"
+"    @Size(min = 2, max = 14)\n"
+"    @CheckCase(CaseMode.UPPER)\n"
+"    private String licensePlate;\n"
+"\n"
+"    @Min(2)\n"
+"    private int seatCount;\n"
+"    \n"
+"    public Car(String manufacturer, String licencePlate, int seatCount) {\n"
+"\n"
+"        this.manufacturer = manufacturer;\n"
+"        this.licensePlate = licencePlate;\n"
+"        this.seatCount = seatCount;\n"
+"    }\n"
+"\n"
+"    //getters and setters ...\n"
+"\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:291
+#, no-c-format
+msgid ""
+"Finally let's demonstrate in a little test that the <classname>@CheckCase</"
+"classname> constraint is properly validated:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:296
+#, no-c-format
+msgid "Testcase demonstrating the <classname>CheckCase</classname> validation"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:299
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import static org.junit.Assert.*;\n"
+"\n"
+"import java.util.Set;\n"
+"\n"
+"import javax.validation.ConstraintViolation;\n"
+"import javax.validation.Validation;\n"
+"import javax.validation.Validator;\n"
+"import javax.validation.ValidatorFactory;\n"
+"\n"
+"import org.junit.BeforeClass;\n"
+"import org.junit.Test;\n"
+"\n"
+"public class CarTest {\n"
+"\n"
+"    private static Validator validator;\n"
+"\n"
+"    @BeforeClass\n"
+"    public static void setUp() {\n"
+"        ValidatorFactory factory = Validation.buildDefaultValidatorFactory"
+"();\n"
+"        validator = factory.getValidator();\n"
+"    }\n"
+"\n"
+"    @Test\n"
+"    public void testLicensePlateNotUpperCase() {\n"
+"\n"
+"        Car car = new Car(\"Morris\", \"dd-ab-123\", 4);\n"
+"\n"
+"        Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations =\n"
+"            validator.validate(car);\n"
+"        assertEquals(1, constraintViolations.size());\n"
+"        assertEquals(\n"
+"            \"Case mode must be UPPER.\", \n"
+"            constraintViolations.iterator().next().getMessage());\n"
+"    }\n"
+"\n"
+"    @Test\n"
+"    public void carIsValid() {\n"
+"\n"
+"        Car car = new Car(\"Morris\", \"DD-AB-123\", 4);\n"
+"\n"
+"        Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations =\n"
+"            validator.validate(car);\n"
+"\n"
+"        assertEquals(0, constraintViolations.size());\n"
+"    }\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:305
+#, no-c-format
+msgid "Constraint composition"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:307
+#, no-c-format
+msgid ""
+"Looking at the <property>licensePlate</property> field of the "
+"<classname>Car</classname> class in <xref linkend=\"example-car-with-"
+"checkcase\"/>, we see three constraint annotations already. In complexer "
+"scenarios, where even more constraints could be applied to one element, this "
+"might become a bit confusing easily. Furthermore, if we had a "
+"<property>licensePlate</property> field in another class, we would have to "
+"copy all constraint declarations to the other class as well, violating the "
+"DRY principle."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:316
+#, no-c-format
+msgid ""
+"This problem can be tackled using compound constraints. In the following we "
+"create a new constraint annotation <classname>@ValidLicensePlate</"
+"classname>, that comprises the constraints <classname>@NotNull</classname>, "
+"<classname>@Size</classname> and <classname>@CheckCase</classname>:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:323
+#, no-c-format
+msgid ""
+"Creating a composing constraint <classname>ValidLicensePlate</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:326
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import static java.lang.annotation.ElementType.*;\n"
+"import static java.lang.annotation.RetentionPolicy.*;\n"
+"\n"
+"import java.lang.annotation.Documented;\n"
+"import java.lang.annotation.Retention;\n"
+"import java.lang.annotation.Target;\n"
+"\n"
+"import javax.validation.Constraint;\n"
+"import javax.validation.Payload;\n"
+"import javax.validation.constraints.NotNull;\n"
+"import javax.validation.constraints.Size;\n"
+"\n"
+"@NotNull\n"
+"@Size(min = 2, max = 14)\n"
+"@CheckCase(CaseMode.UPPER)\n"
+"@Target( { METHOD, FIELD, ANNOTATION_TYPE })\n"
+"@Retention(RUNTIME)\n"
+"@Constraint(validatedBy = {})\n"
+"@Documented\n"
+"public @interface ValidLicensePlate {\n"
+"\n"
+"    String message() default \"{com.mycompany.constraints.validlicenseplate}"
+"\";\n"
+"\n"
+"    Class&lt;?&gt;[] groups() default {};\n"
+"\n"
+"    Class&lt;? extends Payload&gt;[] payload() default {};\n"
+"\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:329
+#, no-c-format
+msgid ""
+"To do so, we just have to annotate the constraint declaration with its "
+"comprising constraints (btw. that's exactly why we allowed annotation types "
+"as target for the <classname>@CheckCase</classname> annotation). As no "
+"additional validation is required for the <classname>@ValidLicensePlate</"
+"classname> annotation itself, we don't declare a validator within the "
+"<classname>@Constraint </classname>meta annotation."
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:337
+#, no-c-format
+msgid ""
+"Using the new compound constraint at the <property>licensePlate</property> "
+"field now is fully equivalent to the previous version, where we declared the "
+"three constraints directly at the field itself:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:343
+#, no-c-format
+msgid ""
+"Application of composing constraint <classname>ValidLicensePlate</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:346
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"public class Car {\n"
+"\n"
+"    @ValidLicensePlate\n"
+"    private String licensePlate;\n"
+"\n"
+"    //...\n"
+"\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: customconstraints.xml:349
+#, no-c-format
+msgid ""
+"The set of <classname>ConstraintViolations</classname> retrieved when "
+"validating a <classname>Car</classname> instance will contain an entry for "
+"each violated composing constraint of the <classname>@ValidLicensePlate</"
+"classname> constraint. If you rather prefer a single "
+"<classname>ConstraintViolation</classname> in case any of the composing "
+"constraints is violated, the <classname>@ReportAsSingleViolation</classname> "
+"meta constraint can be used as follows:"
+msgstr ""
+
+#. Tag: title
+#: customconstraints.xml:359
+#, no-c-format
+msgid "Usage of <classname>@ReportAsSingleViolation</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: customconstraints.xml:361
+#, no-c-format
+msgid ""
+"//...\n"
+"@ReportAsSingleViolation\n"
+"public @interface ValidLicensePlate {\n"
+"\n"
+"    String message() default \"{com.mycompany.constraints.validlicenseplate}"
+"\";\n"
+"\n"
+"    Class&lt;?&gt;[] groups() default {};\n"
+"\n"
+"    Class&lt;? extends Payload&gt;[] payload() default {};\n"
+"\n"
+"}"
+msgstr ""

Added: validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/furtherreading.po
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/furtherreading.po	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/furtherreading.po	2010-07-06 15:18:26 UTC (rev 19904)
@@ -0,0 +1,56 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-07-06 14:46+0000\n"
+"PO-Revision-Date: 2010-07-06 14:46+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: furtherreading.xml:25
+#, no-c-format
+msgid "Further reading"
+msgstr ""
+
+#. Tag: para
+#: furtherreading.xml:27
+#, no-c-format
+msgid ""
+"Last but not least, a few pointers to further information. A great source "
+"for examples is the Bean Validation TCK which can is available for anonymous "
+"access in the Hibernate <ulink url=\"http://anonsvn.jboss.org/repos/"
+"hibernate/validator/trunk\">SVN repository</ulink>. Alternatively you can "
+"view the tests using <ulink url=\"http://fisheye.jboss.org/browse/Hibernate/"
+"beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/"
+"tests\">Hibernate's fisheye</ulink> installation. <ulink url=\"http://jcp."
+"org/en/jsr/detail?id=303\">The JSR 303</ulink> specification itself is also "
+"a great way to deepen your understanding of Bean Validation resp. Hibernate "
+"Validator."
+msgstr ""
+
+#. Tag: para
+#: furtherreading.xml:38
+#, no-c-format
+msgid ""
+"If you have any further questions to Hibernate Validator or want to share "
+"some of your use cases have a look at the <ulink url=\"http://community."
+"jboss.org/en/hibernate/validator\">Hibernate Validator Wiki</ulink> and the "
+"<ulink url=\"https://forum.hibernate.org/viewforum.php?f=9\">Hibernate "
+"Validator Forum</ulink>."
+msgstr ""
+
+#. Tag: para
+#: furtherreading.xml:45
+#, no-c-format
+msgid ""
+"In case you would like to report a bug use <ulink url=\"http://opensource."
+"atlassian.com/projects/hibernate/browse/HV\">Hibernate's Jira</ulink> "
+"instance. Feedback is always welcome!"
+msgstr ""

Added: validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/gettingstarted.po
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/gettingstarted.po	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/gettingstarted.po	2010-07-06 15:18:26 UTC (rev 19904)
@@ -0,0 +1,415 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-07-06 14:46+0000\n"
+"PO-Revision-Date: 2010-07-06 14:46+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: gettingstarted.xml:25
+#, no-c-format
+msgid "Getting started"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:27
+#, no-c-format
+msgid ""
+"This chapter will show you how to get started with Hibernate Validator, the "
+"reference implementation (RI) of Bean Validation. For the following "
+"quickstart you need:"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:33
+#, no-c-format
+msgid "A JDK &gt;= 5"
+msgstr ""
+
+#. Tag: ulink
+#: gettingstarted.xml:37
+#, no-c-format
+msgid "Apache Maven"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:41
+#, no-c-format
+msgid "An Internet connection (Maven has to download all required libraries)"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:46
+#, no-c-format
+msgid ""
+"A properly configured remote repository. Add the following to your "
+"<filename>settings.xml</filename>: <example> <title>Configuring the JBoss "
+"Maven repository in <filename>settings.xml</filename></title> "
+"<programlisting>&lt;repositories&gt;\n"
+"    &lt;repository&gt;\n"
+"        &lt;id&gt;jboss&lt;/id&gt;\n"
+"        &lt;url&gt;http://repository.jboss.com/maven2&lt;/url&gt;\n"
+"        &lt;releases&gt;\n"
+"            &lt;enabled&gt;true&lt;/enabled&gt;\n"
+"        &lt;/releases&gt;\n"
+"        &lt;snapshots&gt;\n"
+"            &lt;enabled&gt;false&lt;/enabled&gt;\n"
+"        &lt;/snapshots&gt;\n"
+"    &lt;/repository&gt;\n"
+"&lt;/repositories&gt;</programlisting> </example>More information about "
+"<filename>settings.xml</filename> can be found in the <ulink url=\"http://"
+"maven.apache.org/ref/2.0.8/maven-settings/settings.html\">Maven Local "
+"Settings Model</ulink>."
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:60
+#, no-c-format
+msgid ""
+"Hibernate Validator uses JAXB for XML parsing. JAXB is part of the Java "
+"Class Library since Java 6 which means that if you run Hibernate Validator "
+"with Java 5 you will have to add additional JAXB dependencies. Using maven "
+"you have to add the following dependencies:<programlisting>&lt;"
+"dependency&gt;\n"
+"    &lt;groupId&gt;javax.xml.bind&lt;/groupId&gt;\n"
+"    &lt;artifactId&gt;jaxb-api&lt;/artifactId&gt;\n"
+"    &lt;version&gt;2.2&lt;/version&gt;\n"
+"&lt;/dependency&gt;\n"
+"&lt;dependency&gt;\n"
+"    &lt;groupId&gt;com.sun.xml.bind&lt;/groupId&gt;\n"
+"    &lt;artifactId&gt;jaxb-impl&lt;/artifactId&gt;\n"
+"    &lt;version&gt;2.1.12&lt;/version&gt;\n"
+"&lt;/dependency&gt;\n"
+"</programlisting> if you are using the SourceForge package you find the "
+"necessary libraries in the <filename>lib/jdk5</filename> directory. In case "
+"you are not using the XML configuration you can also disable it explicitly "
+"by calling <methodname>Configuration.ignoreXmlConfiguration()</methodname> "
+"during <classname>ValidationFactory</classname> creation. In this case the "
+"JAXB dependencies are not needed."
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:73
+#, no-c-format
+msgid "Setting up a new Maven project"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:75
+#, no-c-format
+msgid ""
+"Start by creating new Maven project using the Maven archetype plugin as "
+"follows:"
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:79
+#, no-c-format
+msgid ""
+"Using Maven's archetype plugin to create a sample project using Hibernate "
+"Validator"
+msgstr ""
+
+#. Tag: programlisting
+#: gettingstarted.xml:82
+#, no-c-format
+msgid ""
+"mvn archetype:create -DarchetypeGroupId=org.hibernate \\\n"
+"                     -DarchetypeArtifactId=hibernate-validator-quickstart-"
+"archetype \\\n"
+"                     -DarchetypeVersion=&version; \\\n"
+"                     -DgroupId=com.mycompany \n"
+"                     -DartifactId=hv-quickstart"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:85
+#, no-c-format
+msgid ""
+"Maven will create your project in the directory hv-quickstart. Change into "
+"this directory and run:"
+msgstr ""
+
+#. Tag: programlisting
+#: gettingstarted.xml:88
+#, no-c-format
+msgid "mvn test"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:88
+#, no-c-format
+msgid ""
+"Maven will compile the example code and run the implemented unit tests. "
+"Let's have a look at the actual code."
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:94
+#, no-c-format
+msgid "Applying constraints"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:96
+#, no-c-format
+msgid ""
+"Open the project in the IDE of your choice and have a look at the class "
+"<classname>Car</classname>:"
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:100
+#, no-c-format
+msgid "Class Car annotated with constraints"
+msgstr ""
+
+#. Tag: programlisting
+#: gettingstarted.xml:102
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.constraints.Min;\n"
+"import javax.validation.constraints.NotNull;\n"
+"import javax.validation.constraints.Size;\n"
+"\n"
+"public class Car {\n"
+"\n"
+"    @NotNull\n"
+"    private String manufacturer;\n"
+"\n"
+"    @NotNull\n"
+"    @Size(min = 2, max = 14)\n"
+"    private String licensePlate;\n"
+"\n"
+"    @Min(2)\n"
+"    private int seatCount;\n"
+"    \n"
+"    public Car(String manufacturer, String licencePlate, int seatCount) {\n"
+"        this.manufacturer = manufacturer;\n"
+"        this.licensePlate = licencePlate;\n"
+"        this.seatCount = seatCount;\n"
+"    }\n"
+"\n"
+"    //getters and setters ...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:105
+#, no-c-format
+msgid ""
+"<classname>@NotNull</classname>, <classname>@Size</classname> and "
+"<classname>@Min</classname> are so-called constraint annotations, that we "
+"use to declare constraints, which shall be applied to the fields of a "
+"<classname>Car</classname> instance:"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:112
+#, no-c-format
+msgid "<property>manufacturer</property> shall never be null"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:116
+#, no-c-format
+msgid ""
+"<property>licensePlate</property> shall never be null and must be between 2 "
+"and 14 characters long"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:121
+#, no-c-format
+msgid "<property>seatCount</property> shall be at least 2."
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:127
+#, no-c-format
+msgid "Validating constraints"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:129
+#, no-c-format
+msgid ""
+"To perform a validation of these constraints, we use a <classname>Validator</"
+"classname> instance. Let's have a look at the <classname>CarTest</classname> "
+"class:"
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:134
+#, no-c-format
+msgid "Class CarTest showing validation examples"
+msgstr ""
+
+#. Tag: programlisting
+#: gettingstarted.xml:136
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import static org.junit.Assert.*;\n"
+"\n"
+"import java.util.Set;\n"
+"\n"
+"import javax.validation.ConstraintViolation;\n"
+"import javax.validation.Validation;\n"
+"import javax.validation.Validator;\n"
+"import javax.validation.ValidatorFactory;\n"
+"\n"
+"import org.junit.BeforeClass;\n"
+"import org.junit.Test;\n"
+"\n"
+"public class CarTest {\n"
+"\n"
+"    private static Validator validator;\n"
+"\n"
+"    @BeforeClass\n"
+"    public static void setUp() {\n"
+"        ValidatorFactory factory = Validation.buildDefaultValidatorFactory"
+"();\n"
+"        validator = factory.getValidator();\n"
+"    }\n"
+"\n"
+"    @Test\n"
+"    public void manufacturerIsNull() {\n"
+"        Car car = new Car(null, \"DD-AB-123\", 4);\n"
+"\n"
+"        Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations =\n"
+"            validator.validate(car);\n"
+"\n"
+"        assertEquals(1, constraintViolations.size());\n"
+"        assertEquals(\"may not be null\", constraintViolations.iterator()."
+"next().getMessage());\n"
+"    }\n"
+"\n"
+"    @Test\n"
+"    public void licensePlateTooShort() {\n"
+"        Car car = new Car(\"Morris\", \"D\", 4);\n"
+"\n"
+"        Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations = \n"
+"            validator.validate(car);\n"
+"\n"
+"        assertEquals(1, constraintViolations.size());\n"
+"        assertEquals(\"size must be between 2 and 14\", constraintViolations."
+"iterator().next().getMessage());\n"
+"    }\n"
+"    \n"
+"    @Test\n"
+"    public void seatCountTooLow() {\n"
+"        Car car = new Car(\"Morris\", \"DD-AB-123\", 1);\n"
+"\n"
+"        Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations =\n"
+"            validator.validate(car);\n"
+"\n"
+"        assertEquals(1, constraintViolations.size());\n"
+"        assertEquals(\"must be greater than or equal to 2\", "
+"constraintViolations.iterator().next().getMessage());\n"
+"    }\n"
+"\n"
+"    @Test\n"
+"    public void carIsValid() {\n"
+"        Car car = new Car(\"Morris\", \"DD-AB-123\", 2);\n"
+"\n"
+"        Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations =\n"
+"            validator.validate(car);\n"
+"\n"
+"        assertEquals(0, constraintViolations.size());\n"
+"    }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:139
+#, no-c-format
+msgid ""
+"In the <methodname>setUp()</methodname> method we get a "
+"<classname>Validator</classname> instance from the "
+"<classname>ValidatorFactory</classname>. A <classname>Validator</classname> "
+"instance is thread-safe and may be reused multiple times. For this reason we "
+"store it as field of our test class. We can use the <classname>Validator</"
+"classname> now to validate the different car instances in the test methods."
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:147
+#, no-c-format
+msgid ""
+"The <methodname>validate()</methodname> method returns a set of "
+"<classname>ConstraintViolation</classname> instances, which we can iterate "
+"in order to see which validation errors occurred. The first three test "
+"methods show some expected constraint violations:"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:154
+#, no-c-format
+msgid ""
+"The <classname>@NotNull</classname> constraint on manufacturer is violated "
+"in <methodname>manufacturerIsNull()</methodname>"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:159
+#, no-c-format
+msgid ""
+"The <classname>@Size</classname> constraint on licensePlate is violated in "
+"<methodname>licensePlateTooShort()</methodname>"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:164
+#, no-c-format
+msgid ""
+"The <classname>@Min</classname> constraint on seatCount is violated in "
+"<methodname>seatCountTooLow()</methodname>"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:169
+#, no-c-format
+msgid ""
+"If the object validates successfully, <methodname>validate()</methodname> "
+"returns an empty set."
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:172
+#, no-c-format
+msgid ""
+"Note that we only use classes from the package <package>javax.validation</"
+"package> from the Bean Validation 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."
+msgstr ""
+
+#. Tag: title
+#: gettingstarted.xml:180
+#, no-c-format
+msgid "Where to go next?"
+msgstr ""
+
+#. Tag: para
+#: gettingstarted.xml:182
+#, no-c-format
+msgid ""
+"That concludes our 5 minute tour through the world of Hibernate Validator. "
+"Continue exploring the code examples or look at further examples referenced "
+"in <xref linkend=\"chapter-further-reading\"/>. To deepen your understanding "
+"of Hibernate Validator just continue reading <xref linkend=\"validator-"
+"usingvalidator\"/>. In case your application has specific validation "
+"requirements have a look at <xref linkend=\"validator-customconstraints\"/>."
+msgstr ""

Added: validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/integration.po
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/integration.po	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/integration.po	2010-07-06 15:18:26 UTC (rev 19904)
@@ -0,0 +1,274 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-07-06 14:46+0000\n"
+"PO-Revision-Date: 2010-07-06 14:46+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: integration.xml:25
+#, no-c-format
+msgid "Integration with other frameworks"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:27
+#, no-c-format
+msgid ""
+"Hibernate Validator is intended to be used to implement multi-layered data "
+"validation, where constraints are expressed in a single place (the annotated "
+"domain model) and checked in various different layers of the application."
+msgstr ""
+
+#. Tag: title
+#: integration.xml:33
+#, no-c-format
+msgid "OSGi"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:35
+#, no-c-format
+msgid ""
+"The Hibernate Validator jar file is conform to the OSGi specification and "
+"can be used within any OSGi container. The classes in the following packages "
+"are exported by Hibernate Validator and are considered part of the public "
+"API - <package>org.hibernate.validator</package>, <package>org.hibernate."
+"validator.constraints</package>, <package>org.hibernate.validator."
+"messageinterpolation</package> and <package>org.hibernate.validator."
+"resourceloading</package>."
+msgstr ""
+
+#. Tag: title
+#: integration.xml:46
+#, no-c-format
+msgid "Database schema-level validation"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:48
+#, no-c-format
+msgid ""
+"Out of the box, Hibernate Annotations (as of Hibernate 3.5.x) will translate "
+"the constraints you have defined for your entities into mapping metadata. "
+"For example, if a property of your entity is annotated <literal>@NotNull</"
+"literal>, its columns will be declared as <literal>not null</literal> in the "
+"DDL schema generated by Hibernate."
+msgstr ""
+
+#. Tag: para
+#: integration.xml:54
+#, no-c-format
+msgid ""
+"If, for some reason, the feature needs to be disabled, set "
+"<literal>hibernate.validator.apply_to_ddl</literal> to <literal>false</"
+"literal>. See also <xref linkend=\"table-builtin-constraints\"/>."
+msgstr ""
+
+#. Tag: para
+#: integration.xml:59
+#, no-c-format
+msgid ""
+"You can also limit the DDL constraint generation to a subset of the defined "
+"constraints by setting the property <property>org.hibernate.validator.group."
+"ddl</property>. The property specifies the comma-separated, fully specified "
+"class names of the groups a constraint has to be part of in order to be "
+"considered for DDL schema generation."
+msgstr ""
+
+#. Tag: title
+#: integration.xml:68
+#, no-c-format
+msgid "ORM integration"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:70
+#, no-c-format
+msgid ""
+"Hibernate Validator integrates with both Hibernate and all pure Java "
+"Persistence providers."
+msgstr ""
+
+#. Tag: title
+#: integration.xml:74
+#, no-c-format
+msgid "Hibernate event-based validation"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:76
+#, no-c-format
+msgid ""
+"Hibernate Validator has a built-in Hibernate event listener - <ulink url="
+"\"http://fisheye.jboss.org/browse/Hibernate/core/trunk/annotations/src/main/"
+"java/org/hibernate/cfg/beanvalidation/BeanValidationEventListener.java"
+"\"><classname>org.hibernate.cfg.beanvalidation.BeanValidationEventListener</"
+"classname></ulink> - which is part of Hibernate Annotations (as of Hibernate "
+"3.5.x). Whenever a <literal>PreInsertEvent</literal>, "
+"<literal>PreUpdateEvent</literal> or <classname>PreDeleteEvent</classname> "
+"occurs, the listener will verify all constraints of the entity instance and "
+"throw an exception if any constraint is violated. Per default objects will "
+"be checked before any inserts or updates are made by Hibernate. Pre deletion "
+"events will per default not trigger a validation. You can configure the "
+"groups to be validated per event type using the properties <property>javax."
+"persistence.validation.group.pre-persist</property>, <property>javax."
+"persistence.validation.group.pre-update</property> and <property>javax."
+"persistence.validation.group.pre-remove</property>. The values of these "
+"properties are the comma-separated, fully specified class names of the "
+"groups to validate. <xref linkend=\"example-beanvalidationeventlistener-"
+"config\"/> shows the default values for these properties. In this case they "
+"could also be omitted."
+msgstr ""
+
+#. Tag: para
+#: integration.xml:97
+#, no-c-format
+msgid ""
+"On constraint violation, the event will raise a runtime "
+"<classname>ConstraintViolationException</classname> which contains a set of "
+"<literal>ConstraintViolation</literal>s describing each failure."
+msgstr ""
+
+#. Tag: para
+#: integration.xml:102
+#, no-c-format
+msgid ""
+"If Hibernate Validator is present in the classpath, Hibernate Annotations "
+"(or Hibernate EntityManager) will use it transparently. To avoid validation "
+"even though Hibernate Validator is in the classpath set <property>javax."
+"persistence.validation.mode</property> to <constant>none</constant>."
+msgstr ""
+
+#. Tag: para
+#: integration.xml:109
+#, no-c-format
+msgid ""
+"If the beans are not annotated with validation annotations, there is no "
+"runtime performance cost."
+msgstr ""
+
+#. Tag: para
+#: integration.xml:113
+#, no-c-format
+msgid ""
+"In case you need to manually set the event listeners for Hibernate Core, use "
+"the following configuration in <literal>hibernate.cfg.xml</literal>:"
+msgstr ""
+
+#. Tag: title
+#: integration.xml:118
+#, no-c-format
+msgid ""
+"Manual configuration of <classname>BeanValidationEvenListener</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: integration.xml:121
+#, no-c-format
+msgid ""
+"&lt;hibernate-configuration&gt;\n"
+"    &lt;session-factory&gt;\n"
+"       ...\n"
+"       &lt;property name=\"javax.persistence.validation.group.pre-persist"
+"\"&gt;javax.validation.groups.Default&lt;/property&gt;\n"
+"       &lt;property name=\"javax.persistence.validation.group.pre-update"
+"\"&gt;javax.validation.groups.Default&lt;/property&gt;\n"
+"       &lt;property name=\"javax.persistence.validation.group.pre-remove"
+"\"&gt;&lt;/property&gt;\n"
+"       ...\n"
+"       &lt;event type=\"pre-update\"&gt;\n"
+"         &lt;listener class=\"org.hibernate.cfg.beanvalidation."
+"BeanValidationEventListener\"/&gt;\n"
+"       &lt;/event&gt;\n"
+"       &lt;event type=\"pre-insert\"&gt;\n"
+"         &lt;listener class=\"org.hibernate.cfg.beanvalidation."
+"BeanValidationEventListener\"/&gt;\n"
+"       &lt;/event&gt;\n"
+"       &lt;event type=\"pre-delete\"&gt;\n"
+"         &lt;listener class=\"org.hibernate.cfg.beanvalidation."
+"BeanValidationEventListener\"/&gt;\n"
+"       &lt;/event&gt;\n"
+"    &lt;/session-factory&gt;\n"
+"&lt;/hibernate-configuration&gt;"
+msgstr ""
+
+#. Tag: title
+#: integration.xml:126
+#, no-c-format
+msgid "<title>JPA</title>"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:128
+#, no-c-format
+msgid ""
+"If you are using JPA 2 and Hibernate Validator is in the classpath the JPA2 "
+"specification requires that Bean Validation gets enabled. The properties "
+"<property>javax.persistence.validation.group.pre-persist</property>, "
+"<property>javax.persistence.validation.group.pre-update</property> and "
+"<property>javax.persistence.validation.group.pre-remove</property> as "
+"described in <xref linkend=\"validator-checkconstraints-orm-hibernateevent\"/"
+"> can in this case be configured in <filename>persistence.xml</filename>. "
+"<filename>persistence.xml</filename> also defines a node validation-mode "
+"while can be set to <constant>AUTO</constant>, <constant>CALLBACK</"
+"constant>, <constant>NONE</constant>. The default is <constant>AUTO</"
+"constant>."
+msgstr ""
+
+#. Tag: para
+#: integration.xml:142
+#, no-c-format
+msgid ""
+"In a JPA 1 you will have to create and register Hibernate Validator "
+"yourself. In case you are using Hibernate EntityManager you can add a "
+"customized version of the <classname>BeanValidationEventListener</classname> "
+"described in <xref linkend=\"validator-checkconstraints-orm-hibernateevent\"/"
+"> to your project and register it manually."
+msgstr ""
+
+#. Tag: title
+#: integration.xml:152
+#, no-c-format
+msgid "Presentation layer validation"
+msgstr ""
+
+#. Tag: para
+#: integration.xml:154
+#, no-c-format
+msgid ""
+"When working with JSF2 or <productname>JBoss Seam</productname> and "
+"Hibernate Validator (Bean Validation) is present in the runtime environment "
+"validation is triggered for every field in the application. <xref linkend="
+"\"example-jsf2\"/> shows an example of the f:validateBean tag in a JSF page. "
+"For more information refer to the Seam documentation or the JSF 2 "
+"specification."
+msgstr ""
+
+#. Tag: title
+#: integration.xml:162
+#, no-c-format
+msgid "Usage of Bean Validation within JSF2"
+msgstr ""
+
+#. Tag: programlisting
+#: integration.xml:164
+#, no-c-format
+msgid ""
+"&lt;h:form&gt;\n"
+"  <emphasis role=\"bold\">&lt;f:validateBean&gt;</emphasis>\n"
+"    &lt;h:inputText value=”#{model.property}” /&gt;\n"
+"    &lt;h:selectOneRadio value=”#{model.radioProperty}” &gt; ... &lt;/h:"
+"selectOneRadio&gt;\n"
+"    &lt;!-- other input components here --&gt;\n"
+"  <emphasis role=\"bold\">&lt;/f:validateBean&gt;</emphasis>\n"
+"&lt;/h:form&gt;"
+msgstr ""

Added: validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/preface.po
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/preface.po	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/preface.po	2010-07-06 15:18:26 UTC (rev 19904)
@@ -0,0 +1,52 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-07-06 14:46+0000\n"
+"PO-Revision-Date: 2010-07-06 14:46+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: preface.xml:25
+#, no-c-format
+msgid "Preface"
+msgstr ""
+
+#. Tag: para
+#: preface.xml:27
+#, no-c-format
+msgid ""
+"Validating data is a common task that occurs throughout any application, "
+"from the presentation layer to the persistence layer. Often the same "
+"validation logic is implemented in each layer, proving time consuming and "
+"error-prone. To avoid duplication of these validations in each layer, "
+"developers often bundle validation logic directly into the domain model, "
+"cluttering domain classes with validation code which is really metadata "
+"about the class itself."
+msgstr ""
+
+#. Tag: para
+#: preface.xml:46
+#, no-c-format
+msgid ""
+"JSR 303 - Bean Validation - defines a metadata model and API for entity "
+"validation. The default metadata source is annotations, with the ability to "
+"override and extend the meta-data through the use of XML. The API is not "
+"tied to a specific application tier or programming model. It is specifically "
+"not tied to either the web tier or the persistence tier, and is available "
+"for both server-side application programming, as well as rich client Swing "
+"application developers."
+msgstr ""
+
+#. Tag: para
+#: preface.xml:65
+#, no-c-format
+msgid "Hibernate Validator is the reference implementation of this JSR."
+msgstr ""

Added: validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/programmaticapi.po
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/programmaticapi.po	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/programmaticapi.po	2010-07-06 15:18:26 UTC (rev 19904)
@@ -0,0 +1,163 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-07-06 14:46+0000\n"
+"PO-Revision-Date: 2010-07-06 14:46+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: programmaticapi.xml:25 programmaticapi.xml:48
+#, no-c-format
+msgid "Programmatic constraint definition"
+msgstr ""
+
+#. Tag: para
+#: programmaticapi.xml:28
+#, no-c-format
+msgid ""
+"Use of the features described in the following sections is not portable "
+"between Bean Validation providers/implementations."
+msgstr ""
+
+#. Tag: para
+#: programmaticapi.xml:32
+#, no-c-format
+msgid ""
+"Hibernate Validator allows to configure constraints not only via annotations "
+"and xml, but also via a programmatic API. This API can be used exclusively "
+"or in combination with annotations and xml. If used in combination "
+"programmatic constraints are additive to otherwise configured constraints."
+msgstr ""
+
+#. Tag: para
+#: programmaticapi.xml:38
+#, no-c-format
+msgid ""
+"The programmatic API is centered around the <classname>ConstraintMapping</"
+"classname> class which can be found together with its supporting classes in "
+"the <package>org.hibernate.validator.cfg</package> package. "
+"<classname>ConstraintMapping</classname> is the entry point to a fluent API "
+"allowing the definition of constraints. <xref lang=\"\" linkend=\"example-"
+"constraint-mapping\"/> shows how the API can be used."
+msgstr ""
+
+#. Tag: programlisting
+#: programmaticapi.xml:50
+#, no-c-format
+msgid ""
+"ConstraintMapping mapping = new ConstraintMapping();\n"
+"mapping.type( Car.class )\n"
+"    .property( \"manufacturer\", FIELD )\n"
+"        .constraint( NotNullDef.class )\n"
+"    .property( \"licensePlate\", FIELD )\n"
+"        .constraint( NotNullDef.class )\n"
+"        .constraint( SizeDef.class )\n"
+"            .min( 2 )\n"
+"            .max( 14 )\n"
+"    .property( \"seatCount\", FIELD )\n"
+"        .constraint( MinDef.class )\n"
+"            .value ( 2 )\n"
+".type( RentalCar.class )\n"
+"    .property( \"rentalStation\", METHOD)\n"
+"        .constraint( NotNullDef.class );"
+msgstr ""
+
+#. Tag: para
+#: programmaticapi.xml:53
+#, no-c-format
+msgid ""
+"As you can see you can configure constraints on multiple classes and "
+"properties using method chaining. The constraint definition classes "
+"<classname>NotNullDef</classname>, <classname>SizeDef</classname> and "
+"<classname>MinDef</classname> are helper classes which allow to configure "
+"constraint parameters in a type-safe fashion. Definition classes exists for "
+"all built-in constraints in the <classname>org.hibernate.validator.cfg.defs</"
+"classname> package. For a custom constraint you can either create your own "
+"definition class extending <classname>ConstraintDef</classname> or you can "
+"use <classname>GenericConstraintDef</classname> as seen in <xref linkend="
+"\"example-generic-constraint-mapping\"/>."
+msgstr ""
+
+#. Tag: title
+#: programmaticapi.xml:66
+#, no-c-format
+msgid ""
+"Programmatic constraint definition using <classname>GenericConstraintDef</"
+"classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: programmaticapi.xml:69
+#, no-c-format
+msgid ""
+"ConstraintMapping mapping = new ConstraintMapping();\n"
+"mapping.type( Car.class )\n"
+"    .property( \"licensePlate\", FIELD )\n"
+"        .constraint( GenericConstraintDef.class )\n"
+"            .constraintType( CheckCase.class )\n"
+"            .param( \"value\", CaseMode.UPPER );"
+msgstr ""
+
+#. Tag: para
+#: programmaticapi.xml:72
+#, no-c-format
+msgid ""
+"Last but not least, you can also define cascading constraints as well as the "
+"default group sequence of an entity."
+msgstr ""
+
+#. Tag: title
+#: programmaticapi.xml:76
+#, no-c-format
+msgid "Cascading constraints and group redefinition"
+msgstr ""
+
+#. Tag: programlisting
+#: programmaticapi.xml:78
+#, no-c-format
+msgid ""
+"ConstraintMapping mapping = new ConstraintMapping();\n"
+"mapping.type( Car.class )\n"
+"    .valid( \"driver\", FIELD )\n"
+".type( RentalCar.class)\n"
+"    .defaultGroupSequence( RentalCar.class, CarChecks.class );"
+msgstr ""
+
+#. Tag: para
+#: programmaticapi.xml:81
+#, no-c-format
+msgid ""
+"Once you have your <classname>ConstraintMapping</classname> you will have to "
+"pass it to the configuration. Since the programmatic configuration is not "
+"part of the official Bean Validation specification you will have to get hold "
+"of the Hibernate Validator specific configuration instance. See <xref "
+"linkend=\"example-hibernate-specific-config\"/>."
+msgstr ""
+
+#. Tag: title
+#: programmaticapi.xml:88
+#, no-c-format
+msgid "Creating a Hibernate Validator specific configuration"
+msgstr ""
+
+#. Tag: programlisting
+#: programmaticapi.xml:90
+#, no-c-format
+msgid ""
+"ConstraintMapping mapping = new ConstraintMapping();\n"
+"// configure mapping instance\n"
+"\n"
+"HibernateValidatorConfiguration config = Validation.byProvider"
+"( HibernateValidator.class ).configure();\n"
+"config.addMapping( mapping );\n"
+"ValidatorFactory factory = config.buildValidatorFactory();\n"
+"Validator validator = factory.getValidator();"
+msgstr ""

Added: validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/usingvalidator.po
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/usingvalidator.po	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/usingvalidator.po	2010-07-06 15:18:26 UTC (rev 19904)
@@ -0,0 +1,1946 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-07-06 14:46+0000\n"
+"PO-Revision-Date: 2010-07-06 14:46+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: usingvalidator.xml:25
+#, no-c-format
+msgid "Validation step by step"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:27
+#, no-c-format
+msgid ""
+"In this chapter we will see in more detail how to use Hibernate Validator to "
+"validate constraints for a given entity model. We will also learn which "
+"default constraints the Bean Validation specification provides and which "
+"additional constraints are only provided by Hibernate Validator. Let's start "
+"with how to add constraints to an entity."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:34
+#, no-c-format
+msgid "Defining constraints"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:36
+#, no-c-format
+msgid ""
+"Constraints in Bean Validation are expressed via Java annotations. In this "
+"section we show how to annotate an object model with these annotations. We "
+"have to differentiate between three different type of constraint annotations "
+"- field-, property-, and class-level annotations."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:43
+#, no-c-format
+msgid ""
+"Not all constraints can be placed on all of these levels. In fact, none of "
+"the default constraints defined by Bean Validation can be placed at class "
+"level. The <classname>java.lang.annotation.Target</classname> annotation in "
+"the constraint annotation itself determines on which elements a constraint "
+"can be placed. See <xref linkend=\"validator-customconstraints\"/> for more "
+"information."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:52
+#, no-c-format
+msgid "Field-level constraints"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:54
+#, no-c-format
+msgid ""
+"Constraints can be expressed by annotating a field of a class. <xref linkend="
+"\"example-field-level\"/> shows a field level configuration example:"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:59
+#, no-c-format
+msgid "Field level constraint"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:61
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.constraints.NotNull;\n"
+"\n"
+"public class Car {\n"
+"\n"
+"    @NotNull\n"
+"    private String manufacturer;\n"
+"\n"
+"    @AssertTrue\n"
+"    private boolean isRegistered;\n"
+"\n"
+"    public Car(String manufacturer, boolean isRegistered) {\n"
+"        super();\n"
+"        this.manufacturer = manufacturer;\n"
+"        this.isRegistered = isRegistered;\n"
+"    }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:64
+#, no-c-format
+msgid ""
+"When using field level constraints field access strategy is used to access "
+"the value to be validated. This means the bean validation provider directly "
+"accesses the instance variable and does not invoke the property accessor "
+"method also if such a method exists."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:70
+#, no-c-format
+msgid "The access type (private, protected or public) does not matter."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:75
+#, no-c-format
+msgid "Static fields and properties cannot be validated."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:80
+#, no-c-format
+msgid "Property-level constraints"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:82
+#, no-c-format
+msgid ""
+"If your model class adheres to the <ulink type=\"\" url=\"http://java.sun."
+"com/javase/technologies/desktop/javabeans/index.jsp\">JavaBeans</ulink> "
+"standard, it is also possible to annotate the properties of a bean class "
+"instead of its fields. <xref linkend=\"example-property-level\"/> uses the "
+"same entity as in <xref linkend=\"example-field-level\"/>, however, property "
+"level constraints are used."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:88
+#, no-c-format
+msgid "The property's getter method has to be annotated, not its setter."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:93
+#, no-c-format
+msgid "Property level constraint"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:95
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.constraints.AssertTrue;\n"
+"import javax.validation.constraints.NotNull;\n"
+"\n"
+"public class Car {\n"
+"\n"
+"    private String manufacturer;\n"
+"\n"
+"    private boolean isRegistered;\n"
+"      \n"
+"    public Car(String manufacturer, boolean isRegistered) {\n"
+"        super();\n"
+"        this.manufacturer = manufacturer;\n"
+"        this.isRegistered = isRegistered;\n"
+"    }\n"
+"\n"
+"    @NotNull\n"
+"    public String getManufacturer() {\n"
+"        return manufacturer;\n"
+"    }\n"
+"\n"
+"    public void setManufacturer(String manufacturer) {\n"
+"        this.manufacturer = manufacturer;\n"
+"    }\n"
+"\n"
+"    @AssertTrue\n"
+"    public boolean isRegistered() {\n"
+"        return isRegistered;\n"
+"    }\n"
+"\n"
+"    public void setRegistered(boolean isRegistered) {\n"
+"        this.isRegistered = isRegistered;\n"
+"    }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:98
+#, no-c-format
+msgid ""
+"When using property level constraints property access strategy is used to "
+"access the value to be validated. This means the bean validation provider "
+"accesses the state via the property accessor method."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:103
+#, no-c-format
+msgid ""
+"It is recommended to stick either to field <emphasis>or</emphasis> property "
+"annotation within one class. It is not recommended to annotate a field "
+"<emphasis>and</emphasis> the accompanying getter method as this would cause "
+"the field to be validated twice."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:112
+#, no-c-format
+msgid "Class-level constraints"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:115
+#, no-c-format
+msgid ""
+"Last but not least, a constraint can also be placed on class level. When a "
+"constraint annotation is placed on this level the class instance itself "
+"passed to the <classname>ConstraintValidator</classname>. Class level "
+"constraints are useful if it is necessary to inspect more than a single "
+"property of the class to validate it or if a correlation between different "
+"state variables has to be evaluated. In <xref linkend=\"example-class-level"
+"\"/> we add the property <property>passengers</property> to the class "
+"<classname>Car</classname>. We also add the constraint "
+"<classname>PassengerCount</classname> on the class level. We will later see "
+"how we can actually create this custom constraint (see <xref linkend="
+"\"validator-customconstraints\"/>). For now we it is enough to know that "
+"<classname>PassengerCount</classname> will ensure that there cannot be more "
+"passengers in a car than there are seats."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:131
+#, no-c-format
+msgid "Class level constraint"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:133
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.constraints.Min;\n"
+"import javax.validation.constraints.NotNull;\n"
+"import javax.validation.constraints.Size;\n"
+"\n"
+"@PassengerCount\n"
+"public class Car {\n"
+"\n"
+"    @NotNull\n"
+"    private String manufacturer;\n"
+"\n"
+"    @NotNull\n"
+"    @Size(min = 2, max = 14)\n"
+"    private String licensePlate;\n"
+"\n"
+"    @Min(2)\n"
+"    private int seatCount;\n"
+"    \n"
+"    private List&lt;Person&gt; passengers;\n"
+"    \n"
+"    public Car(String manufacturer, String licencePlate, int seatCount) {\n"
+"        this.manufacturer = manufacturer;\n"
+"        this.licensePlate = licencePlate;\n"
+"        this.seatCount = seatCount;\n"
+"    }\n"
+"\n"
+"    //getters and setters ...\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:138
+#, no-c-format
+msgid "Constraint inheritance"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:140
+#, no-c-format
+msgid ""
+"When validating an object that implements an interface or extends another "
+"class, all constraint annotations on the implemented interface and parent "
+"class apply in the same manner as the constraints specified on the validated "
+"object itself. To make things clearer let's have a look at the following "
+"example:"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:147
+#, no-c-format
+msgid "Constraint inheritance using RentalCar"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:149
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.constraints.NotNull;\n"
+"\n"
+"public class RentalCar extends Car {\n"
+"\n"
+"    private String rentalStation;\n"
+"    \n"
+"    public RentalCar(String manufacturer, String rentalStation) {\n"
+"        super(manufacturer);\n"
+"        this.rentalStation = rentalStation;\n"
+"    }\n"
+"    \n"
+"    @NotNull\n"
+"    public String getRentalStation() {\n"
+"        return rentalStation;\n"
+"    }\n"
+"\n"
+"    public void setRentalStation(String rentalStation) {\n"
+"        this.rentalStation = rentalStation;\n"
+"    }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:152
+#, no-c-format
+msgid ""
+"Our well-known class <classname>Car</classname> is now extended by "
+"<classname>RentalCar</classname> with the additional property "
+"<property>rentalStation</property>. If an instance of <classname>RentalCar</"
+"classname> is validated, not only the <classname>@NotNull</classname> "
+"constraint on <property>rentalStation</property> is validated, but also the "
+"constraint on <property>manufacturer</property> from the parent class."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:160
+#, no-c-format
+msgid ""
+"The same would hold true, if <classname>Car</classname> were an interface "
+"implemented by <classname>RentalCar</classname>."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:163
+#, no-c-format
+msgid ""
+"Constraint annotations are aggregated if methods are overridden. If "
+"<classname>RentalCar</classname> would override the "
+"<methodname>getManufacturer()</methodname> method from <classname>Car</"
+"classname> any constraints annotated at the overriding method would be "
+"evaluated in addition to the <classname>@NotNull</classname> constraint from "
+"the super-class."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:172
+#, no-c-format
+msgid "Object graphs"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:174
+#, no-c-format
+msgid ""
+"The Bean Validation API does not only allow to validate single class "
+"instances but also complete object graphs. To do so, just annotate a field "
+"or property representing a reference to another object with "
+"<classname>@Valid</classname>. If the parent object is validated, all "
+"referenced objects annotated with <classname>@Valid</classname> will be "
+"validated as well (as will be their children etc.). See <xref linkend="
+"\"example-car-with-driver\"/>."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:183
+#, no-c-format
+msgid "Class Person"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:185
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.constraints.NotNull;\n"
+"\n"
+"public class Person {\n"
+"\n"
+"    @NotNull\n"
+"    private String name;\n"
+"    \n"
+"    public Person(String name) {\n"
+"        super();\n"
+"        this.name = name;\n"
+"    }\n"
+"\n"
+"    public String getName() {\n"
+"        return name;\n"
+"    }\n"
+"\n"
+"    public void setName(String name) {\n"
+"        this.name = name;\n"
+"    }\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:189
+#, no-c-format
+msgid "Adding a driver to the car"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:191
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import javax.validation.Valid;\n"
+"import javax.validation.constraints.NotNull;\n"
+"\n"
+"public class Car {\n"
+"\n"
+"    @NotNull\n"
+"    @Valid\n"
+"    private Person driver;\n"
+"    \n"
+"    public Car(Person driver) {\n"
+"        this.driver = driver;\n"
+"    }\n"
+"\n"
+"    //getters and setters ...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:194
+#, no-c-format
+msgid ""
+"If an instance of <classname>Car</classname> is validated, the referenced "
+"<classname>Person</classname> object will be validated as well, as the "
+"<property>driver</property> field is annotated with <classname>@Valid</"
+"classname>. Therefore the validation of a <classname>Car</classname> will "
+"fail if the <property>name</property> field of the referenced "
+"<classname>Person</classname> instance is <code>null</code>."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:202
+#, no-c-format
+msgid ""
+"Object graph validation also works for collection-typed fields. That means "
+"any attributes that"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:207
+#, no-c-format
+msgid "are arrays"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:211
+#, no-c-format
+msgid ""
+"implement <classname>java.lang.Iterable</classname> (especially "
+"<classname>Collection</classname>, <classname>List</classname> and "
+"<classname>Set</classname>)"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:217
+#, no-c-format
+msgid "implement <classname>java.util.Map</classname>"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:221
+#, no-c-format
+msgid ""
+"can be annotated with <classname>@Valid</classname>, which will cause each "
+"contained element to be validated, when the parent object is validated."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:226
+#, no-c-format
+msgid "Car with a list of passengers"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:228
+#, no-c-format
+msgid ""
+"package com.mycompany;\n"
+"\n"
+"import java.util.ArrayList;\n"
+"import java.util.List;\n"
+"\n"
+"import javax.validation.Valid;\n"
+"import javax.validation.constraints.NotNull;\n"
+"\n"
+"public class Car {\n"
+"\n"
+"    @NotNull\n"
+"    @Valid\n"
+"    private List&lt;Person&gt; passengers = new ArrayList&lt;Person&gt;();\n"
+"\n"
+"    public Car(List&lt;Person&gt; passengers) {\n"
+"        this.passengers = passengers;\n"
+"    }\n"
+"\n"
+"    //getters and setters ...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:231
+#, no-c-format
+msgid ""
+"If a <classname>Car</classname> instance is validated, a "
+"<classname>ConstraintValidation</classname> will be created, if any of the "
+"<classname>Person</classname> objects contained in the <property>passengers</"
+"property> list has a <code>null</code> name."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:235
+#, no-c-format
+msgid ""
+"<classname>null</classname> values are getting ignored when validating "
+"object graphs."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:242
+#, no-c-format
+msgid "Validating constraints"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:244
+#, no-c-format
+msgid ""
+"The <classname>Validator</classname> interface is the main entry point to "
+"Bean Validation. In <xref linkend=\"section-validator-instance\"/> we will "
+"first show how to obtain an <classname>Validator</classname> instance. "
+"Afterwards we will learn how to use the different methods of the "
+"<classname>Validator</classname> interface."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:251
+#, no-c-format
+msgid "Obtaining a <classname>Validator</classname> instance"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:253
+#, no-c-format
+msgid ""
+"The first step towards validating an entity instance is to get hold of a "
+"<classname>Validator</classname> instance. The road to this instance leads "
+"via the <classname>Validation</classname> class and a "
+"<classname>ValidatorFactory</classname>. The easiest way is to use the "
+"static <methodname>Validation.buildDefaultValidatorFactory()</methodname> "
+"method:"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:262
+#, no-c-format
+msgid "Validation.buildDefaultValidatorFactory()"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:264
+#, no-c-format
+msgid ""
+"ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
+"Validator validator = factory.getValidator();"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:267
+#, no-c-format
+msgid ""
+"For other ways of obtaining a Validator instance see <xref linkend="
+"\"validator-bootstrapping\"/>. For now we just want to see how we can use "
+"the <classname>Validator</classname> instance to validate entity instances."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:274
+#, no-c-format
+msgid "Validator methods"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:276
+#, no-c-format
+msgid ""
+"The <classname>Validator</classname> interface contains three methods that "
+"can be used to either validate entire entities or just a single properties "
+"of the entity."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:280
+#, no-c-format
+msgid ""
+"All three methods return a <classname>Set&lt;ConstraintViolation&gt;</"
+"classname>. The set is empty, if the validation succeeds. Otherwise a "
+"<classname>ConstraintViolation</classname> instance is added for each "
+"violated constraint."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:286
+#, no-c-format
+msgid ""
+"All the validation methods have a var-args parameter which can be used to "
+"specify, which validation groups shall be considered when performing the "
+"validation. If the parameter is not specified the default validation group "
+"(<classname>javax.validation.groups.Default</classname>) will be used. We "
+"will go into more detail on the topic of validation groups in"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:295
+#, no-c-format
+msgid "validate"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:297
+#, no-c-format
+msgid ""
+"Use the <methodname>validate()</methodname> method to perform validation of "
+"all constraints of a given entity instance (see <xref linkend=\"example-"
+"validator-validate\"/> )."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:302
+#, no-c-format
+msgid "Usage of <methodname>Validator.validate()</methodname>"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:305
+#, no-c-format
+msgid ""
+"ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
+"Validator validator = factory.getValidator();\n"
+"\n"
+"Car car = new Car(null);\n"
+"\n"
+"Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations = validator."
+"validate(car);\n"
+"\n"
+"assertEquals(1, constraintViolations.size());\n"
+"assertEquals(\"may not be null\", constraintViolations.iterator().next()."
+"getMessage());"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:310
+#, no-c-format
+msgid "validateProperty"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:312
+#, no-c-format
+msgid ""
+"With help of the <methodname>validateProperty()</methodname> a single named "
+"property of a given object can be validated. The property name is the "
+"JavaBeans property name."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:317
+#, no-c-format
+msgid "Usage of <methodname>Validator.validateProperty()</methodname>"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:320
+#, no-c-format
+msgid ""
+"Validator validator = Validation.buildDefaultValidatorFactory().getValidator"
+"();\n"
+"\n"
+"Car car = new Car(null);\n"
+"\n"
+"Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations = validator."
+"validateProperty(car, \"manufacturer\");\n"
+"\n"
+"assertEquals(1, constraintViolations.size());\n"
+"assertEquals(\"may not be null\", constraintViolations.iterator().next()."
+"getMessage());"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:323
+#, no-c-format
+msgid ""
+"<methodname>Validator.validateProperty</methodname> is for example used in "
+"the integration of Bean Validation into JSF 2 (see <xref linkend=\"section-"
+"presentation-layer\"/>)."
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:329
+#, no-c-format
+msgid "validateValue"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:331
+#, no-c-format
+msgid ""
+"Using the <methodname>validateValue() </methodname>method you can check, "
+"whether a single property of a given class can be validated successfully, if "
+"the property had the specified value:"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:336
+#, no-c-format
+msgid "Usage of <methodname>Validator.validateValue()</methodname>"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:339
+#, no-c-format
+msgid ""
+"Validator validator = Validation.buildDefaultValidatorFactory().getValidator"
+"();\n"
+"\n"
+"Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations = validator."
+"validateValue(Car.class, \"manufacturer\", null);\n"
+"\n"
+"assertEquals(1, constraintViolations.size());\n"
+"assertEquals(\"may not be null\", constraintViolations.iterator().next()."
+"getMessage());"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:343
+#, no-c-format
+msgid ""
+"<classname>@Valid</classname> is not honored by <methodname>validateProperty"
+"()</methodname> or <methodname>validateValue()</methodname>."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:351
+#, no-c-format
+msgid "<classname>ConstraintViolation</classname> methods"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:353
+#, no-c-format
+msgid ""
+"Now it is time to have a closer look at what a "
+"<classname>ConstraintViolation</classname>. Using the different methods of "
+"<classname>ConstraintViolation</classname> a lot of useful information about "
+"the cause of the validation failure can be determined. <xref linkend=\"table-"
+"constraint-violation\"/> gives an overview of these methods:"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:361
+#, no-c-format
+msgid "The various <classname>ConstraintViolation</classname> methods"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:367
+#, no-c-format
+msgid "Method"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:369
+#, no-c-format
+msgid "Usage"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:371
+#, no-c-format
+msgid "Example (referring to <xref linkend=\"example-validator-validate\"/>)"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:378
+#, no-c-format
+msgid "getMessage()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:380
+#, no-c-format
+msgid "The interpolated error message."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:382
+#, no-c-format
+msgid "may not be null"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:386
+#, no-c-format
+msgid "getMessageTemplate()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:388
+#, no-c-format
+msgid "The non-interpolated error message."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:390
+#, no-c-format
+msgid "{javax.validation.constraints.NotNull.message}"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:394
+#, no-c-format
+msgid "getRootBean()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:396
+#, no-c-format
+msgid "The root bean being validated."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:398 usingvalidator.xml:416
+#, no-c-format
+msgid "<entry>car</entry>"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:402
+#, no-c-format
+msgid "getRootBeanClass()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:404
+#, no-c-format
+msgid "The class of the root bean being validated."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:406
+#, no-c-format
+msgid "Car.class"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:410
+#, no-c-format
+msgid "getLeafBean()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:412
+#, no-c-format
+msgid ""
+"If a bean constraint, the bean instance the constraint is applied on. If a "
+"property constraint, the bean instance hosting the property the constraint "
+"is applied on."
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:420
+#, no-c-format
+msgid "getPropertyPath()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:422
+#, no-c-format
+msgid "The property path to the value from root bean."
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:428
+#, no-c-format
+msgid "getInvalidValue()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:430
+#, no-c-format
+msgid "The value failing to pass the constraint."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:432
+#, no-c-format
+msgid "passengers"
+msgstr ""
+
+#. Tag: methodname
+#: usingvalidator.xml:436
+#, no-c-format
+msgid "getConstraintDescriptor()"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:438
+#, no-c-format
+msgid "Constraint metadata reported to fail."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:448
+#, no-c-format
+msgid "Message interpolation"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:450
+#, no-c-format
+msgid ""
+"As we will see in <xref linkend=\"validator-customconstraints\"/> each "
+"constraint definition must define a default message descriptor. This message "
+"can be overridden at declaration time using the <methodname>message</"
+"methodname> attribute of the constraint. You can see this in <xref linkend="
+"\"example-driver\"/>. This message descriptors get interpolated when a "
+"constraint validation fails using the configured "
+"<classname>MessageInterpolator</classname>. The interpolator will try to "
+"resolve any message parameters, meaning string literals enclosed in braces. "
+"In order to resolve these parameters Hibernate Validator's default "
+"<classname>MessageInterpolator</classname> first recursively resolves "
+"parameters against a custom <classname>ResourceBundle</classname> called "
+"<filename>ValidationMessages.properties</filename> at the root of the "
+"classpath (It is up to you to create this file). If no further replacements "
+"are possible against the custom bundle the default "
+"<classname>ResourceBundle</classname> under <filename>/org/hibernate/"
+"validator/ValidationMessages.properties</filename> gets evaluated. If a "
+"replacement occurs against the default bundle the algorithm looks again at "
+"the custom bundle (and so on). Once no further replacements against these "
+"two resource bundles are possible remaining parameters are getting resolved "
+"against the attributes of the constraint to be validated."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:473
+#, no-c-format
+msgid ""
+"Since the braces { and } have special meaning in the messages they need to "
+"be escaped if they are used literally. The following The following rules "
+"apply:"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:477
+#, no-c-format
+msgid "\\{ is considered as the literal {"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:481
+#, no-c-format
+msgid "\\} is considered as the literal }"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:485
+#, no-c-format
+msgid "\\\\ is considered as the literal \\"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:489
+#, no-c-format
+msgid ""
+"If the default message interpolator does not fit your requirements it is "
+"possible to plug a custom <classname>MessageInterpolator</classname> when "
+"the <classname>ValidatorFactory</classname> gets created. This can be seen "
+"in <xref linkend=\"validator-bootstrapping\"/>."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:498
+#, no-c-format
+msgid "Validating groups"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:500
+#, no-c-format
+msgid ""
+"Groups allow you to restrict the set of constraints applied during "
+"validation. This makes for example wizard like validation possible where in "
+"each step only a specified subset of constraints get validated. The groups "
+"targeted are passed as var-args parameters to <methodname>validate</"
+"methodname>, <methodname>validateProperty</methodname> and "
+"<methodname>validateValue</methodname>. Let's have a look at an extended "
+"<classname>Car</classname> with <classname>Driver</classname> example. First "
+"we have the class <classname>Person</classname> (<xref linkend=\"example-"
+"person\"/>) which has a <classname>@NotNull </classname>constraint on "
+"<property>name</property>. Since no group is specified for this annotation "
+"its default group is <classname>javax.validation.groups.Default</classname>."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:515
+#, no-c-format
+msgid ""
+"When more than one group is requested, the order in which the groups are "
+"evaluated is not deterministic. If no group is specified the default group "
+"<classname>javax.validation.groups.Default</classname> is assumed."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:522
+#, no-c-format
+msgid "Person"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:524
+#, no-c-format
+msgid ""
+"public class Person {\n"
+"    @NotNull\n"
+"    private String name;\n"
+"\n"
+"    public Person(String name) {\n"
+"        this.name = name;\n"
+"    }\n"
+"    // getters and setters ...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:527
+#, no-c-format
+msgid ""
+"Next we have the class <classname>Driver</classname> (<xref linkend="
+"\"example-driver\"/>) extending <classname>Person</classname>. Here we are "
+"adding the properties <property>age</property> and "
+"<property>hasDrivingLicense</property>. In order to drive you must be at "
+"least 18 (<classname>@Min(18)</classname>) and you must have a driving "
+"license (<classname>@AssertTrue</classname>). Both constraints defined on "
+"these properties belong to the group <classname>DriverChecks</classname>. As "
+"you can see in <xref linkend=\"example-group-interfaces\"/> the group "
+"<classname>DriverChecks</classname> is just a simple tagging interface. "
+"Using interfaces makes the usage of groups type safe and allows for easy "
+"refactoring. It also means that groups can inherit from each other via class "
+"inheritance."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:541
+#, no-c-format
+msgid ""
+"The Bean Validation specification does not enforce that groups have to be "
+"interfaces. Non interface classes could be used as well, but we recommend to "
+"stick to interfaces."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:547
+#, no-c-format
+msgid "Driver"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:549
+#, no-c-format
+msgid ""
+"public class Driver extends Person {\n"
+"    @Min(value = 18, message = \"You have to be 18 to drive a car\", groups "
+"= DriverChecks.class)\n"
+"    public int age;\n"
+"\n"
+"    @AssertTrue(message = \"You first have to pass the driving test\", "
+"groups = DriverChecks.class)\n"
+"    public boolean hasDrivingLicense;\n"
+"\n"
+"    public Driver(String name) {\n"
+"        super( name );\n"
+"    }\n"
+"\n"
+"    public void passedDrivingTest(boolean b) {\n"
+"        hasDrivingLicense = b;\n"
+"    }\n"
+"\n"
+"    public int getAge() {\n"
+"        return age;\n"
+"    }\n"
+"\n"
+"    public void setAge(int age) {\n"
+"        this.age = age;\n"
+"    }\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:553
+#, no-c-format
+msgid "Group interfaces"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:555
+#, no-c-format
+msgid ""
+"public interface DriverChecks {\n"
+"}\n"
+"\n"
+"public interface CarChecks {\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:558
+#, no-c-format
+msgid ""
+"Last but not least we add the property <property>passedVehicleInspection</"
+"property> to the <classname>Car</classname> class (<xref linkend=\"example-"
+"car\"/>) indicating whether a car passed the road worthy tests."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:564
+#, no-c-format
+msgid "<title>Car</title>"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:566
+#, no-c-format
+msgid ""
+"public class Car {\n"
+"    @NotNull\n"
+"    private String manufacturer;\n"
+"\n"
+"    @NotNull\n"
+"    @Size(min = 2, max = 14)\n"
+"    private String licensePlate;\n"
+"\n"
+"    @Min(2)\n"
+"    private int seatCount;\n"
+"\n"
+"    @AssertTrue(message = \"The car has to pass the vehicle inspection first"
+"\", groups = CarChecks.class)\n"
+"    private boolean passedVehicleInspection;\n"
+"\n"
+"    @Valid\n"
+"    private Driver driver;\n"
+"\n"
+"    public Car(String manufacturer, String licencePlate, int seatCount) {\n"
+"        this.manufacturer = manufacturer;\n"
+"        this.licensePlate = licencePlate;\n"
+"        this.seatCount = seatCount;\n"
+"    }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:569
+#, no-c-format
+msgid ""
+"Overall three different groups are used in our example. <property>Person."
+"name</property>, <property>Car.manufacturer</property>, <property>Car."
+"licensePlate</property> and <property>Car.seatCount</property> all belong to "
+"the <classname>Default</classname> group. <property>Driver.age</property> "
+"and <property>Driver.hasDrivingLicense</property> belong to "
+"<classname>DriverChecks</classname> and last but not least <property>Car."
+"passedVehicleInspection</property> belongs to the group "
+"<classname>CarChecks</classname>. <xref linkend=\"example-drive-away\"/> "
+"shows how passing different group combinations to the <methodname>Validator."
+"validate</methodname> method result in different validation results."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:583
+#, no-c-format
+msgid "Drive away"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:585
+#, no-c-format
+msgid ""
+"public class GroupTest {\n"
+"\n"
+"    private static Validator validator;\n"
+"\n"
+"    @BeforeClass\n"
+"    public static void setUp() {\n"
+"        ValidatorFactory factory = Validation.buildDefaultValidatorFactory"
+"();\n"
+"        validator = factory.getValidator();\n"
+"    }\n"
+"\n"
+"    @Test\n"
+"    public void driveAway() {\n"
+"        // create a car and check that everything is ok with it.\n"
+"        Car car = new Car( \"Morris\", \"DD-AB-123\", 2 );\n"
+"        Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations = "
+"validator.validate( car );\n"
+"        assertEquals( 0, constraintViolations.size() );\n"
+"\n"
+"        // but has it passed the vehicle inspection?\n"
+"        constraintViolations = validator.validate( car, CarChecks.class );\n"
+"        assertEquals( 1, constraintViolations.size() );\n"
+"        assertEquals(\"The car has to pass the vehicle inspection first\", "
+"constraintViolations.iterator().next().getMessage());\n"
+"\n"
+"        // let's go to the vehicle inspection\n"
+"        car.setPassedVehicleInspection( true );\n"
+"        assertEquals( 0, validator.validate( car ).size() );\n"
+"\n"
+"        // now let's add a driver. He is 18, but has not passed the driving "
+"test yet\n"
+"        Driver john = new Driver( \"John Doe\" );\n"
+"        john.setAge( 18 );\n"
+"        car.setDriver( john );\n"
+"        constraintViolations = validator.validate( car, DriverChecks."
+"class );\n"
+"        assertEquals( 1, constraintViolations.size() );\n"
+"        assertEquals( \"You first have to pass the driving test\", "
+"constraintViolations.iterator().next().getMessage() );\n"
+"\n"
+"        // ok, John passes the test\n"
+"        john.passedDrivingTest( true );\n"
+"        assertEquals( 0, validator.validate( car, DriverChecks.class ).size"
+"() );\n"
+"\n"
+"        // just checking that everything is in order now\n"
+"        assertEquals( 0, validator.validate( car, Default.class, CarChecks."
+"class, DriverChecks.class ).size() );\n"
+"    }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:588
+#, no-c-format
+msgid ""
+"First we create a car and validate it using no explicit group. There are no "
+"validation errors, even though the property "
+"<property>passedVehicleInspection</property> is per default <constant>false</"
+"constant>. However, the constraint defined on this property does not belong "
+"to the default group. Next we just validate the <classname>CarChecks</"
+"classname> group which will fail until we make sure that the car passes the "
+"vehicle inspection. When we then add a driver to the car and validate "
+"against <classname>DriverChecks</classname> we get again a constraint "
+"violation due to the fact that the driver has not yet passed the driving "
+"test. Only after setting <property>passedDrivingTest</property> to true the "
+"validation against <classname>DriverChecks</classname> will pass."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:601
+#, no-c-format
+msgid ""
+"Last but not least, we show that all constraints are passing by validating "
+"against all defined groups."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:605
+#, no-c-format
+msgid "Group sequences"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:607
+#, no-c-format
+msgid ""
+"By default, constraints are evaluated in no particular order and this "
+"regardless of which groups they belong to. In some situations, however, it "
+"is useful to control the order of the constraints evaluation. In our example "
+"from <xref linkend=\"validator-usingvalidator-validationgroups\"/> we could "
+"for example require that first all default car constraints are passing "
+"before we check the road worthiness of the car. Finally before we drive away "
+"we check the actual driver constraints. In order to implement such an order "
+"one would define a new interface and annotate it with "
+"<classname>@GroupSequence</classname> defining the order in which the groups "
+"have to be validated."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:620
+#, no-c-format
+msgid ""
+"If at least one constraints fails in a sequenced group none of the "
+"constraints of the following groups in the sequence get validated."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:626
+#, no-c-format
+msgid "Interface with @GroupSequence"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:628
+#, no-c-format
+msgid ""
+"@GroupSequence({Default.class, CarChecks.class, DriverChecks.class})\n"
+"public interface OrderedChecks {\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:632
+#, no-c-format
+msgid ""
+"Groups defining a sequence and groups composing a sequence must not be "
+"involved in a cyclic dependency either directly or indirectly, either "
+"through cascaded sequence definition or group inheritance. If a group "
+"containing such a circularity is evaluated, a "
+"<classname>GroupDefinitionException</classname> is raised."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:636
+#, no-c-format
+msgid ""
+"The usage of the new sequence could then look like in <xref linkend="
+"\"example-group-sequence\"/>."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:641
+#, no-c-format
+msgid "Usage of a group sequence"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:643
+#, no-c-format
+msgid ""
+"@Test\n"
+"public void testOrderedChecks() {\n"
+"    Car car = new Car( \"Morris\", \"DD-AB-123\", 2 );\n"
+"    car.setPassedVehicleInspection( true );\n"
+"\n"
+"    Driver john = new Driver( \"John Doe\" );\n"
+"    john.setAge( 18 );\n"
+"    john.passedDrivingTest( true );\n"
+"    car.setDriver( john );\n"
+"\n"
+"    assertEquals( 0, validator.validate( car, OrderedChecks.class ).size"
+"() );\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:648
+#, no-c-format
+msgid "Redefining the default group sequence of a class"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:650
+#, no-c-format
+msgid ""
+"The @GroupSequence annotation also fulfills a second purpose. It allows you "
+"to redefine what the Default group means for a given class. To redefine "
+"<classname>Default</classname> for a class, place a "
+"<classname>@GroupSequence</classname> annotation on the class. The defined "
+"groups in the annotation express the sequence of groups that substitute "
+"<classname>Default</classname> for this class. <xref linkend=\"example-"
+"rental-car\"/> introduces a new class RentalCar with a redfined default "
+"group. With this definition the check for all three groups can be rewritten "
+"as seen in <xref linkend=\"example-testOrderedChecksWithRedefinedDefault\"/>."
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:662
+#, no-c-format
+msgid "RentalCar"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:664
+#, no-c-format
+msgid ""
+"@GroupSequence({ RentalCar.class, CarChecks.class })\n"
+"public class RentalCar extends Car {\n"
+"    public RentalCar(String manufacturer, String licencePlate, int "
+"seatCount) {\n"
+"        super( manufacturer, licencePlate, seatCount );\n"
+"    }\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:668
+#, no-c-format
+msgid "testOrderedChecksWithRedefinedDefault"
+msgstr ""
+
+#. Tag: programlisting
+#: usingvalidator.xml:670
+#, no-c-format
+msgid ""
+"@Test\n"
+"public void testOrderedChecksWithRedefinedDefault() {\n"
+"    RentalCar rentalCar = new RentalCar( \"Morris\", \"DD-AB-123\", 2 );\n"
+"    rentalCar.setPassedVehicleInspection( true );\n"
+"\n"
+"    Driver john = new Driver( \"John Doe\" );\n"
+"    john.setAge( 18 );\n"
+"    john.passedDrivingTest( true );\n"
+"    rentalCar.setDriver( john );\n"
+"\n"
+"    assertEquals( 0, validator.validate( rentalCar, Default.class, "
+"DriverChecks.class ).size() );\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:674
+#, no-c-format
+msgid ""
+"Due to the fact that there cannot be a cyclic dependency in the group and "
+"group sequence definitions one cannot just add <classname>Default</"
+"classname> to the sequence redefining <classname>Default</classname> for a "
+"class. Instead the class itself should be added!"
+msgstr ""
+
+#. Tag: title
+#: usingvalidator.xml:684 usingvalidator.xml:692
+#, no-c-format
+msgid "Built-in constraints"
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:686
+#, no-c-format
+msgid ""
+"Hibernate Validator implements all of the default constraints specified in "
+"Bean Validation as well as some custom ones. <xref linkend=\"table-builtin-"
+"constraints\"/> list all constraints available in Hibernate Validator."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:699
+#, no-c-format
+msgid "Annotation"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:701
+#, no-c-format
+msgid "Part of Bean Validation Specification"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:703
+#, no-c-format
+msgid "Apply on"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:705
+#, no-c-format
+msgid "<entry>Use</entry>"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:707
+#, no-c-format
+msgid "Hibernate Metadata impact"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:713
+#, no-c-format
+msgid "@AssertFalse"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:715 usingvalidator.xml:728 usingvalidator.xml:758
+#: usingvalidator.xml:778 usingvalidator.xml:798 usingvalidator.xml:830
+#: usingvalidator.xml:858 usingvalidator.xml:876 usingvalidator.xml:894
+#: usingvalidator.xml:936 usingvalidator.xml:949 usingvalidator.xml:963
+#: usingvalidator.xml:995 usingvalidator.xml:1049
+#, no-c-format
+msgid "<entry>yes</entry>"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:717 usingvalidator.xml:730 usingvalidator.xml:896
+#: usingvalidator.xml:909 usingvalidator.xml:938
+#, no-c-format
+msgid "field/property"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:719
+#, no-c-format
+msgid "Check that the annotated element is <constant>false</constant>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:722 usingvalidator.xml:735 usingvalidator.xml:752
+#: usingvalidator.xml:772 usingvalidator.xml:792 usingvalidator.xml:824
+#: usingvalidator.xml:838 usingvalidator.xml:916 usingvalidator.xml:930
+#: usingvalidator.xml:943 usingvalidator.xml:957 usingvalidator.xml:971
+#: usingvalidator.xml:989 usingvalidator.xml:1026 usingvalidator.xml:1043
+#: usingvalidator.xml:1059
+#, no-c-format
+msgid "none"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:726
+#, no-c-format
+msgid "@AssertTrue"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:732
+#, no-c-format
+msgid "Check that the annotated element is <constant>true</constant>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:739
+#, no-c-format
+msgid "@CreditCardNumber"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:741 usingvalidator.xml:817 usingvalidator.xml:844
+#: usingvalidator.xml:907 usingvalidator.xml:922 usingvalidator.xml:977
+#: usingvalidator.xml:1011 usingvalidator.xml:1032
+#, no-c-format
+msgid "<entry>no</entry>"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:743 usingvalidator.xml:1034
+#, no-c-format
+msgid "field/property. The supported type is <classname>String</classname>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:746
+#, no-c-format
+msgid ""
+"Check that the annotated string passes the Luhn checksum test. Note, this "
+"validation aims to check for user mistake, not credit card validity! See "
+"also <ulink url=\"http://www.merriampark.com/anatomycc.htm\">Anatomy of "
+"Credit Card Numbers</ulink>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:756
+#, no-c-format
+msgid "@DecimalMax"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:760 usingvalidator.xml:780 usingvalidator.xml:800
+#: usingvalidator.xml:860 usingvalidator.xml:878 usingvalidator.xml:979
+#, no-c-format
+msgid ""
+"field/property. Supported types are <classname>BigDecimal</classname>, "
+"<classname>BigInteger</classname>, <classname>String</classname>, "
+"<classname>byte</classname>, <classname>short</classname>, <classname>int</"
+"classname>, <classname>long</classname> and the respective wrappers of the "
+"primitive types."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:767
+#, no-c-format
+msgid ""
+"The annotated element must be a number whose value must be lower or equal to "
+"the specified maximum. The parameter value is the string representation of "
+"the max value according to the <classname>BigDecimal</classname> string "
+"representation."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:776
+#, no-c-format
+msgid "@DecimalMin"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:787
+#, no-c-format
+msgid ""
+"The annotated element must be a number whose value must be higher or equal "
+"to the specified minimum. The parameter value is the string representation "
+"of the min value according to the <classname>BigDecimal</classname> string "
+"representation."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:796
+#, no-c-format
+msgid "@Digits(integer=, fraction=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:807
+#, no-c-format
+msgid ""
+"Check whether the property is a number having up to <literal>integer</"
+"literal> digits and <literal>fraction</literal> fractional digits."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:811
+#, no-c-format
+msgid "Define column precision and scale."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:815
+#, no-c-format
+msgid "@Email"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:819 usingvalidator.xml:846 usingvalidator.xml:965
+#, no-c-format
+msgid "field/property. Needs to be a string."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:821
+#, no-c-format
+msgid "Check whether the specified string is a valid email address."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:828
+#, no-c-format
+msgid "@Future"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:832 usingvalidator.xml:951
+#, no-c-format
+msgid ""
+"field/property. Supported types are <classname>java.util.Date</classname> "
+"and <classname>java.util.Calendar</classname>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:836
+#, no-c-format
+msgid "Checks whether the annotated date is in the future."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:842
+#, no-c-format
+msgid "@Length(min=, max=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:848
+#, no-c-format
+msgid ""
+"Validate that the annotated string is between <parameter>min</parameter> and "
+"<parameter>max</parameter> included."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:852 usingvalidator.xml:1005
+#, no-c-format
+msgid "Column length will be set to max."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:856
+#, no-c-format
+msgid "@Max"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:867
+#, no-c-format
+msgid ""
+"Checks whether the annotated value is less than or equal to the specified "
+"maximum."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:870 usingvalidator.xml:888
+#, no-c-format
+msgid "Add a check constraint on the column."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:874
+#, no-c-format
+msgid "@Min"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:885
+#, no-c-format
+msgid ""
+"Checks whether the annotated value is higher than or equal to the specified "
+"minimum."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:892
+#, no-c-format
+msgid "@NotNull"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:898
+#, no-c-format
+msgid "Check that the annotated value is not <constant>null.</constant>"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:901
+#, no-c-format
+msgid "Column(s) are not null."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:905
+#, no-c-format
+msgid "@NotBlank"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:911
+#, no-c-format
+msgid ""
+"Check that the annotated string is not null and the trimmed length is "
+"greater than 0. The difference to @NotEmpty is that this constraint can only "
+"be applied on strings and that trailing whitespaces are ignored."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:920
+#, no-c-format
+msgid "@NotEmpty"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:924
+#, no-c-format
+msgid "field/property. Supported types are String, Collection, Map and arrays."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:927
+#, no-c-format
+msgid ""
+"Check whether the annotated element is not <constant>null</constant> nor "
+"empty."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:934
+#, no-c-format
+msgid "@Null"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:940
+#, no-c-format
+msgid "Check that the annotated value is <constant>null.</constant>"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:947
+#, no-c-format
+msgid "@Past"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:955
+#, no-c-format
+msgid "Checks whether the annotated date is in the past."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:961
+#, no-c-format
+msgid "@Pattern(regex=, flag=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:967
+#, no-c-format
+msgid ""
+"Checks if the annotated string matches the regular expression "
+"<parameter>regex</parameter> considering the given flag <parameter>match</"
+"parameter>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:975
+#, no-c-format
+msgid "@Range(min=, max=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:986
+#, no-c-format
+msgid ""
+"Check whether the annotated value lies between (inclusive) the specified "
+"minimum and maximum."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:993
+#, no-c-format
+msgid "@Size(min=, max=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:997
+#, no-c-format
+msgid ""
+"field/property. Supported types are <classname>String</classname>, "
+"<classname>Collection</classname>, <classname>Map</classname> and "
+"<classname>arrays</classname>."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1002
+#, no-c-format
+msgid "Check if the annotated element size is between min and max (inclusive)."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1009
+#, no-c-format
+msgid "@ScriptAssert(lang=, script=, alias=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1013
+#, no-c-format
+msgid "type"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1015
+#, no-c-format
+msgid ""
+"Checks whether the given script can successfully be evaluated against the "
+"annotated element. In order to use this constraint, an implementation of the "
+"Java Scripting API as defined by JSR 223 (\"Scripting for the "
+"Java<superscript>TM</superscript> Platform\") must part of the class path. "
+"This is automatically the case when running on Java 6. For older Java "
+"versions, the JSR 223 RI can be added manually to the class path.The "
+"expressions to be evaluated can be written in any scripting or expression "
+"language, for which a JSR 223 compatible engine can be found in the class "
+"path."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1030
+#, no-c-format
+msgid "@URL(protocol=, host=, port=)"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1037
+#, no-c-format
+msgid ""
+"Check if the annotated string is a valid URL. If any of parameters "
+"<parameter>protocol</parameter>, <parameter>host</parameter> or "
+"<parameter>port</parameter> is specified the URL must match the specified "
+"values in the according part."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1047
+#, no-c-format
+msgid "@Valid"
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1051
+#, no-c-format
+msgid "field/property. Any non-primitive types are supported."
+msgstr ""
+
+#. Tag: entry
+#: usingvalidator.xml:1054
+#, no-c-format
+msgid ""
+"Performs validation recursively on the associated object. If the object is a "
+"collection or an array, the elements are validated recursively. If the "
+"object is a map, the value elements are validated recursively."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:1066
+#, no-c-format
+msgid ""
+"On top of the parameters indicated in <xref linkend=\"table-builtin-"
+"constraints\"/> each constraint supports the parameters <parameter>message</"
+"parameter>, <parameter>groups</parameter> and <parameter>payload</"
+"parameter>. This is a requirement of the Bean Validation specification."
+msgstr ""
+
+#. Tag: para
+#: usingvalidator.xml:1073
+#, no-c-format
+msgid ""
+"In some cases these built-in constraints will not fulfill your requirements. "
+"In this case you can literally in a minute write your own constraints. We "
+"will discuss this in"
+msgstr ""

Added: validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/xmlconfiguration.po
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/xmlconfiguration.po	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/xmlconfiguration.po	2010-07-06 15:18:26 UTC (rev 19904)
@@ -0,0 +1,283 @@
+# Language zh-CN translations for PACKAGE package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-07-06 14:46+0000\n"
+"PO-Revision-Date: 2010-07-06 14:46+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: xmlconfiguration.xml:25
+#, no-c-format
+msgid "XML configuration"
+msgstr ""
+
+#. Tag: filename
+#: xmlconfiguration.xml:28
+#, no-c-format
+msgid "<filename>validation.xml</filename>"
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:30
+#, no-c-format
+msgid ""
+"The key to enable XML configuration for Hibernate Validator is the file "
+"<filename>validation.xml</filename>. If this file exists in the classpath "
+"its configuration will be applied when the <classname>ValidationFactory</"
+"classname> gets created. <xref linkend=\"image-validation-configuration\"/> "
+"shows a model view of the xsd <filename>valiation.xml</filename> has to "
+"adhere to."
+msgstr ""
+
+#. Tag: title
+#: xmlconfiguration.xml:37
+#, no-c-format
+msgid "validation-configuration-1.0.xsd"
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:52
+#, no-c-format
+msgid ""
+"shows the several configuration options of <filename>validation.xml</"
+"filename>."
+msgstr ""
+
+#. Tag: title
+#: xmlconfiguration.xml:56
+#, no-c-format
+msgid "<title>validation.xml</title>"
+msgstr ""
+
+#. Tag: programlisting
+#: xmlconfiguration.xml:58
+#, no-c-format
+msgid ""
+"&lt;validation-config xmlns=\"http://jboss.org/xml/ns/javax/validation/"
+"configuration\"\n"
+" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+" xsi:schemaLocation=\"http://jboss.org/xml/ns/javax/validation/configuration"
+"\"&gt;\n"
+"    &lt;default-provider&gt;org.hibernate.validator.HibernateValidator&lt;/"
+"default-provider&gt;\n"
+"    &lt;message-interpolator&gt;org.hibernate.validator.engine."
+"ResourceBundleMessageInterpolator&lt;/message-interpolator&gt;\n"
+"    &lt;traversable-resolver&gt;org.hibernate.validator.engine.resolver."
+"DefaultTraversableResolver&lt;/traversable-resolver&gt;\n"
+"    &lt;constraint-validator-factory&gt;org.hibernate.validator.engine."
+"ConstraintValidatorFactoryImpl&lt;/constraint-validator-factory&gt;\n"
+"    &lt;constraint-mapping&gt;/constraints-car.xml&lt;/constraint-"
+"mapping&gt;\n"
+"    &lt;property name=\"prop1\"&gt;value1&lt;/property&gt;\n"
+"    &lt;property name=\"prop2\"&gt;value2&lt;/property&gt;\n"
+"&lt;/validation-config&gt;"
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:62
+#, no-c-format
+msgid ""
+"There can only be one <filename>validation.xml</filename> in the classpath. "
+"If more than one is found an exception is thrown."
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:66
+#, no-c-format
+msgid ""
+"All settings shown in the <filename>validation.xml</filename> are optional "
+"and in the case of <xref linkend=\"example-validation-xml\"/> show the "
+"defaults used within Hibernate Validator. The node <property>default-"
+"provider</property> allows to choose the Bean Validation provider. This is "
+"useful if there is more than one provider in the classpath. "
+"<property>message-interpolator</property>, <property>traversable-resolver</"
+"property> and <property>constraint-validator-factory</property> allow to "
+"customize the <classname>javax.validation.MessageInterpolator</classname>, "
+"<classname>javax.validation.TraversableResolver</classname> resp. "
+"<classname>javax.validation.ConstraintValidatorFactory</classname>. The same "
+"configuration options are also available programmatically through the "
+"<classname>javax.validation.Configuration</classname>. In fact XML "
+"configuration will be overridden by values explicitly specified via the API. "
+"It is even possible to ignore the XML configuration completely via "
+"<methodname> Configuration.ignoreXmlConfiguration()</methodname>. See also "
+"<xref linkend=\"validator-bootstrapping\"/>."
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:84
+#, no-c-format
+msgid ""
+"Via the <property>constraint-mapping</property> you can list an arbitrary "
+"number of additional XML files containing the actual constraint "
+"configuration. See <xref linkend=\"section-mapping-constraints\"/>."
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:88
+#, no-c-format
+msgid ""
+"Last but not least, you can specify provider specific properties via the "
+"<property>property</property> nodes. Hibernate Validator does currently not "
+"make use of any custom properties."
+msgstr ""
+
+#. Tag: title
+#: xmlconfiguration.xml:94
+#, no-c-format
+msgid "Mapping constraints"
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:96
+#, no-c-format
+msgid ""
+"Expressing constraints in XML is possible via files adhering to the xsd seen "
+"in <xref linkend=\"image-mapping-configuration\"/>. Note that these mapping "
+"files are only processed if listed via <property>constraint-mapping</"
+"property> in your <filename>validation.xml</filename>."
+msgstr ""
+
+#. Tag: title
+#: xmlconfiguration.xml:103
+#, no-c-format
+msgid "validation-mapping-1.0.xsd"
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:118
+#, no-c-format
+msgid ""
+"shows how our classes Car and RentalCar from <xref linkend=\"example-car\"/> "
+"resp. <xref linkend=\"example-rental-car\"/> could be mapped in XML."
+msgstr ""
+
+#. Tag: title
+#: xmlconfiguration.xml:123
+#, no-c-format
+msgid "constraints-car.xml"
+msgstr ""
+
+#. Tag: programlisting
+#: xmlconfiguration.xml:125
+#, no-c-format
+msgid ""
+"&lt;constraint-mappings xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance"
+"\"\n"
+"                     xsi:schemaLocation=\"http://jboss.org/xml/ns/javax/"
+"validation/mapping validation-mapping-1.0.xsd\"\n"
+"                     xmlns=\"http://jboss.org/xml/ns/javax/validation/mapping"
+"\"&gt;\n"
+"    &lt;default-package&gt;org.hibernate.validator.quickstart&lt;/default-"
+"package&gt;\n"
+"    &lt;bean class=\"Car\" ignore-annotations=\"true\"&gt;\n"
+"        &lt;field name=\"manufacturer\"&gt;\n"
+"            &lt;constraint annotation=\"javax.validation.constraints.NotNull"
+"\"/&gt;\n"
+"        &lt;/field&gt;\n"
+"        &lt;field name=\"licensePlate\"&gt;\n"
+"            &lt;constraint annotation=\"javax.validation.constraints.NotNull"
+"\"/&gt;\n"
+"        &lt;/field&gt;\n"
+"        &lt;field name=\"seatCount\"&gt;\n"
+"            &lt;constraint annotation=\"javax.validation.constraints.Min"
+"\"&gt;\n"
+"                &lt;element name=\"value\"&gt;2&lt;/element&gt;\n"
+"            &lt;/constraint&gt;\n"
+"        &lt;/field&gt;\n"
+"        &lt;field name=\"driver\"&gt;\n"
+"            &lt;valid/&gt;\n"
+"        &lt;/field&gt;\n"
+"        &lt;getter name=\"passedVehicleInspection\" ignore-annotations=\"true"
+"\"&gt;\n"
+"            &lt;constraint annotation=\"javax.validation.constraints."
+"AssertTrue\"&gt;\n"
+"                &lt;message&gt;The car has to pass the vehicle inspection "
+"first&lt;/message&gt;\n"
+"                &lt;groups&gt;\n"
+"                    &lt;value&gt;CarChecks&lt;/value&gt;\n"
+"                &lt;/groups&gt;\n"
+"                &lt;element name=\"max\"&gt;10&lt;/element&gt;\n"
+"            &lt;/constraint&gt;\n"
+"        &lt;/getter&gt;\n"
+"    &lt;/bean&gt;\n"
+"    &lt;bean class=\"RentalCar\" ignore-annotations=\"true\"&gt;\n"
+"        &lt;class ignore-annotations=\"true\"&gt;\n"
+"            &lt;group-sequence&gt;\n"
+"                &lt;value&gt;RentalCar&lt;/value&gt;\n"
+"                &lt;value&gt;CarChecks&lt;/value&gt;\n"
+"            &lt;/group-sequence&gt;\n"
+"        &lt;/class&gt;\n"
+"    &lt;/bean&gt;\n"
+"    &lt;constraint-definition annotation=\"org.mycompany.CheckCase\" include-"
+"existing-validator=\"false\"&gt;\n"
+"        &lt;validated-by include-existing-validators=\"false\"&gt;\n"
+"            &lt;value&gt;org.mycompany.CheckCaseValidator&lt;/value&gt;\n"
+"        &lt;/validated-by&gt;\n"
+"    &lt;/constraint-definition&gt;\n"
+"&lt;/constraint-mappings&gt;"
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:128
+#, no-c-format
+msgid ""
+"The XML configuration is closely mirroring the programmatic API. For this "
+"reason it should suffice to just add some comments. <property>default-"
+"package</property> is used for all fields where a classname is expected. If "
+"the specified class is not fully qualified the configured default package "
+"will be used. Every mapping file can then have several <property>bean</"
+"property> nodes, each describing the constraints on the entity with the "
+"specified class name.<warning> <para>A given entity can only be configured "
+"once across all configuration files. If the same class is configured more "
+"than once an exception is thrown.</para> </warning>Settings <property>ignore-"
+"annotations</property> to true means that constraint annotations placed on "
+"the configured bean are ignored. The default for this value is "
+"<constant>true</constant>. ignore-annotations is also available for the "
+"nodes <property>class</property>, <property>fields</property> and "
+"<property>getter</property>. If not explicitly specified on these levels the "
+"configured <property>bean</property> value applies. Otherwise do the nodes "
+"<property>class</property>, <property>fields</property> and "
+"<property>getter</property> determine on which level the constraints are "
+"placed (see <xref linkend=\"validator-usingvalidator-annotate\"/>). The "
+"<property>constraint</property> node is then used to add a constraint on the "
+"corresponding level. Each constraint definition must define the class via "
+"the annotation attribute. The constraint attributes required by the Bean "
+"Validation specification (<property>message</property>, <property>groups</"
+"property> and <property>payload</property>) have dedicated nodes. All other "
+"constraint specific attributes are configured using the the "
+"<property>element</property> node."
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:156
+#, no-c-format
+msgid ""
+"The class node also allows to reconfigure the default group sequence (see "
+"<xref linkend=\"section-default-group-class\"/>) via the <property>group-"
+"sequence</property> node."
+msgstr ""
+
+#. Tag: para
+#: xmlconfiguration.xml:160
+#, no-c-format
+msgid ""
+"Last but not least, the list of <classname>ConstraintValidator</classname>s "
+"associated to a given constraint can be altered via the <property>constraint-"
+"definition</property> node. The <property>annotation</property> attribute "
+"represents the constraint annotation being altered. The <property>validated-"
+"by</property> elements represent the (ordered) list of "
+"<classname>ConstraintValidator</classname> implementations associated to the "
+"constraint. If <property>include-existing-validator</property> is set to "
+"<constant>false</constant>, validators defined on the constraint annotation "
+"are ignored. If set to <constant>true</constant>, the list of "
+"ConstraintValidators described in XML are concatenated to the list of "
+"validators described on the annotation."
+msgstr ""



More information about the hibernate-commits mailing list