<?xml version="1.0" encoding="UTF-8"?>
<!--
	~ JBoss, Home of Professional Open Source
	~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
	~ by the @authors tag. See the copyright.txt in the distribution for a
	~ full listing of individual contributors.
	~
	~ Licensed under the Apache License, Version 2.0 (the "License");
	~ you may not use this file except in compliance with the License.
	~ You may obtain a copy of the License at
	~ http://www.apache.org/licenses/LICENSE-2.0
	~ Unless required by applicable law or agreed to in writing, software
	~ distributed under the License is distributed on an "AS IS" BASIS,
	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	~ See the License for the specific language governing permissions and
	~ limitations under the License.
-->
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
%BOOK_ENTITIES;
]>
<preface id="preface">
  <title>Preface</title>

  <para>Validating data is a common task that occurs throughout all
  application layers, from the presentation to the persistence layer. Often
  the same validation logic is implemented in each layer which is time
  consuming and error-prone. To avoid duplication of these validations,
  developers often bundle validation logic directly into the domain model,
  cluttering domain classes with validation code which is really metadata
  about the class itself.</para>

  <mediaobject>
    <imageobject role="fo">
      <imagedata align="center" contentdepth="" contentwidth="150mm"
                 fileref="application-layers.png" scalefit=""/>
    </imageobject>

    <imageobject role="html">
      <imagedata depth="" fileref="application-layers.png" scalefit="1"/>
    </imageobject>
  </mediaobject>

  <para>JSR 349 - Bean Validation 1.1 - defines a metadata model and API for
  entity and method validation. The default metadata source are 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 nor programming
  model. It is specifically not tied to either web or persistence tier, and is
  available for both server-side application programming, as well as rich
  client Swing application developers.</para>

  <para><mediaobject>
      <imageobject role="fo">
        <imagedata align="center" contentdepth="" contentwidth="150mm"
                   fileref="application-layers2.png" scalefit=""/>
      </imageobject>

      <imageobject role="html">
        <imagedata depth="" fileref="application-layers2.png" scalefit="1"/>
      </imageobject>
    </mediaobject></para>

  <para>Hibernate Validator is the reference implementation of this JSR 349.
  The implementation itself as well as the Bean Validation API and TCK are all
  provided and distributed under the <ulink
  url="http://www.apache.org/licenses/LICENSE-2.0">Apache Software License
  2.0</ulink>.</para>
</preface>
