Skip to content

Commit ef6722c

Browse files
authored
GH-6375: Harmonize package structures
Fixes: #6375 * Move respective classes to the `inbound`, `outbound` or `support` packages to make the whole picture for the API more concise and clean The firs commit is for `stream` module * Fix `stream.adoc` for new `inbound/outbound` packages * Hormonize packages for FTP & SFTP modules * Hormonize packages for WS module * Improve `ws.adoc` to avoid `foo`, `bar` etc. * Harmonize packages in `mail` module * Move inbound channel adapters into a new `inbound` package * Move outbound channel adapters into a new `outbound` package * Preserve existing classes in the root package as deprecated and as extensions of new classes * Harmonize packages in `jmx` module * Move inbound channel adapters into a new `inbound` package * Move outbound channel adapters into a new `outbound` package * Preserve existing classes in the root package as deprecated and as extensions of new classes * Some tests refactoring according to modern AssertJ API * Fix typos in `jmx.adoc` * Harmonize packages in `file` module * Move inbound channel adapters into a new `inbound` package * Move outbound channel adapters into a new `outbound` package * Preserve existing classes in the root package as deprecated and as extensions of new classes * Some tests refactoring (affected files) according to modern AssertJ API * Harmonize packages in `jms` module * Move inbound channel adapters into a new `inbound` package * Move outbound channel adapters into a new `outbound` package * Move channels into a new `channel` package * Preserve existing classes in the root package as deprecated and as extensions of new classes * Some tests refactoring (affected files) according to modern AssertJ API * Use now a new in SF `SimpleDestinationResolver` for optimization with caching * Fix XSDs for proper class packages * Move JDBC components to new `inbound` or `outbound` packages, respectively * Revise affected tests for the modern AssertJ API * Bring back old classes into root package as deprecated and as extensions of moved classes to `inbound` & `outbound` packages * Move TCP & UDP adapters to respective new `tcp/inbound`, `tcp/outbound`, `udp/inbound` or `udp/outbound` packages, respectively. * Some code clean up for the affected classes and tests improvements according to AssertJ API * Bring back moved TCP/IP classes to their old place to preserve commit history. And mark them as `@Deprecated` * Mention the package standardization in the `whats-new.adoc` * Fix sentence in `whats-new.adoc` * Bring back `package-info.java` for the `org.springframework.integration.ip.tcp` where we still have deprecated classes
1 parent aad2f7b commit ef6722c

File tree

399 files changed

+17024
-13759
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

399 files changed

+17024
-13759
lines changed

spring-integration-file/src/main/java/org/springframework/integration/file/FileReadingMessageSource.java

Lines changed: 6 additions & 524 deletions
Large diffs are not rendered by default.

spring-integration-file/src/main/java/org/springframework/integration/file/FileWritingMessageHandler.java

Lines changed: 10 additions & 1124 deletions
Large diffs are not rendered by default.

spring-integration-file/src/main/java/org/springframework/integration/file/config/FileReadingMessageSourceFactoryBean.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
import org.springframework.beans.factory.BeanNameAware;
2727
import org.springframework.beans.factory.config.AbstractFactoryBean;
2828
import org.springframework.integration.file.DirectoryScanner;
29-
import org.springframework.integration.file.FileReadingMessageSource;
3029
import org.springframework.integration.file.filters.CompositeFileListFilter;
3130
import org.springframework.integration.file.filters.FileListFilter;
31+
import org.springframework.integration.file.inbound.FileReadingMessageSource;
3232
import org.springframework.integration.file.locking.AbstractFileLockerFilter;
3333
import org.springframework.util.Assert;
3434

spring-integration-file/src/main/java/org/springframework/integration/file/config/FileWritingMessageHandlerBeanDefinitionBuilder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@
2323
import org.springframework.integration.config.ExpressionFactoryBean;
2424
import org.springframework.integration.config.xml.IntegrationNamespaceUtils;
2525
import org.springframework.integration.file.DefaultFileNameGenerator;
26+
import org.springframework.integration.file.outbound.FileWritingMessageHandler;
2627
import org.springframework.util.StringUtils;
2728

