Commit Graph

337 Commits

Author SHA1 Message Date
Gary Russell
65d2024937 INT-3737: (S)FTP Outbound Gateway Streaming GET
JIRA: https://jira.spring.io/browse/INT-3737

Support returning an `InputStream` from a GET operation.

This can be used in conjuction with a `<file:splitter/>` to stream a text file.

The user is responsible for releasing the session when the download is complete.

The session object is stored in the message header and `RemoteFileUtils.closeSession()` should be called
to clean up and close the session.

INT-3737: Polishing and Docs

Fix `CachedSession.close()` bug

Preventing `Caused by: java.io.IOException: Previous raw read was not finalized`
when `Session` is returned to the pool, but `readingRaw` hasn't been finalized
because the real `close()` isn't invoked in case of normal return to pool.
2015-06-19 13:39:36 -04:00
Gary Russell
505bfac2f8 INT-3735: (S)FTP Fix Schema Expected Type
JIRA: https://jira.spring.io/browse/INT-3735
2015-06-17 16:12:06 -04:00
Gary Russell
123b38a008 INT-3706: Support FileExistModes in (S)FTP Gateway
JIRA: https://jira.spring.io/browse/INT-3706

Previously, the `mode` attribute on the (S)FTP outbound gateways was ignored.

Take account of the mode on (M)GET and (M)PUT commands.
2015-05-12 13:21:26 +03:00
Gary Russell
c2ee93f9e1 INT-3696: Use StringBuilder in FtpFileInfo
JIRA: https://jira.spring.io/browse/INT-3696
2015-05-11 09:45:03 +01:00
Gary Russell
195ee70568 INT-3632: Sonar Improvements
JIRA: https://jira.spring.io/browse/INT-3632

- Use Map.entrySet()
- Double check locking only works when the field(s) are volatile
- Remove unnecessary instanceof tests
2015-02-10 18:00:07 -05:00
Gary Russell
15eb01169d INT-3581: Support selector-expression on WireTap
JIRA: https://jira.spring.io/browse/INT-3581

Move schemas to 4.2.

Add `selector-expression` to `<wire-tap/>`.

INT-3781: Fix What's New

Bump Namespace Version to 4.2
2015-01-13 15:32:06 -05:00
Gary Russell
2581388cc2 INT-3606: Implement Closeable/Flushable
JIRA: https://jira.spring.io/browse/INT-3606

Close the store when an (S)FTP synchronizing MessageSource is stopped.

Will need another commit on 4.2.WIP to change to `Lifecycle`.

Add dirty Flag to Properties MetadataStore

Avoid unnecessary persists.

Remove unnecessary implementation of `AbstractInboundFileSynchronizingMessageSource#getComponentType()`
2015-01-13 15:35:58 +02:00
Gary Russell
91e7d78884 INT-3592: Fix (S)FTP Gateway CTOR Visibility
JIRA: https://jira.spring.io/browse/INT-3592

CTORs were incorrectly `private` which is ok for XML
configuration, but not for DSL/Java Config.
2015-01-05 14:20:45 +02:00
Artem Bilan
41dcd8a453 INT-3573: Fix EEvalSplitter for Iterator
JIRA: https://jira.spring.io/browse/INT-3573

Fix `seen` `Queue` `NPE` for `(S)FtpInboundRemoteFileSystemSynchronizerTests`:
https://build.spring.io/browse/INT-B41-JOB1-164/test/case/155357717

**Cherry-pick to 4.0.x**
2014-12-09 22:48:18 +02:00
Gary Russell
e4f1ee14aa INT-3537 RemoteFileTemplate Close Stream
JIRA: https://jira.spring.io/browse/INT-3537

Stream not closed if session cannot be created.

Add `try {} finally {}`.

__cherry-pick to 4.0.x, 3.0.x__
2014-10-22 12:26:08 +03:00
Gary Russell
403c91801d INT-3412 (S)FTP Append, rmdir, Client Access
JIRA: https://jira.spring.io/browse/INT-3412

Initial commit - review only.

TODO:
- SFTP Tests
- Namespace/Adapter support for file append
- Docs

INT-3412 Polishing

- Addressed PR comments
- Completed SFTP implementation
- Added namespace/parser support for `FileExistsMode` (append, etc)
- Added SFTP Tests
- Created Embedded SFTP server for tests (similar to FTP)
- Converted tests that needed a real server to use the embedded server

