|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xpn.xwiki.doc.XWikiAttachmentArchive
com.xpn.xwiki.store.VoidAttachmentVersioningStore.VoidAttachmentArchive
public static class VoidAttachmentVersioningStore.VoidAttachmentArchive
Void realization of AttachmentArchive. It says what there is only one version of attachment - latest. Class is public because used in super.clone() via getClass().newInstance()
Constructor Summary | |
---|---|
VoidAttachmentVersioningStore.VoidAttachmentArchive()
Default constructor. |
|
VoidAttachmentVersioningStore.VoidAttachmentArchive(XWikiAttachment attachment)
Helper constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class com.xpn.xwiki.doc.XWikiAttachmentArchive |
---|
getArchive, getAttachment, getId, getRCSArchive, setAttachment, setId |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VoidAttachmentVersioningStore.VoidAttachmentArchive()
public VoidAttachmentVersioningStore.VoidAttachmentArchive(XWikiAttachment attachment)
attachment
- attachment of this archiveMethod Detail |
---|
public void updateArchive(byte[] data, XWikiContext context) throws XWikiException
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 setArchive(byte[] data) throws XWikiException
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
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
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |