|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xpn.xwiki.doc.rcs.XWikiPatch
public class XWikiPatch
Contains differences between revisions. One field (diff for xml or full xml) for now. Created for easy migration to future XWikiPatch system.
Constructor Summary | |
---|---|
XWikiPatch()
Default constructor, need for hibernate. |
|
XWikiPatch(String content,
boolean isDiff)
|
Method Summary | |
---|---|
String |
getContent()
|
boolean |
isDiff()
|
void |
patch(List<String> origText)
Patch text. |
void |
setContent(String content)
|
void |
setDiff(boolean isDiff)
|
XWikiPatch |
setDiffVersion(String originalVersionXml,
String newVersionXml,
String docName)
Create history patch between originalVersion and newVersion as difference on the XML export of the two versions. |
XWikiPatch |
setDiffVersion(String originalVersionXml,
XWikiDocument newVersion,
XWikiContext context)
Create history patch between originalVersion and newVersion as difference on the XML export of the two versions. |
XWikiPatch |
setDiffVersion(XWikiDocument originalVersion,
XWikiDocument newVersion,
XWikiContext context)
Create history patch between originalVersion and newVersion as difference on the XML export of the two versions. |
XWikiPatch |
setFullVersion(String versionXml)
Store the XML export of the document as the history patch; this will be a history milestone. |
XWikiPatch |
setFullVersion(XWikiDocument version,
XWikiContext context)
Store the XML export of the document as the history patch; this will be a history milestone. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XWikiPatch()
public XWikiPatch(String content, boolean isDiff)
content
- - patch contentisDiff
- - is patch a difference or full versionMethod Detail |
---|
public String getContent()
public void setContent(String content)
content
- - string serialization for patchpublic boolean isDiff()
public void setDiff(boolean isDiff)
isDiff
- - is content a difference, or full versionpublic XWikiPatch setFullVersion(XWikiDocument version, XWikiContext context) throws XWikiException
version
- Document version to store in the history patch.context
- Needed for serializing documents to xml.
XWikiException
- if any errorpublic XWikiPatch setFullVersion(String versionXml) throws XWikiException
versionXml
- Document version to store in the history patch, in the XML export format.
XWikiException
- if any error occurspublic XWikiPatch setDiffVersion(XWikiDocument originalVersion, XWikiDocument newVersion, XWikiContext context) throws XWikiException
originalVersion
- Original version of the document document.newVersion
- Current version of the document.context
- Needed for serializing documents to xml.
XWikiException
- if any error occurspublic XWikiPatch setDiffVersion(String originalVersionXml, XWikiDocument newVersion, XWikiContext context) throws XWikiException
originalVersionXml
- Original version of the document document, in the XML export
format.newVersion
- Current version of the document.context
- Needed for serializing documents to xml.
XWikiException
- if any error occurspublic XWikiPatch setDiffVersion(String originalVersionXml, String newVersionXml, String docName) throws XWikiException
originalVersionXml
- Original version of the document document, in the XML export
format.newVersionXml
- Current version of the document, in the XML export format.docName
- Needed for the exception report.
XWikiException
- if any error occurspublic void patch(List<String> origText) throws XWikiException
origText
- - text to patch
XWikiException
- if exception while patching
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |