/** * A constructor with all the information about the deleted attachment. * * @param attachment Deleted attachment. * @param deleter User which deleted the attachment. * @param deleteDate Date of delete action. * @param context The current context. Used for determining the encoding. * @throws XWikiException If the attachment cannot be exported to XML. */ public DeletedAttachment(XWikiAttachment attachment, String deleter, Date deleteDate, XWikiContext context) throws XWikiException { this.docId = attachment.getDocId(); this.docName = attachment.getDoc().getFullName(); this.filename = attachment.getFilename(); this.deleter = deleter; this.date = deleteDate; setAttachment(attachment, context); }