com.xpn.xwiki.store
Interface AttachmentVersioningStore

All Known Implementing Classes:
HibernateAttachmentVersioningStore, VoidAttachmentVersioningStore

@Role
public interface AttachmentVersioningStore

Interface for storing attachment versions.

Since:
1.4M2
Version:
$Id: a5b64ca27f542a627529864bef51b211f74b8726 $

Method Summary
 void deleteArchive(XWikiAttachment attachment, XWikiContext context, boolean bTransaction)
          Permanently delete attachment archive.
 XWikiAttachmentArchive loadArchive(XWikiAttachment attachment, XWikiContext context, boolean bTransaction)
          Load attachment archive from store.
 void saveArchive(XWikiAttachmentArchive archive, XWikiContext context, boolean bTransaction)
          Save or update attachment archive.
 

Method Detail

loadArchive

XWikiAttachmentArchive loadArchive(XWikiAttachment attachment,
                                   XWikiContext context,
                                   boolean bTransaction)
                                   throws XWikiException
Load attachment archive from store.

Parameters:
attachment - The attachment of archive.
context - The current context.
bTransaction - Should use old transaction (false) or create new (true).
Returns:
attachment archive. not null. return empty archive if it is not exist in store.
Throws:
XWikiException - If an error occurs.

saveArchive

void saveArchive(XWikiAttachmentArchive archive,
                 XWikiContext context,
                 boolean bTransaction)
                 throws XWikiException
Save or update attachment archive.

Parameters:
archive - The attachment archive to save.
context - The current context.
bTransaction - Should use old transaction (false) or create new (true).
Throws:
XWikiException - If an error occurs.

deleteArchive

void deleteArchive(XWikiAttachment attachment,
                   XWikiContext context,
                   boolean bTransaction)
                   throws XWikiException
Permanently delete attachment archive.

Parameters:
attachment - The attachment to delete.
context - The current context.
bTransaction - Should use old transaction (false) or create new (true).
Throws:
XWikiException - If an error occurs.


Copyright © 2004–2014 XWiki. All rights reserved.