com.xpn.xwiki.store
Interface XWikiRecycleBinStoreInterface

All Known Implementing Classes:
XWikiHibernateRecycleBinStore

@Role
public interface XWikiRecycleBinStoreInterface

Interface for RecycleBin feature (XWIKI-543) store system.

Since:
1.2M1

Method Summary
 void deleteFromRecycleBin(XWikiDocument doc, long index, XWikiContext context, boolean bTransaction)
          Permanently delete document from recycle bin.
 XWikiDeletedDocument[] getAllDeletedDocuments(XWikiDocument doc, XWikiContext context, boolean bTransaction)
           
 XWikiDeletedDocument getDeletedDocument(XWikiDocument doc, long index, XWikiContext context, boolean bTransaction)
           
 XWikiDocument restoreFromRecycleBin(XWikiDocument doc, long index, XWikiContext context, boolean bTransaction)
           
 void saveToRecycleBin(XWikiDocument doc, String deleter, Date date, XWikiContext context, boolean bTransaction)
          Save document to recycle bin.
 

Method Detail

saveToRecycleBin

void saveToRecycleBin(XWikiDocument doc,
                      String deleter,
                      Date date,
                      XWikiContext context,
                      boolean bTransaction)
                      throws XWikiException
Save document to recycle bin.

Parameters:
doc - - document to save
deleter - - the user which delete document
date - - date of delete action
bTransaction - - should use old transaction(false) or create new (true)
context - - used while saving
Throws:
XWikiException - if error in saving

restoreFromRecycleBin

XWikiDocument restoreFromRecycleBin(XWikiDocument doc,
                                    long index,
                                    XWikiContext context,
                                    boolean bTransaction)
                                    throws XWikiException
Parameters:
doc - - document to restore
index - - what deleted document to restore. see XWikiDeletedDocument.getId()
context - - used while loading
bTransaction - - should use old transaction(false) or create new (true)
Returns:
restored document from recycle bin
Throws:
XWikiException - if error while loading

getDeletedDocument

XWikiDeletedDocument getDeletedDocument(XWikiDocument doc,
                                        long index,
                                        XWikiContext context,
                                        boolean bTransaction)
                                        throws XWikiException
Parameters:
doc - - deleted document
index - - what deleted document to restore. see XWikiDeletedDocument.getId()
context - - used while loading
bTransaction - - should use old transaction(false) or create new (true)
Returns:
specified deleted document from recycle bin. null if not found.
Throws:
XWikiException - if error while loading

getAllDeletedDocuments

XWikiDeletedDocument[] getAllDeletedDocuments(XWikiDocument doc,
                                              XWikiContext context,
                                              boolean bTransaction)
                                              throws XWikiException
Parameters:
doc - - the deleted document
context - - used to load
bTransaction - - should use old transaction(false) or create new (true)
Returns:
infos about all delete actions of specific document. sorted by date.
Throws:
XWikiException - - if error in loading

deleteFromRecycleBin

void deleteFromRecycleBin(XWikiDocument doc,
                          long index,
                          XWikiContext context,
                          boolean bTransaction)
                          throws XWikiException
Permanently delete document from recycle bin.

Parameters:
doc - - document to delete
index - - which instance document in recycle bin to delete
context - - used for environment
bTransaction - - should use old transaction(false) or create new (true)
Throws:
XWikiException - if eny error