Skip to content

Add configurable s3Key as an optional parameter. #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 24, 2021
Merged

Conversation

rbugatha
Copy link

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Author

@rbugatha rbugatha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

submitting for review

public String storeOriginalPayload(String payload, Long payloadContentSize) {
String s3Key = UUID.randomUUID().toString();
public String storeOriginalPayload(String payload, Long payloadContentSize, String... optional) {
String s3Key = optional.length > 0 ? optional[0] : UUID.randomUUID().toString();;
Copy link

@eddy-aws eddy-aws Feb 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra semi-colon?

* @return a pointer that must be used to retrieve the original payload later.
* @throws AmazonClientException If any internal errors are encountered on the client side while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException If an error response is returned by actual PayloadStore indicating
* either a problem with the data in the request, or a server side issue.
*/
String storeOriginalPayload(String payload, Long payloadContentSize);

String storeOriginalPayload(String payload, Long payloadContentSize, String... optional);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we create a new method with a customS3Key as a third argument?


@Override
public String storeOriginalPayload(String payload, Long payloadContentSize, String key) {
String s3Key = (key!=null) ? key : UUID.randomUUID().toString();;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double semicolon

@adam-aws adam-aws merged commit 523caff into awslabs:v1 Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants