Package com.xpn.xwiki.doc.rcs
Class XWikiRCSArchive
- java.lang.Object
-
- org.suigeneris.jrcs.util.ToString
-
- org.suigeneris.jrcs.rcs.Archive
-
- com.xpn.xwiki.doc.rcs.XWikiRCSArchive
-
public class XWikiRCSArchive extends org.suigeneris.jrcs.rcs.Archive
Class for String [de]serialization forXWikiDocumentArchive
.- Since:
- 1.2M1
- Version:
- $Id: 2f7039745f07e8557832d68b8293d537321bced3 $
-
-
Field Summary
-
Fields inherited from class org.suigeneris.jrcs.rcs.Archive
branch, comment, desc, EXP_Binary, EXP_KeywordAndValue, EXP_KeywordOnly, EXP_KeywordValueAndLocker, EXP_PreserveOriginal, EXP_ValueOnly, expand, filename, head, locked, nodes, phrases, RCS_NEWLINE, RCS_NEWLINE_CHAR, strictLocking, symbols, users
-
-
Constructor Summary
Constructors Constructor Description XWikiRCSArchive(String archiveText)
Used to deserializeXWikiDocumentArchive
.XWikiRCSArchive(Collection<XWikiRCSNodeInfo> nodeInfos, XWikiContext context)
Used to serializeXWikiDocumentArchive
.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Collection
getNodes(long docId)
Deprecated.since 13.10.7, 14.4.1, 14.5, usegetNodes(WikiReference, long)
insteadCollection
getNodes(WikiReference wikiReference, long docId)
String
getRevisionAsString(org.suigeneris.jrcs.rcs.Version version)
-
Methods inherited from class org.suigeneris.jrcs.rcs.Archive
addLock, addPhrase, addRevision, addRevision, addRevision, addSymbol, addSymbol, addUser, changeLog, changeLog, changeLog, doKeywords, findNode, getDesc, getExpand, getLog, getLog, getNode, getPhrases, getRevision, getRevision, getRevision, getRevision, getRevision, getRevision, getRevision, getRevision, getRevision, getRevisionPath, getRevisionVersion, getRevisionVersion, getRevisionVersion, getSymbols, isBinary, isValidSymbol, newBranchNode, newNode, newNode, newTrunkNode, quoteString, Remove, Remove, Remove, removeKeywords, save, save, setBranch, setBranch, setComment, setDesc, setExpand, setFileName, setHead, setStrictLocking, toByteArray, toCharArray, toString, toString, toString, toString, unquoteString, unquoteString, version
-
-
-
-
Constructor Detail
-
XWikiRCSArchive
public XWikiRCSArchive(Collection<XWikiRCSNodeInfo> nodeInfos, XWikiContext context) throws XWikiException
Used to serializeXWikiDocumentArchive
.- Parameters:
nodeInfos
- - collection ofXWikiRCSNodeInfo
in any ordercontext
- - for loading nodes content- Throws:
XWikiException
- if can't load nodes content
-
XWikiRCSArchive
public XWikiRCSArchive(String archiveText) throws org.suigeneris.jrcs.rcs.parse.ParseException
Used to deserializeXWikiDocumentArchive
.- Parameters:
archiveText
- - archive text in JRCS format- Throws:
org.suigeneris.jrcs.rcs.parse.ParseException
- if syntax errors
-
-
Method Detail
-
getNodes
@Deprecated(since="13.10.7") public Collection getNodes(long docId) throws org.suigeneris.jrcs.rcs.impl.NodeNotFoundException, org.suigeneris.jrcs.rcs.InvalidFileFormatException, org.suigeneris.jrcs.diff.PatchFailedException
Deprecated.since 13.10.7, 14.4.1, 14.5, usegetNodes(WikiReference, long)
instead- Parameters:
docId
- - docId which will be wrote inXWikiRCSNodeId.setDocId(long)
- Returns:
- Collection of pairs [
XWikiRCSNodeInfo
,XWikiRCSNodeContent
] - Throws:
org.suigeneris.jrcs.diff.PatchFailedException
org.suigeneris.jrcs.rcs.InvalidFileFormatException
org.suigeneris.jrcs.rcs.impl.NodeNotFoundException
-
getNodes
public Collection getNodes(WikiReference wikiReference, long docId) throws org.suigeneris.jrcs.rcs.impl.NodeNotFoundException, org.suigeneris.jrcs.rcs.InvalidFileFormatException, org.suigeneris.jrcs.diff.PatchFailedException
- Parameters:
wikiReference
- the wiki of the documentdocId
- the local identifier of the document- Returns:
- Collection of pairs [
XWikiRCSNodeInfo
,XWikiRCSNodeContent
] - Throws:
org.suigeneris.jrcs.diff.PatchFailedException
org.suigeneris.jrcs.rcs.InvalidFileFormatException
org.suigeneris.jrcs.rcs.impl.NodeNotFoundException
- Since:
- 13.10.7, 14.4.1, 14.5
-
getRevisionAsString
public String getRevisionAsString(org.suigeneris.jrcs.rcs.Version version) throws org.suigeneris.jrcs.rcs.impl.NodeNotFoundException, org.suigeneris.jrcs.rcs.InvalidFileFormatException, org.suigeneris.jrcs.diff.PatchFailedException
- Parameters:
version
- - the version number.- Returns:
- The text of the revision if found.
- Throws:
org.suigeneris.jrcs.rcs.impl.NodeNotFoundException
- if the revision could not be found.org.suigeneris.jrcs.rcs.InvalidFileFormatException
- if any of the deltas cannot be parsed.org.suigeneris.jrcs.diff.PatchFailedException
- if any of the deltas could not be applied
-
-