Package com.xpn.xwiki.doc
Interface DocumentRevisionProvider
-
@Role public interface DocumentRevisionProvider
Provide generic way of requesting a specific revision of a document from several sources (database, installed XAR extension, etc.).The revision syntax is
<provider hint>:<revision>
, default provide being database (the version of the document in the history).- Since:
- 9.4RC1
- Version:
- $Id: 77d57cd41337e7cbe5d0de2985ef11404d92373e $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description XWikiDocument
getRevision(XWikiDocument document, String revision)
Load the document in the provided revision.XWikiDocument
getRevision(DocumentReference reference, String revision)
Load the document in the provided revision.
-
-
-
Method Detail
-
getRevision
XWikiDocument getRevision(DocumentReference reference, String revision) throws XWikiException
Load the document in the provided revision.- Parameters:
reference
- the reference of the documentrevision
- the revision of the document- Returns:
- the
XWikiDocument
instance or null if none existing - Throws:
XWikiException
- when failing to load the document revision
-
getRevision
XWikiDocument getRevision(XWikiDocument document, String revision) throws XWikiException
Load the document in the provided revision.- Parameters:
document
- the current documentrevision
- the revision of the document- Returns:
- the
XWikiDocument
instance or null if none existing - Throws:
XWikiException
- when failing to load the document revision
-
-