public class FileSystemAttachmentService extends java.lang.Object implements AttachmentService
| Constructor and Description |
|---|
FileSystemAttachmentService(java.lang.String attachmentsDirectory)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
copy(java.lang.String jobId,
java.io.File destination)
Copy all the attachments for a job into the specified directory.
|
void |
delete(java.lang.String jobId)
Delete the attachments for the given job.
|
void |
save(java.lang.String jobId,
java.lang.String filename,
java.io.InputStream content)
Save a given attachment for a job for later retrieval.
|
public FileSystemAttachmentService(java.lang.String attachmentsDirectory)
attachmentsDirectory - The directory to use or null if want to default to system temp directorypublic void save(java.lang.String jobId,
java.lang.String filename,
java.io.InputStream content)
throws com.netflix.genie.common.exceptions.GenieException
save in interface AttachmentServicejobId - The id of the job to save the attachment forfilename - The name of the attachmentcontent - A stream to access the contents of the attachmentcom.netflix.genie.common.exceptions.GenieException - For any error during the save processpublic void copy(java.lang.String jobId,
java.io.File destination)
throws com.netflix.genie.common.exceptions.GenieException
copy in interface AttachmentServicejobId - The id of the job to get the attachments for.destination - The directory to copy the attachments intocom.netflix.genie.common.exceptions.GenieException - For any error during the copy processpublic void delete(java.lang.String jobId)
throws com.netflix.genie.common.exceptions.GenieException
delete in interface AttachmentServicejobId - The id of the job to delete the attachments forcom.netflix.genie.common.exceptions.GenieException - For any error during the delete process