public static class VoidAttachmentVersioningStore.VoidAttachmentArchive extends XWikiAttachmentArchive
Constructor and Description |
---|
VoidAttachmentArchive()
Default constructor.
|
VoidAttachmentArchive(XWikiAttachment attachment)
Helper constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
byte[] |
getArchive(XWikiContext context)
Get the archive, loading it from the database if necessary.
|
XWikiAttachment |
getRevision(XWikiAttachment attachment,
String rev,
XWikiContext context)
Get an old revision of the attachment which this is an archive of.
|
org.suigeneris.jrcs.rcs.Version[] |
getVersions() |
void |
setArchive(byte[] data)
Set the archive from a byte array representation of a JRCS archive.
|
void |
setRCSArchive(org.suigeneris.jrcs.rcs.Archive archive) |
void |
updateArchive(byte[] data,
XWikiContext context)
Update the archive.
|
void |
updateArchive(XWikiContext context)
Update the archive.
|
getArchive, getArchiveAsString, getArchiveAsString, getAttachment, getId, getRCSArchive, setArchive, setAttachment, setId
public VoidAttachmentArchive()
public VoidAttachmentArchive(XWikiAttachment attachment)
attachment
- attachment of this archivepublic void updateArchive(byte[] data, XWikiContext context) throws XWikiException
XWikiAttachmentArchive
updateArchive
in class XWikiAttachmentArchive
data
- not used for anything, the data is loaded from the attachment included with this archive.context
- the XWikiContext for the request used to load the correct attachment content from the database.XWikiException
- if anything goes wrong.public void updateArchive(XWikiContext context) throws XWikiException
XWikiAttachmentArchive
updateArchive
in class XWikiAttachmentArchive
context
- the XWikiContext for the request used to load the correct attachment content from the database.XWikiException
- if anything goes wrong.public void setArchive(byte[] data) throws XWikiException
XWikiAttachmentArchive
setArchive
in class XWikiAttachmentArchive
data
- a byte array representation of a JRCS archive.XWikiException
- if anything goes wrong.public byte[] getArchive(XWikiContext context) throws XWikiException
XWikiAttachmentArchive
getArchive
in class XWikiAttachmentArchive
context
- the XWikiContext for the request used to load the correct attachment archive from the database.XWikiException
- if anything goes wrong.public void setRCSArchive(org.suigeneris.jrcs.rcs.Archive archive)
setRCSArchive
in class XWikiAttachmentArchive
archive
- a JRCS archive.public org.suigeneris.jrcs.rcs.Version[] getVersions()
getVersions
in class XWikiAttachmentArchive
public XWikiAttachment getRevision(XWikiAttachment attachment, String rev, XWikiContext context) throws XWikiException
XWikiAttachmentArchive
getRevision
in class XWikiAttachmentArchive
attachment
- This attachment will be used to get the document to associate the attachment revision with.rev
- a String representation of the version to load.context
- the context for the request which needed this revision.XWikiException
- if any Exception is thrown while getting the revision.public Object clone()
clone
in class XWikiAttachmentArchive
Copyright © 2004–2022 XWiki. All rights reserved.