Search in sources :

Example 1 with HibernateDeletedAttachmentContent

use of com.xpn.xwiki.internal.store.hibernate.HibernateDeletedAttachmentContent in project xwiki-platform by xwiki.

the class HibernateAttachmentRecycleBinStore method createDeletedAttachment.

private DeletedAttachment createDeletedAttachment(XWikiAttachment attachment, String deleter, Date date, AttachmentRecycleBinContentStore contentStore) throws XWikiException {
    DeletedAttachment trashdoc;
    String storeType = null;
    DeletedAttachmentContent deletedDocumentContent = null;
    if (contentStore != null) {
        storeType = contentStore.getHint();
    } else {
        deletedDocumentContent = new HibernateDeletedAttachmentContent(attachment);
    }
    trashdoc = new DeletedAttachment(attachment.getDocId(), attachment.getDoc().getFullName(), attachment.getFilename(), storeType, deleter, date, deletedDocumentContent);
    return trashdoc;
}
Also used : DeletedAttachmentContent(com.xpn.xwiki.doc.DeletedAttachmentContent) HibernateDeletedAttachmentContent(com.xpn.xwiki.internal.store.hibernate.HibernateDeletedAttachmentContent) DeletedAttachment(com.xpn.xwiki.doc.DeletedAttachment) HibernateDeletedAttachmentContent(com.xpn.xwiki.internal.store.hibernate.HibernateDeletedAttachmentContent)

Aggregations

DeletedAttachment (com.xpn.xwiki.doc.DeletedAttachment)1 DeletedAttachmentContent (com.xpn.xwiki.doc.DeletedAttachmentContent)1 HibernateDeletedAttachmentContent (com.xpn.xwiki.internal.store.hibernate.HibernateDeletedAttachmentContent)1