/** * Adds a file attachment to the collection. * * @param name accepts String display name of the new attachment. * @param fileName accepts String name of the file representing the content of the attachment. * @return A FileAttachment instance. */ public FileAttachment addFileAttachment(String name, String fileName) { FileAttachment fileAttachment = new FileAttachment(this.owner); fileAttachment.setName(name); fileAttachment.setFileName(fileName); this.internalAdd(fileAttachment); return fileAttachment; }