com.xpn.xwiki.store
Class XWikiHibernateRecycleBinStore
java.lang.Object
com.xpn.xwiki.store.XWikiHibernateBaseStore
com.xpn.xwiki.store.XWikiHibernateRecycleBinStore
- All Implemented Interfaces:
- XWikiRecycleBinStoreInterface, org.xwiki.component.phase.Initializable
@Component
@Named(value="hibernate")
@Singleton
public class XWikiHibernateRecycleBinStore
- extends XWikiHibernateBaseStore
- implements XWikiRecycleBinStoreInterface
Realization of XWikiRecycleBinStoreInterface
for Hibernate store.
- Version:
- $Id: f9d6a0b8487017b1f883c3444c381be1aefad61d $
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. |
Methods inherited from class com.xpn.xwiki.store.XWikiHibernateBaseStore |
beginTransaction, beginTransaction, beginTransaction, beginTransaction, checkHibernate, cleanUp, dynamicMappingTableName, endTransaction, endTransaction, escapeSchema, execute, execute, executeRead, executeRead, executeWrite, executeWrite, failSafeExecute, failSafeExecuteRead, failSafeExecuteWrite, getConfiguration, getConnections, getDatabaseProductName, getDatabaseProductName, getMapping, getNbConnections, getPath, getSchemaFromWikiName, getSchemaFromWikiName, getSchemaFromWikiName, getSchemaUpdateScript, getSession, getSessionFactory, getTransaction, initialize, isInSchemaMode, isVirtual, makeMapping, setDatabase, setNbConnections, setPath, setSession, setSessionFactory, setTransaction, shutdownHibernate, updateSchema, updateSchema, updateSchema, updateSchema |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XWikiHibernateRecycleBinStore
@Deprecated
public XWikiHibernateRecycleBinStore(XWikiContext context)
- Deprecated. 1.6M1. Use ComponentManager.lookup(XWikiRecycleBinStoreInterface.class) instead.
- Parameters:
context
- used for environment
XWikiHibernateRecycleBinStore
public XWikiHibernateRecycleBinStore()
- Empty constructor needed for component manager.
saveToRecycleBin
public void saveToRecycleBin(XWikiDocument doc,
String deleter,
Date date,
XWikiContext context,
boolean bTransaction)
throws XWikiException
- Description copied from interface:
XWikiRecycleBinStoreInterface
- Save document to recycle bin.
- Specified by:
saveToRecycleBin
in interface XWikiRecycleBinStoreInterface
- Parameters:
doc
- - document to savedeleter
- - the user which delete documentdate
- - date of delete actioncontext
- - used while savingbTransaction
- - should use old transaction(false) or create new (true)
- Throws:
XWikiException
- if error in saving
restoreFromRecycleBin
public XWikiDocument restoreFromRecycleBin(XWikiDocument doc,
long index,
XWikiContext context,
boolean bTransaction)
throws XWikiException
- Specified by:
restoreFromRecycleBin
in interface XWikiRecycleBinStoreInterface
- Parameters:
doc
- - document to restoreindex
- - what deleted document to restore. see XWikiDeletedDocument.getId()
context
- - used while loadingbTransaction
- - should use old transaction(false) or create new (true)
- Returns:
- restored document from recycle bin
- Throws:
XWikiException
- if error while loading
getDeletedDocument
public XWikiDeletedDocument getDeletedDocument(XWikiDocument doc,
long index,
XWikiContext context,
boolean bTransaction)
throws XWikiException
- Specified by:
getDeletedDocument
in interface XWikiRecycleBinStoreInterface
- Parameters:
doc
- - deleted documentindex
- - what deleted document to restore. see XWikiDeletedDocument.getId()
context
- - used while loadingbTransaction
- - 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
public XWikiDeletedDocument[] getAllDeletedDocuments(XWikiDocument doc,
XWikiContext context,
boolean bTransaction)
throws XWikiException
- Specified by:
getAllDeletedDocuments
in interface XWikiRecycleBinStoreInterface
- Parameters:
doc
- - the deleted documentcontext
- - used to loadbTransaction
- - 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
public void deleteFromRecycleBin(XWikiDocument doc,
long index,
XWikiContext context,
boolean bTransaction)
throws XWikiException
- Description copied from interface:
XWikiRecycleBinStoreInterface
- Permanently delete document from recycle bin.
- Specified by:
deleteFromRecycleBin
in interface XWikiRecycleBinStoreInterface
- Parameters:
doc
- - document to deleteindex
- - which instance document in recycle bin to deletecontext
- - used for environmentbTransaction
- - should use old transaction(false) or create new (true)
- Throws:
XWikiException
- if eny error
Copyright © 2004-2013 XWiki. All Rights Reserved.