Class ExtractAttachmentCommand
- java.lang.Object
-
- com.sodius.mdw.metamodel.integrity.io.command.ExecutableCommandWrapper
-
- com.sodius.mdw.metamodel.integrity.io.command.ExtractAttachmentCommand
-
- All Implemented Interfaces:
ExecutableCommand
public class ExtractAttachmentCommand extends ExecutableCommandWrapper implements ExecutableCommand
Downloads anAttachmentfrom anItemthat exists in the Integrity database.Constraints:
- The
Attachment.fileNameattribute must be set. - The
Attachmentmust be owned by aFieldValue. - The
FieldValuemust be owned by itsItem. - The
FieldValuemust reference aField.
Usage:
new ExtractAttachmentCommand(myAttachment, myFile).execute();
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
-
Methods inherited from class com.sodius.mdw.metamodel.integrity.io.command.ExecutableCommandWrapper
execute
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.sodius.mdw.metamodel.integrity.io.command.ExecutableCommand
execute
-
-
-
-
Constructor Detail
-
ExtractAttachmentCommand
public ExtractAttachmentCommand(Attachment attachment, File outputFile)
Instantiates a command to download an attachment content.- Parameters:
attachment- the logical attachment.outputFile- the file in which the attachment content must be downloaded.
-
ExtractAttachmentCommand
public ExtractAttachmentCommand(Attachment attachment, OutputStream output)
Instantiates a command to download an attachment content.- Parameters:
attachment- the logical attachment.output- the stream in which the attachment content must be written.
-
-