public class XWikiPatch extends Object
| Constructor and Description |
|---|
XWikiPatch()
Default constructor, need for hibernate.
|
XWikiPatch(String content,
boolean isDiff) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public XWikiPatch()
public XWikiPatch(String content, boolean isDiff)
content - - patch contentisDiff - - is patch a difference or full versionpublic 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 patchXWikiException - if exception while patchingCopyright © 2004–2021 XWiki. All rights reserved.