|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xpn.xwiki.doc.XWikiAttachmentArchive
public class XWikiAttachmentArchive
JRCS based implementation of an archive for XWikiAttachment.
Constructor Summary | |
---|---|
XWikiAttachmentArchive()
|
Method Summary | |
---|---|
Object |
clone()
|
byte[] |
getArchive()
Get the archive if it is currently stored in RAM. |
byte[] |
getArchive(XWikiContext context)
Get the archive, loading it from the database if necessary. |
XWikiAttachment |
getAttachment()
|
long |
getId()
|
org.suigeneris.jrcs.rcs.Archive |
getRCSArchive()
Deprecated. since 2.6M1 please do not use this, it is bound to a jrcs based implementation. |
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 |
setAttachment(XWikiAttachment attachment)
Set the attachment to associate with this archive. |
void |
setId(long id)
This does nothing and is only here to satisfy Hibernate. |
void |
setRCSArchive(org.suigeneris.jrcs.rcs.Archive archive)
Deprecated. since 2.6M1 please do not use this, it is bound to a jrcs based implementation. |
void |
updateArchive(byte[] data,
XWikiContext context)
Update the archive. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XWikiAttachmentArchive()
Method Detail |
---|
public long getId()
public void setId(long id)
id
- the id of the attachment which this archive is associated with, unused.public Object clone()
clone
in class Object
@Deprecated public org.suigeneris.jrcs.rcs.Archive getRCSArchive()
@Deprecated public void setRCSArchive(org.suigeneris.jrcs.rcs.Archive archive)
archive
- a JRCS archive.public byte[] getArchive() throws XWikiException
XWikiException
- if anything goes wrong.public byte[] getArchive(XWikiContext context) throws XWikiException
context
- the XWikiContext for the request used to load the correct attachment archive from the database.
XWikiException
- if anything goes wrong.public void setArchive(byte[] data) throws XWikiException
data
- a byte array representation of a JRCS archive.
XWikiException
- if anything goes wrong.public void updateArchive(byte[] data, XWikiContext context) throws XWikiException
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 XWikiAttachment getAttachment()
public void setAttachment(XWikiAttachment attachment)
attachment
- the attachment to set for this archive.public org.suigeneris.jrcs.rcs.Version[] getVersions()
public XWikiAttachment getRevision(XWikiAttachment attachment, String rev, XWikiContext context) throws XWikiException
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |