com.xpn.xwiki.doc.rcs
Class XWikiRCSArchive

java.lang.Object
  extended by org.suigeneris.jrcs.util.ToString
      extended by org.suigeneris.jrcs.rcs.Archive
          extended by com.xpn.xwiki.doc.rcs.XWikiRCSArchive

public class XWikiRCSArchive
extends org.suigeneris.jrcs.rcs.Archive

Class for String [de]serialization for XWikiDocumentArchive.

Since:
1.2M1
Version:
$Id: db8481596550e5a7a1c3d4257d04337409c9b1ff $

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
XWikiRCSArchive(Collection<XWikiRCSNodeInfo> nodeInfos, XWikiContext context)
          Used to serialize XWikiDocumentArchive.
XWikiRCSArchive(String archiveText)
          Used to deserialize XWikiDocumentArchive.
 
Method Summary
 Collection getNodes(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
 
Methods inherited from class org.suigeneris.jrcs.util.ToString
arrayToString, arrayToString, stringToArray, stringToArray, toString, toStringOfChars
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XWikiRCSArchive

public XWikiRCSArchive(Collection<XWikiRCSNodeInfo> nodeInfos,
                       XWikiContext context)
                throws XWikiException
Used to serialize XWikiDocumentArchive.

Parameters:
nodeInfos - - collection of XWikiRCSNodeInfo in any order
context - - 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 deserialize XWikiDocumentArchive.

Parameters:
archiveText - - archive text in JRCS format
Throws:
org.suigeneris.jrcs.rcs.parse.ParseException - if syntax errors
Method Detail

getNodes

public Collection getNodes(long docId)
                    throws org.suigeneris.jrcs.rcs.impl.NodeNotFoundException,
                           org.suigeneris.jrcs.rcs.InvalidFileFormatException,
                           org.suigeneris.jrcs.diff.PatchFailedException
Parameters:
docId - - docId which will be wrote in XWikiRCSNodeId.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

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


Copyright © 2004–2014 XWiki. All rights reserved.