@Validated
public interface AttachmentService
| Modifier and Type | Method and Description |
|---|---|
void |
copy(java.lang.String jobId,
java.io.File destination)
Deprecated.
Use
copyAll(String, Path) instead |
void |
copyAll(java.lang.String id,
java.nio.file.Path destination)
Copy all attachments associated with the given id into the provided destination.
|
void |
delete(java.lang.String jobId)
Deprecated.
Use
deleteAll(String) instead |
void |
deleteAll(java.lang.String id)
Delete all the attachments that were associated with the given id.
|
void |
deleteAttachments(java.lang.String jobId)
Given the id of a job delete all the attachments that were saved for it.
|
void |
save(java.lang.String jobId,
java.lang.String filename,
java.io.InputStream content)
Deprecated.
Use
saveAll(Map) instead |
java.lang.String |
saveAll(java.util.Map<java.lang.String,java.io.InputStream> attachments)
Save all attachments for a given request.
|
java.util.Set<java.net.URI> |
saveAttachments(java.lang.String jobId,
java.util.Set<org.springframework.core.io.Resource> attachments)
Given the id of a job and the set of attachments associated with that job this API should save the attachments
somewhere that the agent can access as job dependencies once the job runs.
|
@Deprecated
void save(java.lang.String jobId,
java.lang.String filename,
java.io.InputStream content)
throws GenieException
saveAll(Map) insteadjobId - The id of the job to save the attachment forfilename - The name of the attachmentcontent - A stream to access the contents of the attachmentGenieException - For any error during the save process@Deprecated
void copy(java.lang.String jobId,
java.io.File destination)
throws GenieException
copyAll(String, Path) insteadjobId - The id of the job to get the attachments for.destination - The directory to copy the attachments intoGenieException - For any error during the copy process@Deprecated
void delete(java.lang.String jobId)
throws GenieException
deleteAll(String) insteadjobId - The id of the job to delete the attachments forGenieException - For any error during the delete processjava.lang.String saveAll(java.util.Map<java.lang.String,java.io.InputStream> attachments)
throws java.io.IOException
attachments - The map of filename to contents for all attachments. All input streams will be closed after
this method returnsjava.io.IOException - If unable to save any of the attachmentsvoid copyAll(java.lang.String id,
java.nio.file.Path destination)
throws java.io.IOException
id - The id that was returned from the original call to saveAll(Map)destination - The destination where the attachments should be copied. Must be a directory if it already
exists. If it doesn't exist it will be created.java.io.IOException - If the copy fails for any reasonvoid deleteAll(java.lang.String id)
throws java.io.IOException
id - The id that was returned from the original call to saveAll(Map)java.io.IOException - On error during deletionjava.util.Set<java.net.URI> saveAttachments(java.lang.String jobId,
java.util.Set<org.springframework.core.io.Resource> attachments)
throws SaveAttachmentException
jobId - The id of the job these attachments are forattachments - The attachments sent by the userURI where the attachments were savedSaveAttachmentException - on error when an attachment is attempted to be saved to the underlying storagevoid deleteAttachments(java.lang.String jobId)
throws java.io.IOException
jobId - The id of the job to delete attachments forjava.io.IOException - on error while deleting the attachments