Class CreateAttachmentCommand
- java.lang.Object
-
- com.sodius.mdw.metamodel.integrity.io.command.ExecutableCommandWrapper
-
- com.sodius.mdw.metamodel.integrity.io.command.CreateAttachmentCommand
-
- All Implemented Interfaces:
ExecutableCommand
public class CreateAttachmentCommand extends ExecutableCommandWrapper implements ExecutableCommand
Uploads a newAttachmentto 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 CreateAttachmentCommand(myAttachment, myFile).execute();
-
-
Constructor Summary
Constructors Constructor 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.
-
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
-
CreateAttachmentCommand
public CreateAttachmentCommand(Attachment attachment, File inputFile)
Instantiates a command to create a new attachment in the database.- Parameters:
attachment- the logical attachment.inputFile- the file to upload in the database as attachment.
-
CreateAttachmentCommand
public CreateAttachmentCommand(Attachment attachment, InputStream input)
Instantiates a command to create a new attachment in the database.- Parameters:
attachment- the logical attachment.input- the content to upload in the database as attachment.
-
-