-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
There was a problem hiding this 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();; |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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?
… function (by overloading the params)
|
||
@Override | ||
public String storeOriginalPayload(String payload, Long payloadContentSize, String key) { | ||
String s3Key = (key!=null) ? key : UUID.randomUUID().toString();; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
double semicolon
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.