INT-3412 Docs and Polish (PR Comments)
2014-08-04 15:08:34 +03:00
Gary Russell
eff1c7b7d8 INT-3464 Fix Test Filenames 2014-07-24 10:55:35 -04:00
Gary Russell
a20fa9a029 INT-3464 Exceptions and AcceptOnceFileListFilter
JIRA: https://jira.spring.io/browse/INT-3464

Previously, if an IO exeption occurred while synchronizing
files, and an AcceptOnceFileListFilter is being used, files that were
not transferred would not be fetched next time.

Add strategy `ReversibleFileListFilter` that can rollback previously
accepted files.

Implement this interface on `AcceptOnceFileListFilter` and
`AbstractPersistentAcceptOnceFileListFilter`.

Add test cases.

Polishing
2014-07-24 16:56:38 +03:00
Artem Bilan
be362f90c6 INT-3462: Polishing (s)ftp XSD
JIRA: https://jira.spring.io/browse/INT-3462
2014-07-07 15:11:09 -04:00
Artem Bilan
f5145f531b INT-3418: Final Phase: Cleanup
INT-3418: use versioned XSDs for XSD import
2014-06-09 10:08:30 -04:00
Artem Bilan
77b31f58fd INT-3418: xsd-4.0 -> 4.1 2014-06-05 13:34:52 +03:00
Artem Bilan
c0ab912c49 INT-3418: xsd-3.0 -> 4.0 2014-06-05 13:34:41 +03:00
Artem Bilan
9e5e7514e0 INT-3418: xsd-2.2 -> 3.0 2014-06-05 13:34:30 +03:00
Artem Bilan
9bd441c8d0 INT-3418: xsd-2.1 -> 2.2 2014-06-05 13:34:19 +03:00
Artem Bilan
af1cd16027 INT-3418: xsd-2.0 -> 2.1 2014-06-05 13:33:57 +03:00
Artem Bilan
cedbf6edc2 INT-3418: Prepare 4.1 VERSION
JIRA: https://jira.spring.io/browse/INT-3418

* Create 4.1 XSD
* Clean up Docs for 4.1
* Prepare WebSocket module
* Add Reactor dependency
* Remove Eclipse and SNV artifacts

Phase #1: prepare

Conflicts:
	gradle.properties
2014-05-30 21:14:21 +03:00
Gary Russell
7dc9c6b983 INT-2586 FTP Session Factory: Expose Timeout Props
JIRA: https://jira.spring.io/browse/INT-2586

Add timeout properties to the `DefaultFtpSessionFactory`
avoiding the need to subclass it just to set these
common properties.
2014-04-17 14:35:09 +03:00
Gary Russell
a7489909d7 INT-2738 Add Missing getComponentType() Methods
JIRA: https://jira.spring.io/browse/INT-2738

Add a `getComponentType()` method for all handlers,
message producers, and message sources that implement
`NamedComponent` (see `SPCA.getComponentType()`).

Add rome as an optional dependency - STS complained
because AtomFeedHttpMessageConverter has a dependency
on it.
2014-04-14 16:45:47 +03:00
Gary Russell
4dee2a224b INT-3353 Concurrent RedisMetadataStore
JIRA: https://jira.spring.io/browse/INT-3353

Shared metadata for PersistentAcceptOnceFileListFilters.

INT-3353 Polishing; PR Comments
2014-04-07 17:38:33 +03:00
Gary Russell
9dee131e3c INT-3349 BeanFactory Propagation
JIRA: https://jira.spring.io/browse/INT-3349

Several FactoryBeans did not propagate the BeanFactory
to their created object(s). Beans that create messages
must have access to a bean factory to get the
message builder factory.

Fix the FactoryBeans and add a mock FB to all tests that
need one.

Add a runtime environment variable to make any infractions
fatal. This should be set to `true` on CI builds and on
framework developer environments.
2014-04-02 14:15:48 -04:00
Gary Russell
1c9bcaccee INT-3041 Add Namespace Support For Retry Advice
JIRA: https://jira.spring.io/browse/INT-3041

