-
Notifications
You must be signed in to change notification settings - Fork 566
/
integration.pot
191 lines (165 loc) · 9.04 KB
/
integration.pot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# SOME DESCRIPTIVE TITLE.
# FIRST AUTHOR <EMAIL@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@ADDRESS>\n"
"Language-Team: LANGUAGE <kde-i18n-doc@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-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 ""
"<hibernate-configuration>\n"
" <session-factory>\n"
" ...\n"
" <property name=\"javax.persistence.validation.group.pre-persist\">javax.validation.groups.Default</property>\n"
" <property name=\"javax.persistence.validation.group.pre-update\">javax.validation.groups.Default</property>\n"
" <property name=\"javax.persistence.validation.group.pre-remove\"></property>\n"
" ...\n"
" <event type=\"pre-update\">\n"
" <listener class=\"org.hibernate.cfg.beanvalidation.BeanValidationEventListener\"/>\n"
" </event>\n"
" <event type=\"pre-insert\">\n"
" <listener class=\"org.hibernate.cfg.beanvalidation.BeanValidationEventListener\"/>\n"
" </event>\n"
" <event type=\"pre-delete\">\n"
" <listener class=\"org.hibernate.cfg.beanvalidation.BeanValidationEventListener\"/>\n"
" </event>\n"
" </session-factory>\n"
"</hibernate-configuration>"
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 ""
"<h:form>\n"
" <emphasis role=\"bold\"><f:validateBean></emphasis>\n"
" <h:inputText value=”#{model.property}” />\n"
" <h:selectOneRadio value=”#{model.radioProperty}” > ... </h:selectOneRadio>\n"
" <!-- other input components here -->\n"
" <emphasis role=\"bold\"></f:validateBean></emphasis>\n"
"</h:form>"
msgstr ""