Search in sources :

Example 1 with DeletedAttachmentFileProvider

use of org.xwiki.store.filesystem.internal.DeletedAttachmentFileProvider in project xwiki-platform by xwiki.

the class FilesystemAttachmentRecycleBinContentStore method delete.

@Override
public void delete(AttachmentReference reference, Date deleteDate, long index, boolean bTransaction) throws XWikiException {
    DeletedAttachmentFileProvider provider = this.fileTools.getDeletedAttachmentFileProvider(reference, index);
    StartableTransactionRunnable tr = getDeletedAttachmentPurgeRunnable(provider);
    try {
        tr.start();
    } catch (Exception e) {
        throw new XWikiException(XWikiException.MODULE_XWIKI_STORE, XWikiException.MODULE_XWIKI, "Failed to delete deleted attachment [" + reference + "]", e);
    }
}
Also used : DeletedAttachmentFileProvider(org.xwiki.store.filesystem.internal.DeletedAttachmentFileProvider) StartableTransactionRunnable(org.xwiki.store.StartableTransactionRunnable) XWikiException(com.xpn.xwiki.XWikiException) InitializationException(org.xwiki.component.phase.InitializationException) IOException(java.io.IOException) XWikiException(com.xpn.xwiki.XWikiException)

Aggregations

XWikiException (com.xpn.xwiki.XWikiException)1 IOException (java.io.IOException)1 InitializationException (org.xwiki.component.phase.InitializationException)1 StartableTransactionRunnable (org.xwiki.store.StartableTransactionRunnable)1 DeletedAttachmentFileProvider (org.xwiki.store.filesystem.internal.DeletedAttachmentFileProvider)1