public class S3AttachmentServiceImpl extends java.lang.Object implements AttachmentService
Constructor and Description |
---|
S3AttachmentServiceImpl(S3ClientFactory s3ClientFactory,
AttachmentServiceProperties attachmentServiceProperties,
io.micrometer.core.instrument.MeterRegistry meterRegistry)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.net.URI> |
saveAttachments(java.lang.String jobId,
java.util.Set<org.springframework.core.io.Resource> attachments)
Save the attachments and return their URIs so agent executing the job can retrieve them.
|
public S3AttachmentServiceImpl(S3ClientFactory s3ClientFactory, AttachmentServiceProperties attachmentServiceProperties, io.micrometer.core.instrument.MeterRegistry meterRegistry)
s3ClientFactory
- the s3 client factoryattachmentServiceProperties
- the service propertiesmeterRegistry
- the meter registrypublic java.util.Set<java.net.URI> saveAttachments(@Nullable java.lang.String jobId, java.util.Set<org.springframework.core.io.Resource> attachments) throws SaveAttachmentException
saveAttachments
in interface AttachmentService
jobId
- The id of the job these attachments are for, if one was present in the job request
This is strictly for debugging and logging.attachments
- The attachments sent by the userURI
which can be used to retrieve the attachmentsSaveAttachmentException
- if an error is encountered while saving