public class CreateAttachmentCommand extends ExecutableCommandWrapper implements ExecutableCommand
Attachment
to 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 CreateAttachmentCommand(myAttachment, myFile).execute();
Constructor and Description |
---|
CreateAttachmentCommand(Attachment attachment,
File inputFile)
Instantiates a command to create a new attachment in the database.
|
CreateAttachmentCommand(Attachment attachment,
InputStream input)
Instantiates a command to create a new attachment in the database.
|
execute
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
execute
public CreateAttachmentCommand(Attachment attachment, File inputFile)
attachment
- the logical attachment.inputFile
- the file to upload in the database as attachment.public CreateAttachmentCommand(Attachment attachment, InputStream input)
attachment
- the logical attachment.input
- the content to upload in the database as attachment.