Commit Graph

32 Commits

Author SHA1 Message Date
Artem Bilan
985f888281 Fix S3InboundStreamingChannelAdapterTests
* Different OSs can return files in different order, so add `Comparator` to the test
* Also decrease poll timeout for `null` expectation
2016-08-31 23:29:43 -04:00
Artem Bilan
a3923c93e7 XSD refactoring to pull common attributes
Also introduce `remote-file-separator` since this option is available via Java Config
2016-08-31 23:10:47 -04:00
Christian Tzolov
da77e4b89e Issue #30 : Add S3 inbound streaming channel adapter.
Fixes GH-30 (https://github.com/spring-projects/spring-integration-aws/issues/30)

* Add S3InboundStreamingMessageSource and related S3FileInfo
* Extend spring-integration-aws-1.1.xsd with s3-inbound-streaming-channel-adapter tag.
* Add S3StreamingInboundChannelAdapterParser and s3-inbound-streaming-channel-adapter handler.
* Add S3 streaming spring tests.
* Add S3 streaming documentation to README.md.

Issue #30: Resolve code style and formatting issues

Polishing:
* Revert some `build.gradle` changes
* Add JavaDoc to the `S3FileInfo.getPermissions()`
2016-08-31 22:43:39 -04:00
Artem Bilan
8b9922d16c The S3 keyExpression assertions improvement 2016-08-29 14:54:04 -04:00
Artem Bilan
8e2fb5e921 Add start/stop queues management for SQS Adapter
Provide delegates for the SC-AWS `SimpleMessageListenerContainer` `start/stop/isRunning` method for individual queues.

Mark `SqsMessageDrivenChannelAdapter` with `@ManagedResource` and `@IntegrationManagedResource` to make those operation accessible from JMX/ControlBus
Cover the change with test-case
Provide some upgrades
Fix test for NPE from AWS SDK around `lastModified`: https://github.com/aws/aws-sdk-java/issues/822
2016-08-23 19:28:51 -04:00
Jim Krygowski
72821bfb8c GH-45: Fix S3 hierarchy support
Fixes GH-45 (https://github.com/spring-projects/spring-integration-aws/issues/45)

S3InboundFileSynchronizer failing when processing through S3 directories - modified approach for splitPathToBucketAndKey to account for the fact that there will be more than one forward slash in the path when subdirectories are used in an S3 bucket. Set up split operation to use the limit parameter to force the bucket identifier into the first element and the remainder of the text (the key) into the second element.

* modified unit test to include subdirectories.
*fixed additional usages of the split operation without the match limit parameter. DRY'd up some code. Cleaned up unit tests.

* added @author annotation at project lead's request.

Add some polishing
2016-08-11 16:32:06 -04:00
John Logan
b5e6cdaa95 GH-41: Fix broken S3 File upload
Fixes GH-41 (https://github.com/spring-projects/spring-integration-aws/issues/41)
Fixes GH-43 (https://github.com/spring-projects/spring-integration-aws/issues/43)

- Prior upload() code was trying to reset() a
  FileInputStream and then upload to S3, which
  resulted in zero uploaded bytes.
- Added dependency on spring-cloud-aws-core
  to resolve ResourceIdResolver reference.
- Fail if InputStream payload does not support
  mark/reset.
- Add metadata for byte array payload.

GH-41: Fix assert order per PR comments.
2016-07-13 16:48:53 -04:00
Kamil Przerwa
97988bdec5 GH-39: Allow text/plain for SNS Inbound
Fixes GH-39 (https://github.com/spring-projects/spring-integration-aws/issues/39)

Amazon SNS HTTP notifications are sent with the `content-type` header as `text/plain`, not `application/json` as it is expected by the `MappingJackson2HttpMessageConverter` by default.

*Added `text/plain` as supported content type for SNS inbound notification

* Corrections after review
2016-06-23 12:44:14 -04:00
Patrick Fitzsimons
7be94b7690 GH-36: Add SqsMessageDrivenCA.queueStopTimeout
Fixes GH-36 (https://github.com/spring-projects/spring-integration-aws/issues/36)

* Add ability to set `queueStopTimeout` for `SimpleMessageListenerContainer` in `SqsMessageDrivenChannelAdapter`
* Update unit tests to test `queueStopTimeout`
* Ensure that we don't override the default `queueStopTimeout` with `0` `long`
* Upgrade to `SI-4.2.8`
2016-06-14 17:19:14 -04:00
Patrick Fitzsimons
d2aa5224ec Adding auto start up setter on sqsMessageDrivenChannelAdapter.java
Update tests in SqsMessageDrivenChannelAdapterParserTests to invoke setAutoStartup

Change setAutoStartUp to invoke super in SqsMessageDrivenChannelAdapter

Add override to SqsMessageDrivenChannelAdapter

Remove call to setAutoStartup in SqsMessageDrivenChannelAdapterParserTests
2016-06-08 21:47:05 -04:00
Artem Bilan
6abc1210a1 Add ResourceIdResolver support
I many cases we deal in application just with simple logical name for the target AWS entities, e.g. `myQueue`, `testBucket`.
Actually they must be resolved into the physical resources against the current environment.
E.g. the same  S3 `testBucket` ca be fully different in different regions.
 The SQS queue must be resolved into the resources with the current `Stack` context.
2016-05-27 15:05:00 -04:00
Artem Bilan
5d4bcb37db INTEXT-221: Document S3 Gateway & CheckStyle
JIRA: https://jira.spring.io/browse/INTEXT-221

Also apply Checkstyle for the project
Move testing to the `AssertJ`
Adjust `.travis.yml` for Gradle 2.13
Add `CODE_OF_CONDUCT.adoc`
2016-05-18 18:44:38 -04:00
Artem Bilan
29e255cc64 Add S3 MessageSource implementation
JIRA: https://jira.spring.io/browse/INTEXT-51,
https://jira.spring.io/browse/INTEXT-194,
https://jira.spring.io/browse/INTEXT-199

* Add S3 Inbound Channel Adapter fully based on the `AbstractInboundFileSynchronizer`,
`AbstractInboundFileSynchronizingMessageSource` implementation.
* Provide the standard SI `RemoteFileTemplate` and `SessionFactory` abstractions implementations.
* Upgrade to Gradle-2.12
* Provide Namespace support
* Ensure everything with tests
* Remove legacy, redundant implementation, infrastructure code for it and test-cases.
Everything in favor of the new implementation.
2016-04-04 19:59:02 -04:00
Artem Bilan
5167b36b4d Add S3MessageHandler Namespace Support
* Add `<int-aws:s3-outbound-channel-adapter>` and `<int-aws:s3-outbound-gateway>`
components. Their parsers and tests for them.
* Remove the old S3 Outbound Channel Adapter implementation and its tests

Rename `AwsNamespaceHandler` properly

`git mv -f File file` does the trick

Add `.travis.yml` to enable Travis CI on PRs
2016-03-30 11:05:33 -04:00
Artem Bilan
a0893cb88e Add S3MessageHandler
Implement the `S3MessageHandler` based on the `TransferManager`.
Provide `upload`, `download` and `copy` operations.
Support single file upload/download as well as directory structure.
The `S3MessageHandler` may behave as `one-way`, as well as `request-reply` component.
The former is blocked, the second is async.

See test-cases and JavaDocs for more info.
2016-03-28 17:07:19 -04:00
Artem Bilan
b6c57b29be Upgrade to Spring Cloud AWS 1.1.0.M2 2016-02-23 13:59:26 -05:00
Artem Bilan
0580642439 INTEXT-8: Add SNS Outbound Channel Adapter
JIRA: https://jira.spring.io/browse/INTEXT-8

Address PR comments
2016-01-12 12:19:35 -05:00
Karthik Palanivelu
dc66af65eb INTEXT-197: Lifecycle attrs for s3-outbound-c-a
JIRA: https://jira.spring.io/browse/INTEXT-197

* Modified the `org/springframework/integration/aws/config/xml/spring-integration-aws-1.0.xsd` to add `channelAdapterAttributes` to expose
`phase` attribute in `s3 outbound adapter`.
* Modified `AmazonS3OutboundChannelAdapterParserTests` - Added Unit Test Class to test the `channelAdapterAttributes`.
* Modified `s3-valid-outbound-cases.xml` - Added separate definition `withChannelAdapterAttributes` for phase attribute.

Polishing according PR comments
2015-10-20 16:44:45 -04:00
Karthik Palanivelu
c674a8dace INTEXT-187: add advice-chain for the outbound-c-a
JIRA: https://jira.spring.io/browse/INTEXT-187

* Modified the `spring-integration-aws-1.0.xsd` to accommodate `request-handler-advice-chain`
	in s3 outbound adapter after feedback.
* Modified `AmazonS3OutboundChannelAdapterParserTests` - Added Unit Test Class with Mock Object to test the request handler chain.
* Modified `s3-valid-outbound-cases.xml` - Added separate definition withHandlerChain with mock Operations.
2015-09-28 14:56:01 -04:00
Artem Bilan
16ef806598 INTEXT-147: Add SnsInboundChannelAdapter
JIRA: https://jira.spring.io/browse/INTEXT-147

INTEXT-147: Documentation

Upgrade dependencies
2015-09-23 15:40:57 -04:00
Li Wang
a7e5f67d04 INTEXT-189: Fix S3InboundChannelAdapterParser
JIRA: https://jira.spring.io/browse/INTEXT-189
2015-08-24 21:11:45 -07:00
Taylor Wicksell
e6e4a0b2d1 Remove IntEvalCtxAware usage for SI 4.2 support
Polishing
2015-08-18 20:19:10 -04:00
Rahul Pilani
a551224f9d INTEXT-141: Add SqsMessageHandler template ctor
JIRA: https://jira.spring.io/browse/INTEXT-141

Adding in a constructor to the `SqsMessageHandler` so that `QueueMessagingTemplate` can be configured independently.

Updated with comments

- Updated the `spring-integration-aws-1.0.xsd` to include the `queue-messaging-template` param.
- Updated the `SqsOutboundChannelAdapterParserTest` to look for the `queue-messaging-template` param, and validate that `sqs` and `resource-resolver-id` params are mutually exclusive to `queue-messaging-template`.
- Added tests for the parser.
- Added test for the new constructor.

Updated with feedback
- Validation for `sqs` parameter missing in xml config
- Made `SqsMessageHandlerWithQueueMessagingTemplateTests` use the same tests as `SqsMessageHandler` tests by moving the tests to a common parent class: `AbstractSqsMessageHandlerTest`
- Other minor fixes.

Whitespace and error message fixes.

Polishing
2015-03-10 08:43:09 +02:00
Artem Bilan
ec4a93142d INTEXT-7: Add SQS Adapters
JIRA: https://jira.spring.io/browse/INTEXT-7

Upgrade to Gradle 2.3

Minor Doc Polishing
2015-02-18 16:39:05 -05:00
Artem Bilan
d4dedef383 GH-3: Fix BeanFactory population for AS3MH
Fixes https://github.com/spring-projects/spring-integration-aws/issues/3

**Cherry-pick to 0.5.x**
2015-02-12 11:05:22 +02:00
Artem Bilan
7c091c84a4 INTEXT-136: Make based on Spring Cloud AWS
JIRA: https://jira.spring.io/browse/INTEXT-136

* Add `spring-cloud-aws` dependencies
* Remove all SES stuff, since Spring Cloud AWS provides implementations for `org.springframework.mail.MailSender`
2015-02-02 15:50:06 +02:00
Rob Harrop
4789e94a12 AWS: Updated to spring-integration to 4.0.3
Made the corresponding API changes.

Had to update jacoco to latest (0.7.1.blah) to get the tests to work correctly on OSX Java 8

Fixed JavaDoc errors show up by the Java 8 linter. Build passes

Bringing dependencies inline with Spring 4.0.6

Updated mockito to 1.9.5

Updated Hamcrest to 1.3

Updated aws-sdk to 1.8.7

Merge branch 'master' into integration-4.0

Reformatted gradle file inline with the existing standard

Switch back to using the milestone repo

Upgrade Gradle version to 1.12

Updated the schema references to use un-versioned refs

Updated author tags and copyright dates

AWS: SI-4.0 Polishing
2014-08-15 12:27:56 +03:00
Gunnar Hillert
527fca9bdd INTEXT-54 - AWS Fix Failing Tests
For reference: https://jira.springsource.org/browse/INTEXT-54
2013-03-12 00:55:08 -04:00
Gunnar Hillert
07b3efa3dc INTEXT-34 - Convert AWS Module to Gradle
For reference see: https://jira.springsource.org/browse/INTEXT-34
2013-03-11 17:38:34 -04:00
Amol Nayak
48a80ff4f2 INTEXT-5: Initial push for AWS core and S3 adapter
For reference see: https://jira.springsource.org/browse/INTEXT-5
2013-02-28 18:03:47 -05:00
Gunnar Hillert
f6e1295d60 INTEXT-6 - Add AWS SES Samples
* Add SES JavaMailSender Sample
* Add SES Spring Integration Sample
* Refactor DefaultAmazonSESMailSender to implement JavaMailSender and delegate to JavaMailSenderImpl rather than extending it
* Cleanup
2013-01-17 17:26:36 -05:00
Amol Nayak
5f168e26b3 INTEXT-6: Add AWS core and SES adapter
For reference see: https://jira.springsource.org/browse/INTEXT-6
2013-01-17 17:25:51 -05:00