Add namespace support to simplify configuration of
a `RequestHandlerRetryAdvice.

INT-3041 Polishing; PR Comments

* Allow a retry-advice element within the request-handler-advice-chain
* Clean up schema (should not have allowed `synchronization-factory` on
    the request-handler-advice-chain.

INT-3041 Polishing; PR Comment
2014-03-11 17:56:51 +02:00
Gary Russell
1d002bfc47 INT-3266 (S)FTP Close Dirty Cached Sessions
If an exception occurs on a session it should be physically closed
and not reused because its state is indeterminate and the next
operation might fail.

Note: The booleans within CachedSession do not need to be volatile
because it is a short-lived object only used by the current thread.

Also fixes the assertion message in RFT.get().

JIRA: https://jira.springsource.org/browse/INT-3266

INT-3266 Polishing - PR Comments

Remove need for SuppressWarnings.
Fix 2 test cases where the exception has an additional cause.
2014-01-21 11:19:26 +02:00
Gary Russell
c45b708341 INT-3262 JDK8 Javadoc Commit
Increase receive timeout for `Jsr223TransformerTests#testInt3162ScriptExecutorThreadSafety`.

JIRA: https://jira.springsource.org/browse/INT-3262
JIRA: https://jira.springsource.org/browse/INT-3263
2014-01-15 19:16:37 +02:00
Gary Russell
e8843f3358 INT-3208 Create 4.0 Schemas
Update the spring.schemas files.

Update the version in the abstract namespace parser.

JIRA: https://jira.springsource.org/browse/INT-3208

The following is a diff showing changes between the 3.0 and 4.0 schemas...

