Interface methods
Use interface methods to manage attachments.
Interface method | Description |
---|---|
createAttachment(ctx) | Called to create an attachment in the store. Code uses the ctx to get the
file name.
|
deleteAttachment(ctx) | Called to delete the attachment from the store. Use the same methods as applicable for createAttachment(ctx) to obtain the file name and use it as a key to delete the file from the store. |
getAttachment(ctx) | Called to get the attachment. Two scenarios are possible, which the code must address:
|
hasAttachment(ctx) | Called for validation the attachment file type from the file name and to check whether the
file name is unique. Use the ctx to get the file name through
ctx.getFileName(ctx.getAttachmentName()) . Use this file name to check for duplicate
names in the store. If a duplicate exists, rename the file in context to make it unique, and prefix
it with the mxe.doclink.doctypes.topLevelPathsproperty value to create a
qualified name. |