Skip to content

Commit 56d3535

Browse files
committed
feat: int-aws s3-inbound-channel-adapter xsd schema
1 parent 195c8f9 commit 56d3535

File tree

1 file changed

+255
-0
lines changed

1 file changed

+255
-0
lines changed
Lines changed: 255 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,255 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<xsd:schema xmlns="http://www.springframework.org/schema/integration/aws"
3+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4+
xmlns:tool="http://www.springframework.org/schema/tool"
5+
xmlns:integration="http://www.springframework.org/schema/integration"
6+
targetNamespace="http://www.springframework.org/schema/integration/aws"
7+
elementFormDefault="qualified">
8+
9+
<xsd:import namespace="http://www.springframework.org/schema/beans"
10+
schemaLocation="http://www.springframework.org/schema/beans/spring-beans-4.3.xsd"/>
11+
<xsd:import namespace="http://www.springframework.org/schema/tool"
12+
schemaLocation="http://www.springframework.org/schema/tool/spring-tool-4.3.xsd"/>
13+
<xsd:import namespace="http://www.springframework.org/schema/integration"
14+
schemaLocation="https://www.springframework.org/schema/integration/spring-integration-5.2.xsd"/>
15+
16+
<xsd:annotation>
17+
<xsd:documentation><![CDATA[
18+
Defines the configuration elements for Spring Integration's AWS Adapters.
19+
]]></xsd:documentation>
20+
</xsd:annotation>
21+
22+
<xsd:element name="s3-inbound-channel-adapter">
23+
<xsd:annotation>
24+
<xsd:documentation><![CDATA[
25+
Configures a 'SourcePollingChannelAdapter' Endpoint for the
26+
'org.springframework.integration.aws.inbound.S3InboundFileSynchronizingMessageSource' that
27+
synchronizes a local directory with the contents of a remote Amazon S3 bucket.
28+
]]></xsd:documentation>
29+
</xsd:annotation>
30+
<xsd:complexType>
31+
<xsd:complexContent>
32+
<xsd:extension base="s3InboundAdapter">
33+
<xsd:attribute name="local-directory" type="xsd:string" use="required">
34+
<xsd:annotation>
35+
<xsd:documentation><![CDATA[
36+
Identifies the directory path (e.g.,
37+
"/local/mytransfers") where files
38+
will be transferred TO.
39+
]]></xsd:documentation>
40+
</xsd:annotation>
41+
</xsd:attribute>
42+
<xsd:attribute name="temporary-file-suffix" type="xsd:string">
43+
<xsd:annotation>
44+
<xsd:documentation><![CDATA[
45+
Extension used when downloading files.
46+
We change it right after we know it's downloaded.
47+
Default ".writing".
48+
]]></xsd:documentation>
49+
</xsd:annotation>
50+
</xsd:attribute>
51+
<xsd:attribute name="local-filename-generator-expression" type="xsd:string">
52+
<xsd:annotation>
53+
<xsd:documentation><![CDATA[
54+
Allows you to provide a SpEL expression to
55+
generate the file name of
56+
the local (transferred) file. The root
57+
object of the SpEL
58+
evaluation is the name of the original
59+
file.
60+
For example, a valid expression would be "#this.toUpperCase() +
61+
'.a'" where #this represents the
62+
original name of the remote
63+
file.
64+
]]></xsd:documentation>
65+
</xsd:annotation>
66+
</xsd:attribute>
67+
<xsd:attribute name="local-filter" type="xsd:string">
68+
<xsd:annotation>
69+
<xsd:appinfo>
70+
<tool:annotation kind="ref">
71+
<tool:expected-type type="org.springframework.integration.file.filters.FileListFilter"/>
72+
</tool:annotation>
73+
</xsd:appinfo>
74+
<xsd:documentation><![CDATA[
75+
Allows you to specify a reference to a
76+
[org.springframework.integration.file.filters.FileListFilter]
77+
bean. It is used to determine which files will generate messages
78+
after they have been synchronized. It will be combined with a filter that
79+
will prevent accessing files that are in the process of being synchronized
80+
(files having the 'temporary-file-suffix' suffix).
81+
The default is an FileSystemPersistentAcceptOnceFileListFilter
82+
which filters duplicate file names (processed during the current execution).
83+
]]></xsd:documentation>
84+
</xsd:annotation>
85+
</xsd:attribute>
86+
<xsd:attribute name="auto-create-local-directory" type="xsd:boolean">
87+
<xsd:annotation>
88+
<xsd:documentation><![CDATA[
89+
Tells this adapter if the local directory must
90+
be auto-created if it doesn't exist. Default is TRUE.
91+
]]></xsd:documentation>
92+
</xsd:annotation>
93+
</xsd:attribute>
94+
<xsd:attribute name="delete-remote-files" type="xsd:boolean">
95+
<xsd:annotation>
96+
<xsd:documentation><![CDATA[
97+
Specify whether to delete the remote source file after copying.
98+
By default, the remote files will NOT be deleted.
99+
]]></xsd:documentation>
100+
</xsd:annotation>
101+
</xsd:attribute>
102+
<xsd:attribute name="preserve-timestamp" type="xsd:boolean">
103+
<xsd:annotation>
104+
<xsd:documentation><![CDATA[
105+
Specify whether to preserve the modified timestamp from the remote source
106+
file on the local file after copying.
107+
By default, the remote timestamp will NOT be preserved.
108+
]]></xsd:documentation>
109+
</xsd:annotation>
110+
</xsd:attribute>
111+
<xsd:attribute name="remote-file-metadata-store" type="xsd:string">
112+
<xsd:annotation>
113+
<xsd:appinfo>
114+
<tool:annotation kind="ref">
115+
<tool:expected-type type="org.springframework.integration.metadata.MetadataStore"/>
116+
</tool:annotation>
117+
</xsd:appinfo>
118+
<xsd:documentation><![CDATA[
119+
Reference to [org.springframework.integration.metadata.MetadataStore] bean
120+
to hold a remote file info (host, port, remote directory)
121+
for transfer downstream in message headers when local file is pulled.
122+
]]></xsd:documentation>
123+
</xsd:annotation>
124+
</xsd:attribute>
125+
<xsd:attribute name="metadata-store-prefix" type="xsd:string">
126+
<xsd:annotation>
127+
<xsd:documentation><![CDATA[
128+
Specify a prefix for keys in metadata store
129+
to not clash with other keys in the shared store.
130+
By default bean name is used.
131+
]]></xsd:documentation>
132+
</xsd:annotation>
133+
</xsd:attribute>
134+
<xsd:attribute name="scanner" type="xsd:string">
135+
<xsd:annotation>
136+
<xsd:appinfo>
137+
<tool:annotation kind="ref">
138+
<tool:expected-type type="org.springframework.integration.file.DirectoryScanner"/>
139+
</tool:annotation>
140+
</xsd:appinfo>
141+
<xsd:documentation><![CDATA[
142+
Switch the local FileReadingMessageSource to use a custom
143+
DirectoryScanner.
144+
]]></xsd:documentation>
145+
</xsd:annotation>
146+
</xsd:attribute>
147+
</xsd:extension>
148+
</xsd:complexContent>
149+
</xsd:complexType>
150+
</xsd:element>
151+
152+
<xsd:complexType name="s3InboundAdapter">
153+
<xsd:sequence>
154+
<xsd:element ref="integration:poller" minOccurs="0" maxOccurs="1"/>
155+
</xsd:sequence>
156+
<xsd:attributeGroup ref="integration:channelAdapterAttributes"/>
157+
<xsd:attribute name="session-factory" type="xsd:string" use="required">
158+
<xsd:annotation>
159+
<xsd:appinfo>
160+
<tool:annotation kind="ref">
161+
<tool:expected-type
162+
type="org.springframework.integration.file.remote.session.SessionFactory"/>
163+
</tool:annotation>
164+
</xsd:appinfo>
165+
<xsd:documentation><![CDATA[
166+
Reference to an [org.springframework.integration.file.remote.session.SessionFactory] bean with
167+
a [software.amazon.awssdk.services.s3.model.S3Object] generic type parameter.
168+
Mutually exclusive with 's3'.
169+
]]></xsd:documentation>
170+
</xsd:annotation>
171+
</xsd:attribute>
172+
<xsd:attribute name="remote-file-separator" type="xsd:string" default="/">
173+
<xsd:annotation>
174+
<xsd:documentation><![CDATA[
175+
Allows you to provide remote file/directory
176+
separator character. DEFAULT: '/'
177+
]]></xsd:documentation>
178+
</xsd:annotation>
179+
</xsd:attribute>
180+
<xsd:attribute name="remote-directory" type="xsd:string">
181+
<xsd:annotation>
182+
<xsd:documentation><![CDATA[
183+
Identifies the remote directory path (e.g., "/remote/mytransfers")
184+
Mutually exclusive with 'remote-directory-expression'.
185+
]]></xsd:documentation>
186+
</xsd:annotation>
187+
</xsd:attribute>
188+
<xsd:attribute name="remote-directory-expression" type="xsd:string">
189+
<xsd:annotation>
190+
<xsd:documentation><![CDATA[
191+
Specify a SpEL expression which will be used to evaluate the directory
192+
path to where the files will be transferred
193+
(e.g., "headers.['remote_dir'] + '/myTransfers'" for outbound endpoints)
194+
There is no root object (message) for inbound endpoints
195+
(e.g., "@someBean.fetchDirectory");
196+
]]></xsd:documentation>
197+
</xsd:annotation>
198+
</xsd:attribute>
199+
<xsd:attribute name="filename-pattern" type="xsd:string">
200+
<xsd:annotation>
201+
<xsd:documentation><![CDATA[
202+
Allows you to provide a file name pattern to determine the file names that need to be scanned.
203+
This is based on simple pattern matching (e.g., "*.txt, fo*.txt" etc.)
204+
]]></xsd:documentation>
205+
</xsd:annotation>
206+
</xsd:attribute>
207+
<xsd:attribute name="filename-regex" type="xsd:string">
208+
<xsd:annotation>
209+
<xsd:documentation><![CDATA[
210+
Allows you to provide a Regular Expression to determine the file names that need to be scanned.
211+
(e.g., "f[o]+\.txt" etc.)
212+
]]></xsd:documentation>
213+
</xsd:annotation>
214+
</xsd:attribute>
215+
<xsd:attribute name="filter" type="xsd:string">
216+
<xsd:annotation>
217+
<xsd:appinfo>
218+
<tool:annotation kind="ref">
219+
<tool:expected-type type="org.springframework.integration.file.filters.FileListFilter"/>
220+
</tool:annotation>
221+
</xsd:appinfo>
222+
<xsd:documentation><![CDATA[
223+
Allows you to specify a reference to a
224+
[org.springframework.integration.file.filters.FileListFilter]
225+
bean. This filter is applied to files on the remote server and
226+
only files that pass the filter are retrieved.
227+
]]></xsd:documentation>
228+
</xsd:annotation>
229+
</xsd:attribute>
230+
<xsd:attribute name="filter-expression" type="xsd:string">
231+
<xsd:annotation>
232+
<xsd:documentation><![CDATA[
233+
Filter SpEL expression.
234+
]]></xsd:documentation>
235+
</xsd:annotation>
236+
</xsd:attribute>
237+
<xsd:attribute name="comparator" type="xsd:string">
238+
<xsd:annotation>
239+
<xsd:documentation><![CDATA[
240+
Specify a Comparator to be used when ordering Files. If none is provided, the
241+
order in which files are processed is the order they are received from the S3 server.
242+
The generic type of the Comparator is 'java.io.File'.
243+
]]></xsd:documentation>
244+
</xsd:annotation>
245+
</xsd:attribute>
246+
<xsd:attribute name="max-fetch-size" type="xsd:int">
247+
<xsd:annotation>
248+
<xsd:documentation><![CDATA[
249+
Limit the number of files to fetch.
250+
]]></xsd:documentation>
251+
</xsd:annotation>
252+
</xsd:attribute>
253+
</xsd:complexType>
254+
255+
</xsd:schema>

0 commit comments

Comments
 (0)