./spring-integration-amqp/src/main/resources/org/springframework/integration/amqp/config/spring-integration-amqp-3.0.xsd
12c12
< 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd"/>
---
> 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd"/>
./spring-integration-core/src/main/resources/org/springframework/integration/config/xml/spring-integration-3.0.xsd
./spring-integration-event/src/main/resources/org/springframework/integration/event/config/spring-integration-event-3.0.xsd
11c11
< 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
./spring-integration-feed/src/main/resources/org/springframework/integration/feed/config/spring-integration-feed-3.0.xsd
12c12
< 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
./spring-integration-file/src/main/resources/org/springframework/integration/file/config/spring-integration-file-3.0.xsd
13c13
<                 schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd"/>
---
>                 schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd"/>
./spring-integration-ftp/src/main/resources/org/springframework/integration/ftp/config/spring-integration-ftp-3.0.xsd
13c13
< 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
15c15
< 		schemaLocation="http://www.springframework.org/schema/integration/file/spring-integration-file-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/file/spring-integration-file-4.0.xsd" />
./spring-integration-gemfire/src/main/resources/org/springframework/integration/gemfire/config/xml/spring-integration-gemfire-3.0.xsd
./spring-integration-groovy/src/main/resources/org/springframework/integration/groovy/config/spring-integration-groovy-3.0.xsd
10c10
< 		schemaLocation="http://www.springframework.org/schema/integration/scripting/spring-integration-scripting-core-3.0.xsd"
---
> 		schemaLocation="http://www.springframework.org/schema/integration/scripting/spring-integration-scripting-core-4.0.xsd"
13c13
< 	<xsd:import namespace="http://www.springframework.org/schema/integration" schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 	<xsd:import namespace="http://www.springframework.org/schema/integration" schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
./spring-integration-http/src/main/resources/org/springframework/integration/http/config/spring-integration-http-3.0.xsd
11c11
< 				schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 				schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
./spring-integration-ip/src/main/resources/org/springframework/integration/ip/config/spring-integration-ip-3.0.xsd
12c12
< 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
./spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/config/spring-integration-jdbc-3.0.xsd
9c9
< 	<xsd:import namespace="http://www.springframework.org/schema/integration" schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 	<xsd:import namespace="http://www.springframework.org/schema/integration" schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
./spring-integration-jms/src/main/resources/org/springframework/integration/jms/config/spring-integration-jms-3.0.xsd
14c14
< 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd"/>
---
> 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd"/>
./spring-integration-jmx/src/main/resources/org/springframework/integration/jmx/config/spring-integration-jmx-3.0.xsd
9c9
< 	<xsd:import namespace="http://www.springframework.org/schema/integration" schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 	<xsd:import namespace="http://www.springframework.org/schema/integration" schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
./spring-integration-jpa/src/main/resources/org/springframework/integration/jpa/config/xml/spring-integration-jpa-3.0.xsd
12c12
< 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
./spring-integration-mail/src/main/resources/org/springframework/integration/mail/config/spring-integration-mail-3.0.xsd
14c14
< 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd"/>
---
> 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd"/>
./spring-integration-mongodb/src/main/resources/org/springframework/integration/mongodb/config/spring-integration-mongodb-3.0.xsd
11c11
< 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
./spring-integration-redis/src/main/resources/org/springframework/integration/redis/config/spring-integration-redis-3.0.xsd
11c11
< 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
./spring-integration-rmi/src/main/resources/org/springframework/integration/rmi/config/spring-integration-rmi-3.0.xsd
14c14
< 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd"/>
---
> 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd"/>
./spring-integration-scripting/src/main/resources/org/springframework/integration/scripting/config/spring-integration-scripting-3.0.xsd
8c8
< 		schemaLocation="http://www.springframework.org/schema/integration/scripting/spring-integration-scripting-core-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/scripting/spring-integration-scripting-core-4.0.xsd" />
./spring-integration-scripting/src/main/resources/org/springframework/integration/scripting/config/spring-integration-scripting-core-3.0.xsd
11c11
< 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
./spring-integration-security/src/main/resources/org/springframework/integration/security/config/spring-integration-security-3.0.xsd
./spring-integration-sftp/src/main/resources/org/springframework/integration/sftp/config/spring-integration-sftp-3.0.xsd
13c13
< 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
15c15
< 		schemaLocation="http://www.springframework.org/schema/integration/file/spring-integration-file-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/file/spring-integration-file-4.0.xsd" />
./spring-integration-stream/src/main/resources/org/springframework/integration/stream/config/spring-integration-stream-3.0.xsd
14c14
< 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd"/>
---
> 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd"/>
./spring-integration-syslog/src/main/resources/org/springframework/integration/syslog/config/spring-integration-syslog-3.0.xsd
13c13
< 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
15c15
< 		schemaLocation="http://www.springframework.org/schema/integration/ip/spring-integration-ip-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/ip/spring-integration-ip-4.0.xsd" />
./spring-integration-twitter/src/main/resources/org/springframework/integration/twitter/config/spring-integration-twitter-3.0.xsd
14c14
< 				schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd"/>
---
> 				schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd"/>
./spring-integration-ws/src/main/resources/org/springframework/integration/ws/config/spring-integration-ws-3.0.xsd
14c14
< 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd"/>
---
> 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd"/>
./spring-integration-xml/src/main/resources/org/springframework/integration/xml/config/spring-integration-xml-3.0.xsd
13c13
< 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd"/>
---
> 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd"/>
./spring-integration-xmpp/src/main/resources/org/springframework/integration/xmpp/config/spring-integration-xmpp-3.0.xsd
14c14
< 				schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd"/>
---
> 				schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd"/>
2013-12-16 13:04:18 -05:00
Gary Russell
a24b9ffa22 Merge remote-tracking branch 'upstream/master' into 4.0.0-WIP
Conflicts:
	spring-integration-core/src/main/java/org/springframework/integration/gateway/MessagingGatewaySupport.java
	spring-integration-core/src/main/java/org/springframework/integration/support/channel/BeanFactoryChannelResolver.java
	spring-integration-core/src/main/java/org/springframework/integration/util/MessagingMethodInvokerHelper.java
	spring-integration-core/src/test/java/org/springframework/integration/config/AggregatorParserTests.java
	spring-integration-core/src/test/java/org/springframework/integration/config/annotation/AggregatorAnnotationTests.java
	spring-integration-core/src/test/java/org/springframework/integration/config/xml/ControlBusTests.java
	spring-integration-file/src/main/java/org/springframework/integration/file/DefaultFileNameGenerator.java
	spring-integration-file/src/main/java/org/springframework/integration/file/remote/handler/FileTransferringMessageHandler.java
	spring-integration-file/src/test/java/org/springframework/integration/file/remote/gateway/RemoteFileOutboundGatewayTests.java
	spring-integration-ftp/src/test/java/org/springframework/integration/ftp/config/FtpOutboundGatewayParserTests.java
	spring-integration-ftp/src/test/java/org/springframework/integration/ftp/inbound/FtpInboundRemoteFileSystemSynchronizerTests.java
	spring-integration-ftp/src/test/java/org/springframework/integration/ftp/outbound/FtpServerOutboundTests.java
	spring-integration-groovy/src/main/java/org/springframework/integration/groovy/GroovyScriptExecutingMessageProcessor.java
	spring-integration-http/src/test/java/org/springframework/integration/http/outbound/UriVariableExpressionTests.java
	spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/HelloWorldInterceptor.java
	spring-integration-jpa/src/test/java/org/springframework/integration/jpa/outbound/JpaOutboundGatewayIntegrationTests.java
	spring-integration-mongodb/src/test/java/org/springframework/integration/mongodb/store/MongoDbMessageGroupStoreTests.java
	spring-integration-mongodb/src/test/java/org/springframework/integration/mongodb/store/MongoDbMessageStoreTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests.java
	spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/SftpOutboundGatewayParserTests.java
	spring-integration-sftp/src/test/java/org/springframework/integration/sftp/inbound/SftpInboundRemoteFileSystemSynchronizerTests.java
	spring-integration-sftp/src/test/java/org/springframework/integration/sftp/outbound/SftpServerOutboundTests.java

