@Component @Named(value="hibernate") @Singleton public class XWikiHibernateRecycleBinStore extends XWikiHibernateBaseStore implements XWikiRecycleBinStoreInterface
XWikiRecycleBinStoreInterface
for Hibernate store.XWikiHibernateBaseStore.HibernateCallback<T>
hibernateConfiguration, HINT, loggerManager, store
Constructor and Description |
---|
XWikiHibernateRecycleBinStore()
Empty constructor needed for component manager.
|
XWikiHibernateRecycleBinStore(XWikiContext context)
Deprecated.
1.6M1. Use ComponentManager#getInstance(XWikiRecycleBinStoreInterface.class) instead.
|
Modifier and Type | Method and Description |
---|---|
void |
deleteFromRecycleBin(long index,
XWikiContext context,
boolean bTransaction)
Permanently delete document from recycle bin.
|
void |
deleteFromRecycleBin(XWikiDocument doc,
long index,
XWikiContext context,
boolean bTransaction)
Permanently delete document from recycle bin.
|
XWikiDeletedDocument[] |
getAllDeletedDocuments(String batchId,
boolean withContent,
XWikiContext context,
boolean bTransaction) |
XWikiDeletedDocument[] |
getAllDeletedDocuments(String batchId,
XWikiContext context,
boolean bTransaction) |
XWikiDeletedDocument[] |
getAllDeletedDocuments(XWikiDocument doc,
XWikiContext context,
boolean bTransaction) |
Long[] |
getAllDeletedDocumentsIds(XWikiContext context,
int limit)
Get all the deleted documents ID or a specified number.
|
XWikiDeletedDocument |
getDeletedDocument(long index,
XWikiContext context,
boolean bTransaction) |
XWikiDeletedDocument |
getDeletedDocument(XWikiDocument doc,
long index,
XWikiContext context,
boolean bTransaction) |
Long |
getNumberOfDeletedDocuments(XWikiContext context) |
XWikiDocument |
restoreFromRecycleBin(long index,
XWikiContext inputxcontext,
boolean bTransaction) |
XWikiDocument |
restoreFromRecycleBin(XWikiDocument doc,
long index,
XWikiContext inputxcontext,
boolean bTransaction) |
void |
saveToRecycleBin(XWikiDocument doc,
String deleter,
Date date,
String batchId,
XWikiContext inputxcontext,
boolean bTransaction)
Save document to recycle bin.
|
void |
saveToRecycleBin(XWikiDocument doc,
String deleter,
Date date,
XWikiContext inputxcontext,
boolean bTransaction)
Save document to recycle bin.
|
beginTransaction, beginTransaction, beginTransaction, beginTransaction, checkHibernate, cleanUp, createHibernateSequenceIfRequired, dynamicMappingTableName, endTransaction, endTransaction, escapeSchema, execute, execute, executeRead, executeRead, executeWrite, executeWrite, failSafeExecute, failSafeExecuteRead, failSafeExecuteWrite, getConfiguration, getConnections, getDatabaseMetaData, getDatabaseProductName, getDatabaseProductName, getDialect, getExecution, getHint, getMapping, getMetadata, getNbConnections, getPath, getSchemaFromWikiName, getSchemaFromWikiName, getSchemaFromWikiName, getSchemaUpdateScript, getSession, getSessionFactory, getTransaction, isInSchemaMode, isVirtual, makeMapping, setDatabase, setNbConnections, setPath, setSession, setSessionFactory, setTransaction, shutdownHibernate, updateSchema, updateSchema, updateSchema, updateSchema
@Deprecated public XWikiHibernateRecycleBinStore(XWikiContext context)
context
- used for environmentpublic XWikiHibernateRecycleBinStore()
public void saveToRecycleBin(XWikiDocument doc, String deleter, Date date, XWikiContext inputxcontext, boolean bTransaction) throws XWikiException
XWikiRecycleBinStoreInterface
saveToRecycleBin
in interface XWikiRecycleBinStoreInterface
doc
- - document to savedeleter
- - the user which delete documentdate
- - date of delete actioninputxcontext
- - used while savingbTransaction
- - should use old transaction(false) or create new (true)XWikiException
- if error in savingpublic void saveToRecycleBin(XWikiDocument doc, String deleter, Date date, String batchId, XWikiContext inputxcontext, boolean bTransaction) throws XWikiException
XWikiRecycleBinStoreInterface
saveToRecycleBin
in interface XWikiRecycleBinStoreInterface
doc
- - document to savedeleter
- - the user which delete documentdate
- - date of delete actionbatchId
- - id of the operation that deleted multiple documents at the same time, useful when trying to
revert the operation. null
or empty values are ignoredinputxcontext
- - used while savingbTransaction
- - should use old transaction(false) or create new (true)XWikiException
- if error in savingpublic XWikiDocument restoreFromRecycleBin(XWikiDocument doc, long index, XWikiContext inputxcontext, boolean bTransaction) throws XWikiException
restoreFromRecycleBin
in interface XWikiRecycleBinStoreInterface
doc
- - document to restoreindex
- - what deleted document to restore. see XWikiDeletedDocument.getId()
inputxcontext
- - used while loadingbTransaction
- - should use old transaction(false) or create new (true)XWikiException
- if error while loadingpublic XWikiDocument restoreFromRecycleBin(long index, XWikiContext inputxcontext, boolean bTransaction) throws XWikiException
restoreFromRecycleBin
in interface XWikiRecycleBinStoreInterface
index
- - what deleted document to restore. see XWikiDeletedDocument.getId()
inputxcontext
- - used while loadingbTransaction
- - should use old transaction(false) or create new (true)XWikiException
- if error while loadingpublic XWikiDeletedDocument getDeletedDocument(XWikiDocument doc, long index, XWikiContext context, boolean bTransaction) throws XWikiException
getDeletedDocument
in interface XWikiRecycleBinStoreInterface
doc
- - deleted documentindex
- - what deleted document to restore. see XWikiDeletedDocument.getId()
context
- - used while loadingbTransaction
- - should use old transaction(false) or create new (true)XWikiException
- if error while loadingpublic XWikiDeletedDocument getDeletedDocument(long index, XWikiContext context, boolean bTransaction) throws XWikiException
getDeletedDocument
in interface XWikiRecycleBinStoreInterface
index
- - what deleted document to restore. See XWikiDeletedDocument.getId()
context
- - used while loadingbTransaction
- - should use old transaction(false) or create new (true)null
if not found.XWikiException
- if error while loadingpublic XWikiDeletedDocument[] getAllDeletedDocuments(XWikiDocument doc, XWikiContext context, boolean bTransaction) throws XWikiException
getAllDeletedDocuments
in interface XWikiRecycleBinStoreInterface
doc
- - the deleted documentcontext
- - used to loadbTransaction
- - should use old transaction(false) or create new (true)XWikiException
- - if error in loadingpublic Long[] getAllDeletedDocumentsIds(XWikiContext context, int limit) throws XWikiException
XWikiRecycleBinStoreInterface
getAllDeletedDocumentsIds
in interface XWikiRecycleBinStoreInterface
context
- - used to load the deleted documents id.limit
- - if > 0 then all deleted documents id are returned. Else the specified number.XWikiException
- - if error in loadingpublic Long getNumberOfDeletedDocuments(XWikiContext context) throws XWikiException
getNumberOfDeletedDocuments
in interface XWikiRecycleBinStoreInterface
context
- - used to realize the query.XWikiException
- - if error in loading.public XWikiDeletedDocument[] getAllDeletedDocuments(String batchId, XWikiContext context, boolean bTransaction) throws XWikiException
getAllDeletedDocuments
in interface XWikiRecycleBinStoreInterface
batchId
- - id of the operation that deleted multiple documents at the same time; useful when trying to
revert the operationcontext
- - used to loadbTransaction
- - should use old transaction(false) or create new (true)XWikiException
- - if error in loadingpublic XWikiDeletedDocument[] getAllDeletedDocuments(String batchId, boolean withContent, XWikiContext context, boolean bTransaction) throws XWikiException
getAllDeletedDocuments
in interface XWikiRecycleBinStoreInterface
batchId
- - id of the operation that deleted multiple documents at the same time; useful when trying to
revert the operationwithContent
- - true
if the deleted document's content should also be loaded; false
ifcontext
- - used to loadbTransaction
- - should use old transaction(false) or create new (true)XWikiException
- - if error in loadingpublic void deleteFromRecycleBin(XWikiDocument doc, long index, XWikiContext context, boolean bTransaction) throws XWikiException
XWikiRecycleBinStoreInterface
deleteFromRecycleBin
in interface XWikiRecycleBinStoreInterface
doc
- - document to deleteindex
- - which instance document in recycle bin to deletecontext
- - used for environmentbTransaction
- - should use old transaction(false) or create new (true)XWikiException
- if any errorpublic void deleteFromRecycleBin(long index, XWikiContext context, boolean bTransaction) throws XWikiException
XWikiRecycleBinStoreInterface
deleteFromRecycleBin
in interface XWikiRecycleBinStoreInterface
index
- - which instance document in recycle bin to deletecontext
- - used for environmentbTransaction
- - should use old transaction(false) or create new (true)XWikiException
- if any errorCopyright © 2004–2022 XWiki. All rights reserved.