public class ExtractAttachmentCommand extends ExecutableCommandWrapper implements ExecutableCommand
Attachment
from an Item
that exists in the Integrity database.
Constraints:
Attachment.fileName
attribute must be set.Attachment
must be owned by a FieldValue
.FieldValue
must be owned by its Item
.FieldValue
must reference a Field
.Usage:
new ExtractAttachmentCommand(myAttachment, myFile).execute();
Constructor and Description |
---|
ExtractAttachmentCommand(Attachment attachment,
File outputFile)
Instantiates a command to download an attachment content.
|
ExtractAttachmentCommand(Attachment attachment,
OutputStream output)
Instantiates a command to download an attachment content.
|
execute
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
execute
public ExtractAttachmentCommand(Attachment attachment, File outputFile)
attachment
- the logical attachment.outputFile
- the file in which the attachment content must be downloaded.public ExtractAttachmentCommand(Attachment attachment, OutputStream output)
attachment
- the logical attachment.output
- the stream in which the attachment content must be written.