Resolved.
2013-11-25 17:59:51 -05:00
Gary Russell
59d6f7dfc1 INT-3088 (S)FTP Outbound Gateway - PUT and MPUT
- Core support in file module
- FTP Parser and Test

https://jira.springsource.org/browse/INT-3088

INT-3088 Add SFTP Support for PUT, MPUT

INT-3088 Polishing - PR Comments

INT-3088 Docbook For PUT/MPUT
2013-11-19 12:56:48 +02:00
Gary Russell
1d0c28852f INT-3204 RemoteFileTemplate Phase II Part 1
- AbstractInboundFileSynchronizer

INT-3204 RemoteFileTemplate Phase II, Part 2

- AbstractRemoteFileOutboundGateway
- Encapsulate Session.readRaw and .finalizeRaw in template.get()

INT-3204 Polishing - PR Comments

JIRA: https://jira.springsource.org/browse/INT-3204

INT-3204: Polishing
2013-11-15 15:13:57 +02:00
Gary Russell
d662e7ee42 INT-3203 Introduce RemoteFileTemplate
Begin by refactoring `FileTransferringMessageHandler` to use
a `send` operation on RemoteFileTemplate.

Effectively transfer all properties from the adapter to the
template.

This will allow reuse of the send logic from the adapter in
the outbound gateway for `put` and `mput`.

JIRA: https://jira.springsource.org/browse/INT-3203
2013-11-11 17:53:50 -05:00
Gary Russell
ab99c943ab Merge remote-tracking branch 'upstream/master' into 4.0.0-WIP
Conflicts:
	spring-integration-ftp/src/test/java/org/springframework/integration/ftp/outbound/FtpServerOutboundTests.java
	spring-integration-jms/src/test/java/org/springframework/integration/jms/config/JmsMessageDrivenChannelAdapterParserTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests.java
	spring-integration-sftp/src/test/java/org/springframework/integration/sftp/outbound/SftpServerOutboundTests.java

Resolved.
2013-11-07 17:43:19 -05:00
Gary Russell
72dd39bccf INT-2898 Add Persistent FileListFilters
- Abstract implementation
- Implementation for the file system
- Implementation for remote files ((S)FTP)

JIRA: https://jira.springsource.org/browse/INT-2898

INT-2889 Polishing

- Add (S)FTP test cases
- Docs
2013-11-07 17:31:45 -05:00
Gary Russell
f11f00b5ab INT-3100 Support Remote File Streaming (Inbound)
- Add readRaw and finalizeRaw methods to Session
- Add tests for SFTP and FTP

Allows retrieval of a remote file as a stream.

