public class XWikiDocumentArchive extends Object
Constructor and Description |
---|
XWikiDocumentArchive()
default constructor.
|
XWikiDocumentArchive(long id) |
Modifier and Type | Method and Description |
---|---|
XWikiDocumentArchive |
clone(long docId,
XWikiContext context) |
protected org.suigeneris.jrcs.rcs.Version |
createNextVersion(org.suigeneris.jrcs.rcs.Version cur,
boolean isMinor) |
String |
getArchive(XWikiContext context) |
Set<XWikiRCSNodeInfo> |
getDeletedNodeInfo() |
long |
getId() |
XWikiRCSNodeInfo |
getLatestNode() |
org.suigeneris.jrcs.rcs.Version |
getLatestVersion() |
org.suigeneris.jrcs.rcs.Version |
getNearestFullVersion(org.suigeneris.jrcs.rcs.Version ver) |
org.suigeneris.jrcs.rcs.Version |
getNextVersion(org.suigeneris.jrcs.rcs.Version ver) |
XWikiRCSNodeInfo |
getNode(org.suigeneris.jrcs.rcs.Version version) |
Collection<XWikiRCSNodeInfo> |
getNodes() |
Collection<XWikiRCSNodeInfo> |
getNodes(org.suigeneris.jrcs.rcs.Version vfrom,
org.suigeneris.jrcs.rcs.Version vto) |
org.suigeneris.jrcs.rcs.Version |
getPrevVersion(org.suigeneris.jrcs.rcs.Version ver) |
Set<XWikiRCSNodeContent> |
getUpdatedNodeContents() |
Set<XWikiRCSNodeInfo> |
getUpdatedNodeInfos() |
String |
getVersionXml(org.suigeneris.jrcs.rcs.Version version,
XWikiContext context)
Return the XML corresponding to a version.
|
XWikiDocument |
loadDocument(org.suigeneris.jrcs.rcs.Version version,
XWikiContext context) |
protected XWikiRCSNodeContent |
makePatch(XWikiRCSNodeInfo newnode,
XWikiDocument doc,
XWikiContext context)
Make a patch.
|
void |
removeVersions(org.suigeneris.jrcs.rcs.Version newerVersion,
org.suigeneris.jrcs.rcs.Version olderVersion,
XWikiContext context)
Remove document versions from vfrom to vto, inclusive.
|
void |
resetArchive()
reset history.
|
void |
setArchive(String text)
Deserialize class.
|
void |
setId(long id) |
void |
setNodes(Collection<XWikiRCSNodeInfo> versions) |
void |
updateArchive(XWikiDocument doc,
String author,
Date date,
String comment,
org.suigeneris.jrcs.rcs.Version version,
XWikiContext context)
Update history with new document version.
|
protected void |
updateNode(XWikiRCSNodeInfo node) |
public XWikiDocumentArchive(long id)
id
- = XWikiDocument.getId()
public XWikiDocumentArchive()
protected org.suigeneris.jrcs.rcs.Version createNextVersion(org.suigeneris.jrcs.rcs.Version cur, boolean isMinor)
cur
- - current versionisMinor
- - is modification is minorprotected void updateNode(XWikiRCSNodeInfo node)
node
- - node added to versionToNode and fullNodesprotected XWikiRCSNodeContent makePatch(XWikiRCSNodeInfo newnode, XWikiDocument doc, XWikiContext context) throws XWikiException
newnode
- - new node informationdoc
- - document for that patch createdcontext
- - used for loading node contents and generating xmlXWikiException
- if exception while loading contentpublic long getId()
XWikiDocument.getId()
- primary keypublic void setId(long id)
id
- = XWikiDocument.getId()
public Collection<XWikiRCSNodeInfo> getNodes()
public Collection<XWikiRCSNodeInfo> getNodes(org.suigeneris.jrcs.rcs.Version vfrom, org.suigeneris.jrcs.rcs.Version vto)
vfrom
- - start versionvto
- - end versionpublic void setNodes(Collection<XWikiRCSNodeInfo> versions)
versions
- - collection of XWikiRCSNodeInfopublic String getArchive(XWikiContext context) throws XWikiException
context
- - used for load nodes contentPackagePlugin
.XWikiException
- if any errorpublic void setArchive(String text) throws XWikiException
PackagePlugin
.text
- - archive in JRCS formatXWikiException
- if parse errorpublic void updateArchive(XWikiDocument doc, String author, Date date, String comment, org.suigeneris.jrcs.rcs.Version version, XWikiContext context) throws XWikiException
doc
- - document for this versionauthor
- - author of versiondate
- - date of versioncomment
- - version commentversion
- - preferably document version in historycontext
- - used for loading nodes contentXWikiException
- in any errorpublic void removeVersions(org.suigeneris.jrcs.rcs.Version newerVersion, org.suigeneris.jrcs.rcs.Version olderVersion, XWikiContext context) throws XWikiException
newerVersion
- - start versionolderVersion
- - end versioncontext
- - used for loading nodes contentXWikiException
- if any errorpublic XWikiDocument loadDocument(org.suigeneris.jrcs.rcs.Version version, XWikiContext context) throws XWikiException
version
- - which version to loadcontext
- - used for loadingXWikiException
- if any errorpublic String getVersionXml(org.suigeneris.jrcs.rcs.Version version, XWikiContext context) throws XWikiException
version
- The version to retrieve.context
- The context
.XWikiException
- If any exception occured.public XWikiRCSNodeInfo getNode(org.suigeneris.jrcs.rcs.Version version)
version
- which version to getXWikiRCSNodeInfo
by version. null if none.public org.suigeneris.jrcs.rcs.Version getLatestVersion()
public XWikiRCSNodeInfo getLatestNode()
public org.suigeneris.jrcs.rcs.Version getNextVersion(org.suigeneris.jrcs.rcs.Version ver)
ver
- - current versionpublic org.suigeneris.jrcs.rcs.Version getPrevVersion(org.suigeneris.jrcs.rcs.Version ver)
ver
- - current versionpublic org.suigeneris.jrcs.rcs.Version getNearestFullVersion(org.suigeneris.jrcs.rcs.Version ver)
ver
- - for what version find nearestpublic void resetArchive()
public Set<XWikiRCSNodeInfo> getDeletedNodeInfo()
XWikiRCSNodeInfo
which are need for deletepublic Set<XWikiRCSNodeInfo> getUpdatedNodeInfos()
XWikiRCSNodeInfo
which are need for saveOrUpdatepublic Set<XWikiRCSNodeContent> getUpdatedNodeContents()
XWikiRCSNodeContent
which are need for updatepublic XWikiDocumentArchive clone(long docId, XWikiContext context) throws XWikiException
docId
- - new getId()
context
- - used for loading contentXWikiException
- if any errorCopyright © 2004–2022 XWiki. All rights reserved.