forked from spring-projects/spring-integration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spring-integration-jpa-3.0.xsd
588 lines (559 loc) · 21.7 KB
/
spring-integration-jpa-3.0.xsd
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://www.springframework.org/schema/integration/jpa"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:tool="http://www.springframework.org/schema/tool"
xmlns:integration="http://www.springframework.org/schema/integration"
targetNamespace="http://www.springframework.org/schema/integration/jpa"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xsd:import namespace="http://www.springframework.org/schema/beans" />
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
<xsd:annotation>
<xsd:documentation><![CDATA[
Defines the configuration elements for Spring Integration's JPA Adapter.
]]></xsd:documentation>
</xsd:annotation>
<xsd:element name="inbound-channel-adapter">
<xsd:annotation>
<xsd:documentation>
The definition for the Spring Integration JPA Inbound Channel Adapter.
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="integration:poller" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attributeGroup ref="coreJpaComponentAttributes"/>
<xsd:attribute name="channel" type="xsd:string">
<xsd:annotation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="org.springframework.integration.core.MessageChannel" />
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="parameter-source" type="xsd:string">
<xsd:annotation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="org.springframework.integration.jpa.core.JpaQLParameterSource" />
</tool:annotation>
</xsd:appinfo>
<xsd:documentation>
specifies the parameter source that would be used to
provide additional parameters.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attributeGroup ref="commonRetrievingJpaAttributes" />
<xsd:attribute name="send-timeout" type="xsd:string">
<xsd:annotation>
<xsd:documentation><![CDATA[
Allows you to specify how long this inbound-channel-adapter
will wait for the message (containing the retrieved entities)
to be sent successfully to the message channel, before throwing
an exception.
Keep in mind that when sending to a DirectChannel, the
invocation will occur in the sender's thread so the failing
of the send operation may be caused by other components
further downstream. By default the Inbound Channel Adapter
will wait indefinitely. The value is specified in milliseconds.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="outbound-channel-adapter">
<xsd:annotation>
<xsd:documentation>
Defines an outbound Channel Adapter for updating a
database using the Java Persistence API (JPA).
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="integration:poller" minOccurs="0" maxOccurs="1" />
<xsd:element name="transactional" type="integration:transactionalType" minOccurs="0" maxOccurs="1" />
<xsd:element name="parameter" minOccurs="0" maxOccurs="unbounded" type="parameterSubElementType">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Provides a mechanism to provide
parameters for the queries that are either based
on the Java Persistence Query Language (JPQL) or
native SQL queries.
Parameters can also be provided for Named Queries.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="request-handler-advice-chain" type="integration:adviceChainType" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
<xsd:attributeGroup ref="coreJpaComponentAttributes"/>
<xsd:attributeGroup ref="commonUpdatingJpaAttributes"/>
<xsd:attribute name="use-payload-as-parameter-source">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
If set to 'true', the payload of the Message will be used
as a source for providing parameters. If false the entire
Message will be available as a source for parameters.
If no JPA Parameters are passed in, this property
will default to 'true'. This means that using a default
BeanPropertyParameterSourceFactory, the bean properties
of the payload will be used as a source for parameter
values for the to-be-executed JPA query.
However, if JPA Parameters are passed in, then this
property will by default evaluate to 'false'. JPA Parameters
allow for SpEL Expressions to be provided and therefore
it is highly beneficial to have access to the entire Message.
]]>
</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:union memberTypes="xsd:boolean xsd:string" />
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="parameter-source-factory"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo>
<xsd:documentation>
Reference to a ParameterSourceFactory.
</xsd:documentation>
<tool:annotation kind="ref">
<tool:expected-type type="org.springframework.integration.jpa.support.parametersource.ParameterSourceFactory" />
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="channel" type="xsd:string">
<xsd:annotation>
<xsd:appinfo>
<xsd:documentation>
Channel from which messages will be output.
When a message is sent to this channel it will
cause the query
to be executed.
</xsd:documentation>
<tool:annotation kind="ref">
<tool:expected-type type="org.springframework.integration.MessageChannel" />
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="order">
<xsd:annotation>
<xsd:documentation>
Specifies the order for invocation when this endpoint is connected as a
subscriber to a SubscribableChannel.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="updating-outbound-gateway">
<xsd:annotation>
<xsd:documentation>
Defines the Spring Integration JPA Outbound Gateway
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="integration:poller" minOccurs="0" maxOccurs="1" />
<xsd:element name="transactional" type="integration:transactionalType" minOccurs="0" maxOccurs="1" />
<xsd:element name="parameter" minOccurs="0" maxOccurs="unbounded" type="parameterSubElementType">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Provides a mechanism to provide
parameters for the queries that are either based
on the Java Persistence Query Language (JPQL) or
native SQL queries.
Parameters can also be provided for Named Queries.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="request-handler-advice-chain" type="integration:adviceChainType" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
<xsd:attributeGroup ref="coreJpaComponentAttributes" />
<xsd:attributeGroup ref="commonUpdatingJpaAttributes"/>
<xsd:attributeGroup ref="commonJpaOutboundGatewayAttributes"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="retrieving-outbound-gateway">
<xsd:annotation>
<xsd:documentation>
Defines a Spring Integration JPA Outbound Gateway
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="integration:poller" minOccurs="0" maxOccurs="1" />
<xsd:element name="transactional" type="integration:transactionalType" minOccurs="0" maxOccurs="1" />
<xsd:element name="parameter" minOccurs="0" maxOccurs="unbounded" type="parameterSubElementType">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Provides a mechanism to provide
parameters for the queries that are either based
on the Java Persistence Query Language (JPQL) or
native SQL queries.
Parameters can also be provided for Named Queries.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="request-handler-advice-chain" type="integration:adviceChainType" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
<xsd:attributeGroup ref="coreJpaComponentAttributes" />
<xsd:attributeGroup ref="commonJpaOutboundGatewayAttributes"/>
<xsd:attributeGroup ref="commonRetrievingJpaAttributes" />
</xsd:complexType>
</xsd:element>
<xsd:complexType name="parameterSubElementType">
<xsd:attribute name="name" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation><![CDATA[
The name of Jpa parameter. This parameter can also be used for
native SQL query parameters. The name attribute is optional.
If the name is not provided, this parameter will act as a positional
parameters, in which case the order of the parameter sub-element
matters.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="value" type="xsd:string">
<xsd:annotation>
<xsd:documentation><![CDATA[
The value of the parameter. Either this or the 'expression'
attribute must be provided.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="type" type="xsd:string">
<xsd:annotation>
<xsd:documentation><![CDATA[
The type of the value used. If nothing is provided this attribute
will default to java.lang.String. This attribute is not used
when the 'expression' attribute is used instead.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="expression" type="xsd:string">
<xsd:annotation>
<xsd:documentation><![CDATA[
Expression to be evaluated to produce a parameter value.
Either this or the 'value' attribute must be provided.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<xsd:attributeGroup name="commonJpaOutboundGatewayAttributes">
<xsd:attribute name="use-payload-as-parameter-source">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
If set to 'true', the payload of the Message will be used
as a source for providing parameters. If false the entire
Message will be available as a source for parameters.
If no JPA Parameters are passed in, this property
will default to 'true'. This means that using a default
BeanPropertyParameterSourceFactory, the bean properties
of the payload will be used as a source for parameter
values for the to-be-executed JPA query.
However, if JPA Parameters are passed in, then this
property will by default evaluate to 'false'. JPA Parameters
allow for SpEL Expressions to be provided and therefore
it is highly beneficial to have access to the entire Message.
]]>
</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:union memberTypes="xsd:boolean xsd:string" />
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="request-channel" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
The receiving Message Channel of this endpoint.
</xsd:documentation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="org.springframework.integration.core.MessageChannel" />
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="reply-channel" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
Message Channel to which replies should be
sent, after receiving the database response.
</xsd:documentation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="org.springframework.integration.core.MessageChannel" />
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="reply-timeout" type="xsd:string">
<xsd:annotation>
<xsd:documentation><![CDATA[
Allows you to specify how long this gateway will wait for
the reply message to be sent successfully to the reply channel
before throwing an exception. This attribute only applies when the
channel might block, for example when using a bounded queue channel that
is currently full.
Also, keep in mind that when sending to a DirectChannel, the
invocation will occur in the sender's thread. Therefore,
the failing of the send operation may be caused by other
components further downstream.
The "reply-timeout" attribute maps to the "sendTimeout" property of the
underlying 'MessagingTemplate' instance (org.springframework.integration.core.MessagingTemplate).
The attribute will default, if not specified, to '-1', meaning that
by default, the Gateway will wait indefinitely. The value is
specified in milliseconds.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="parameter-source-factory" type="xsd:string">
<xsd:annotation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="org.springframework.integration.jpa.JPAQLParameterSourceFactory" />
</tool:annotation>
</xsd:appinfo>
<xsd:documentation>
The parameter source factory that would be used for evaluating the
parameters of the response JPA QL that would be evaluated
JPA outbound gateway
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="order">
<xsd:annotation>
<xsd:documentation>
Specifies the order for invocation when this endpoint is connected as a
subscriber to a SubscribableChannel.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="requires-reply" type="xsd:string" use="optional" default="true">
<xsd:annotation>
<xsd:documentation>
Specify whether this outbound gateway must return a non-null value. This value is
'true' by default, and a ReplyRequiredException will be thrown when
the underlying service returns a null value.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:attributeGroup>
<xsd:attributeGroup name="commonUpdatingJpaAttributes">
<xsd:attribute name="persist-mode" use="optional" default="MERGE">
<xsd:annotation>
<xsd:documentation><![CDATA[
Defines the persistence mode which is used when soley using
the entity-class. This attribute instructs to either Merge
entities, to Persist them. Furthermore and entity can also
be deleted. By Default 'MERGE' is used.
]]></xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:union memberTypes="persistMode xsd:string"/>
</xsd:simpleType>
</xsd:attribute>
</xsd:attributeGroup>
<xsd:attributeGroup name="commonRetrievingJpaAttributes">
<xsd:attribute name="max-number-of-results">
<xsd:annotation>
<xsd:documentation>
Specifies the maximum number of entities that shall be returned
by a JPA Operation. Using this attribute you basically set
the 'maxResults' property of the JPA Query object.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="expect-single-result" default="false">
<xsd:annotation>
<xsd:documentation><![CDATA[
This parameter indicates that only one result object shall be
returned as a result from the executed JPA operation.
If set to 'true' and the result list from the JPA operations
contains only 1 element, then that 1 element is extracted
and returned as payload.
If the result map contains more than 1 element and
'expect-single-result' is true, then a 'MessagingException'
is thrown.
If set to 'false', the complete result list is returned
as the payload.
]]>
</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:union memberTypes="xsd:boolean xsd:string" />
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="delete-after-poll" default="false" use="optional">
<xsd:annotation>
<xsd:documentation>
Once entities have been retrieved from the database, shall
they be removed from the database?
If instead of deleting the retrieved entities, you would
rather like to updated them, e.g. setting a flag in a
column marking the record as retrieved, please consider
using a subsequent Outbound Gateway (coupled with a payload enricher).
</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:union memberTypes="xsd:boolean xsd:string" />
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="delete-in-batch" default="false" use="optional">
<xsd:annotation>
<xsd:documentation>
If you want to automatically remove retrieved entities from
the database you can also specify using the 'delete-in-batch'
attribute, whether the list of retrieved objects shall be
deleted on a 'per-object-basis (false) or whether the objects
shall be removed using a batch operation (true). The
attribute defaults to 'false'.
</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:union memberTypes="xsd:boolean xsd:string" />
</xsd:simpleType>
</xsd:attribute>
</xsd:attributeGroup>
<xsd:attributeGroup name="coreJpaComponentAttributes">
<xsd:attribute name="id" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation>
Identifies the underlying Spring bean definition, which is an
instance of either 'EventDrivenConsumer' or 'PollingConsumer',
depending on whether the component's input channel is a
'SubscribableChannel' or 'PollableChannel'.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="entity-manager-factory" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The reference to the JPA Entity Manager Factory
that will be used by the adapter to create the EntityManager.
Either this attribute or the 'enity-manager' attribute or the
'jpa-operations' attribute must be provided.
]]>
</xsd:documentation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="javax.persistence.EntityManagerFactory" />
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="entity-manager" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The reference to the JPA Entity Manager that will be used by
the adapter. Either this attribute or the 'enity-manager-factory'
attribute or the 'jpa-operations' attribute must be provided.
]]>
</xsd:documentation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="javax.persistence.EntityManager" />
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="jpa-operations" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Reference to a bean implementing the JpaOperations interface.
In rare cases it might be advisable to provide your own implementation
of the JpaOperations interface, instead of relying on the
default implementation. As JpaOperations wraps the necessay
datasource; the JPA Entity Manager or JPA Entity Manager Factory
must not be provided if the 'jpa-operations' attribute is used.
]]>
</xsd:documentation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="org.springframework.integration.jpa.core.JpaOperations" />
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="entity-class">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The reference to the JPA Persistence Entity. If not specified the
entity class will be retrieved from the Message's payload (for
operation that involve an enityClass).
]]>
</xsd:documentation>
<xsd:appinfo>
<tool:annotation kind="value">
<tool:expected-type type="java.lang.Class" />
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="jpa-query" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Defines the JPA query (Java Persistence Query Language) to be used.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="native-query" type="xsd:string">
<xsd:annotation>
<xsd:documentation><![CDATA[
Defines the native SQL query to be used.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="named-query" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
This attribute refers to a named query. A named query can be
either be defined in Native SQL or JPAQL but the underlying JPA
persistence provider handles that distinction internally.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="auto-startup" default="true" use="optional">
<xsd:annotation>
<xsd:documentation>
Flag to indicate that the component should start automatically
on startup (default true).
</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:union memberTypes="xsd:boolean xsd:string" />
</xsd:simpleType>
</xsd:attribute>
</xsd:attributeGroup>
<xsd:simpleType name="persistMode">
<xsd:restriction base="xsd:token">
<xsd:enumeration value="DELETE"/>
<xsd:enumeration value="MERGE"/>
<xsd:enumeration value="PERSIST"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>