JIRA: https://jira.springsource.org/browse/INT-3100
2013-11-07 17:14:46 +02:00
Gary Russell
9146a374c1 Merge remote-tracking branch 'upstream/master' into 4.0.0-WIP
Conflicts:
	spring-integration-core/src/main/java/org/springframework/integration/MessageHeaders.java
	spring-integration-core/src/main/java/org/springframework/integration/context/IntegrationContextUtils.java
	spring-integration-core/src/main/java/org/springframework/integration/json/JsonToObjectTransformer.java
	spring-integration-core/src/main/java/org/springframework/integration/mapping/AbstractHeaderMapper.java
	spring-integration-core/src/main/java/org/springframework/integration/metadata/package-info.java
	spring-integration-feed/src/test/java/org/springframework/integration/feed/inbound/FeedEntryMessageSourceTests.java
	spring-integration-redis/src/main/java/org/springframework/integration/redis/inbound/RedisInboundChannelAdapter.java
	spring-integration-redis/src/main/java/org/springframework/integration/redis/outbound/RedisPublishingMessageHandler.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/RedisQueueMessageDrivenEndpointTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisQueueOutboundChannelAdapterTests.java
	spring-integration-test/src/main/java/org/springframework/integration/test/matcher/HeaderMatcher.java
	spring-integration-test/src/main/java/org/springframework/integration/test/matcher/MockitoMessageMatchers.java
	spring-integration-test/src/main/java/org/springframework/integration/test/matcher/PayloadMatcher.java
	spring-integration-twitter/src/test/java/org/springframework/integration/twitter/inbound/SearchReceivingMessageSourceTests.java
	spring-integration-twitter/src/test/java/org/springframework/integration/twitter/inbound/SearchReceivingMessageSourceWithRedisTests.java

Resolved.
2013-11-05 14:30:50 -05:00
Artem Bilan
5be8ef3fd8 INT-3147: (3167,3173,1941) Improve MetadataStore
Previously, `MetadataStore` couldn't be configured for Twitter Adapters
- only a global one could be used.
The `metadataKey` was generated automatically with a 'difficult' value.

* Register all `MessageSource` for `SourcePollingChannelAdapter`
as beans with id based on adapter id and prefix '.source' (INT-3147)
* Polishing parser to get rid of explicit `MessageSource` beans. (INT-3147)
* Make Feed and Twitter adapters `id` attribute as required -
now it presents a `metadataKey` for `MetadataStore` (INT-3147)
* Add to Twitter adapters a reference attribute for `MetadataStore` (INT-3173)
* Add Twitter adapters `poll-skip-period` attribute (INT-3167)
* Add and implement `MetadataStore#remove` (INT-1941)
* Make `MetadataStore` as `@ManagedResource` (INT-1941)
* Polishing tests

JIRAs:
https://jira.springsource.org/browse/INT-3147
https://jira.springsource.org/browse/INT-3167
https://jira.springsource.org/browse/INT-3173
https://jira.springsource.org/browse/INT-1941

INT-3147: Polishing and fixes

* add domain suffix to `metadataKey`
* change contract of `MetadataStore.remove`
* remove timeout window from `AbstractTwitterMessageSource`
* polishing and fix `SearchReceivingMessageSourceWithRedisTests`

INT-3147: Rebasing and polishing

INT-3147: fix 'metadata' package tangle

INT-3147 Doc Polishing
2013-11-04 12:44:12 -05:00
Gary Russell
117f31a156 Remove Remaining SI GenericMessage References 2013-11-01 17:04:35 -04:00
Gary Russell
7cebffb086 Fix Imports After Merge 2013-10-30 23:31:17 -04:00
Gary Russell
3080b892d5 Merge remote-tracking branch 'upstream/master' into 4.0.0-WIP
Conflicts:
	spring-integration-core/src/test/java/org/springframework/integration/gateway/GatewayInterfaceTests.java
	spring-integration-core/src/test/java/org/springframework/integration/router/config/RouterWithMappingTests.java
	spring-integration-groovy/src/main/java/org/springframework/integration/groovy/GroovyScriptExecutingMessageProcessor.java
	spring-integration-http/src/test/java/org/springframework/integration/http/inbound/HttpRequestHandlingMessagingGatewayWithPathMappingTests.java
	spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/store/channel/AbstractTxTimeoutMessageStoreTests.java
	spring-integration-jmx/src/main/java/org/springframework/integration/jmx/OperationInvokingMessageHandler.java

Resolved.
2013-10-30 23:13:27 -04:00
Artem Bilan
498e9aa704 INT-2664: (S)FTP Inbound: Preserve File Timestamp
JIRA: https://jira.springsource.org/browse/INT-2664

INT-2664: add `preserve-timestamp` attribute

Doc Polishing
2013-10-30 18:00:00 -04:00
Gary Russell
469910793c INT-3180 Add s-i-ftp/test to .gitIgnore
Inadvertently added left over test files.
2013-10-29 17:05:33 -04:00
Artem Bilan
d5e8e352b6 INT-1362 HTTP Inbound: Additional EvalCtx Vars.
JIRA: https://jira.springsource.org/browse/INT-1362, https://jira.springsource.org/browse/INT-2469