2829
/**
2930
* A common helper class for the 'outbound-channel-adapter' and 'outbound-gateway'
3031
* element parsers. Both of those are responsible for creating an instance of
31-
* {@link org.springframework.integration.file.FileWritingMessageHandler}.
32+
* {@link FileWritingMessageHandler}.
3233
*
3334
* @author Mark Fisher
3435
* @author Artem Bilan

spring-integration-file/src/main/java/org/springframework/integration/file/config/FileWritingMessageHandlerFactoryBean.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
import org.springframework.integration.JavaUtils;
2525
import org.springframework.integration.config.AbstractSimpleMessageHandlerFactoryBean;
2626
import org.springframework.integration.file.FileNameGenerator;
27-
import org.springframework.integration.file.FileWritingMessageHandler;
28-
import org.springframework.integration.file.FileWritingMessageHandler.MessageFlushPredicate;
27+
import org.springframework.integration.file.outbound.FileWritingMessageHandler;
28+
import org.springframework.integration.file.outbound.FileWritingMessageHandler.MessageFlushPredicate;
2929
import org.springframework.integration.file.support.FileExistsMode;
3030

3131
/**

spring-integration-file/src/main/java/org/springframework/integration/file/dsl/FileInboundChannelAdapterSpec.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
import org.springframework.integration.expression.FunctionExpression;
3333
import org.springframework.integration.file.DirectoryScanner;
3434
import org.springframework.integration.file.FileLocker;
35-
import org.springframework.integration.file.FileReadingMessageSource;
3635
import org.springframework.integration.file.RecursiveDirectoryScanner;
3736
import org.springframework.integration.file.config.FileListFilterFactoryBean;
3837
import org.springframework.integration.file.filters.ExpressionFileListFilter;
3938
import org.springframework.integration.file.filters.FileListFilter;
39+
import org.springframework.integration.file.inbound.FileReadingMessageSource;
4040
import org.springframework.integration.file.locking.NioFileLocker;
4141
import org.springframework.util.Assert;
4242

@@ -224,7 +224,7 @@ public FileInboundChannelAdapterSpec regexFilter(String regex) {
224224
*/
225225
public FileInboundChannelAdapterSpec locker(FileLocker locker) {
226226
Assert.isNull(this.locker,
227-
"The 'locker' (" + this.locker + ") is already configured for the FileReadingMessageSource");
227+
() -> "The 'locker' (" + this.locker + ") is already configured for the FileReadingMessageSource");
228228
this.locker = locker;
229229
this.target.setLocker(locker);
230230
this.filtersSet = true;

spring-integration-file/src/main/java/org/springframework/integration/file/dsl/FileWritingMessageHandlerSpec.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import org.springframework.integration.expression.FunctionExpression;
3030
import org.springframework.integration.file.DefaultFileNameGenerator;
3131
import org.springframework.integration.file.FileNameGenerator;
32-
import org.springframework.integration.file.FileWritingMessageHandler;
32+
import org.springframework.integration.file.outbound.FileWritingMessageHandler;
3333
import org.springframework.integration.file.support.FileExistsMode;
3434
import org.springframework.messaging.Message;
3535
import org.springframework.scheduling.TaskScheduler;

spring-integration-file/src/main/java/org/springframework/integration/file/dsl/RemoteFileInboundChannelAdapterSpec.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import org.springframework.integration.file.DirectoryScanner;
3232
import org.springframework.integration.file.filters.ExpressionFileListFilter;
3333
import org.springframework.integration.file.filters.FileListFilter;
34+
import org.springframework.integration.file.inbound.FileReadingMessageSource;
3435
import org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer;
3536
import org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizingMessageSource;
3637
import org.springframework.integration.metadata.MetadataStore;
@@ -181,7 +182,7 @@ public S filter(FileListFilter<F> filter) {
181182
* Configure the {@link ExpressionFileListFilter}.
182183
* @param expression the SpEL expression for files filtering.
183184
* @return the spec.
184-
* @see org.springframework.integration.file.FileReadingMessageSource#setFilter(FileListFilter)
185+
* @see FileReadingMessageSource#setFilter(FileListFilter)
185186
* @see ExpressionFileListFilter
186187
*/
187188
public S filterExpression(String expression) {
@@ -193,7 +194,7 @@ public S filterExpression(String expression) {
193194
* Configure the {@link ExpressionFileListFilter}.
194195
* @param filterFunction the {@link Function} for files filtering.
195196
* @return the spec.
196-
* @see org.springframework.integration.file.FileReadingMessageSource#setFilter(FileListFilter)
197+
* @see FileReadingMessageSource#setFilter(FileListFilter)
197198
* @see ExpressionFileListFilter
198199
*/
199200
public S filterFunction(Function<F, Boolean> filterFunction) {

spring-integration-file/src/main/java/org/springframework/integration/file/filters/AcceptOnceFileListFilter.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@
2626

2727
import org.jspecify.annotations.Nullable;
2828

29+
import org.springframework.integration.file.inbound.FileReadingMessageSource;
30+
2931
/**
3032
* {@link FileListFilter} that passes files only one time. This can
3133
* conveniently be used to prevent duplication of files, as is done in
32-
* {@link org.springframework.integration.file.FileReadingMessageSource}.
34+
* {@link FileReadingMessageSource}.
3335
* <p>
3436
* This implementation is thread safe.
3537
*

0 commit comments

Comments
 (0)