* Add to the `EvaluationContext` of HTTP Inbound Endpoints additional request variables
* Tests and documentation

INT-2669: Mention SpEL variables in JavaDocs

JIRA: https://jira.springsource.org/browse/INT-2669

INT-1362 Doc Polishing
2013-10-29 16:34:07 -04:00
Artem Bilan
d06c1c269d INT-3180: Fix FtpParserInboundTests
JIRA: https://jira.springsource.org/browse/INT-3180

* Change non-existing interface in the config to existing one
* Change `@Test(expected=BeanCreationException.class)` to `try...catch` block
and check the StackTrace for appropriate, expected `Exception`
2013-10-29 15:44:01 -04:00
Gary Russell
7dcd2b5fe9 Remove SI GenericMessage
- Deprecate for now to ease XD migration.
2013-10-24 09:46:30 -04:00
Gary Russell
b1f9aed694 Fix Imports After Merge 2013-10-24 09:36:34 -04:00
Gary Russell
71f3fb1cf6 Merge remote-tracking branch 'upstream/master' into 4.0.0-WIP
Conflicts:
	spring-integration-core/src/test/java/org/springframework/integration/aggregator/AggregatorTests.java
	spring-integration-core/src/test/java/org/springframework/integration/aggregator/ConcurrentAggregatorTests.java
	spring-integration-core/src/test/java/org/springframework/integration/aggregator/CorrelatingMessageHandlerTests.java
	spring-integration-core/src/test/java/org/springframework/integration/gateway/GatewayInterfaceTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/channel/SubscribableRedisChannelTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/store/DelayerHandlerRescheduleIntegrationTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/store/RedisMessageGroupStoreTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/store/RedisMessageStoreTests.java

Resolved
2013-10-24 09:18:00 -04:00
Gary Russell
6d9e48b9ac INT-3172 (S)FTP - Add Recursion Option to LS Cmd
When recursing, the returned filenames are relative to
the top level directory.

INT-3172 (S)FTP - Add Recursion to MGET Command

https://jira.springsource.org/browse/INT-3172

INT-3172 Polishing

- PR Comments
- Add Tests for SFTP (tested with Mock and real SSH)
- Enhance test to ensure subdir is in 3rd file retrieved
- Exclude "special" directories ('.' and '..') from recursion

INT-3172 Make FtpServerRule Safe For Concurrency

Previously the port was static.

- Make the port an instance variable
- Channel the `@ ClassRule` to a `@ Rule`
- Register an appropriate DefaultFtpSessionFactory bean declaration

INT-3172 Polishing; Docs

- Rename FtpServerRule to TestFtpServer
- Remove restriction on filters for MGET
- Add test for filtered MGET
- Reference docs, what's new

INT-3172 More Polish

- Fix type in reference
- Fix error message now that filter is allowed with MGET
- Remove test for filter with MGET (now valid)

INT-3172: Fix tests and typos

INT-3172: this.remoteFileSeparator for recursion
2013-10-18 12:05:43 +03:00
Artem Bilan
dd479a3ce7 INT-2866: Add (S)FTP local-directory-expression
* Add `local-directory-expression` to (S)FTP Outbound Gateways
* Add `FtpServerRule` to Apache Mina embedded FtpServer
* Add tests for (M)GET and `local-directory-expression`:
FTP tests uses `FtpServerRule`, SFTP tests need testing on real SFTP server

JIRA: https://jira.springsource.org/browse/INT-2866

INT-2866: Documentation

INT-2866 Polishing

- Remove leading /
- Change \ to / in invalid test
- Clean up after sftp

Tested with real SSH.

INT-2866 Polishing - Add Mock SFTP Test

Run with -Dspring-profiles-active=realSSH to run with a real SSH server.

Assumes ftptest/ftptest account on localhost with the following directory tree in the user's root...

  $ tree sftpSource/
  sftpSource/
  ├── sftpSource1.txt
  ├── sftpSource2.txt
  └── subSftpSource
      └── subSftpSource1.txt

INT-2866: Polishing

INT-2866: change `remotePath` to `remoteDirectory`

Doc Polishing.
2013-10-16 15:00:02 -04:00