|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xpn.xwiki.util.AbstractSimpleClass
com.xpn.xwiki.doc.DeletedAttachment
public class DeletedAttachment
Archive of deleted attachment, stored in AttachmentRecycleBinStore
. Immutable, because
deleted attachments should not be modified.
Constructor Summary | |
---|---|
protected |
DeletedAttachment()
Default constructor. |
|
DeletedAttachment(XWikiAttachment attachment,
String deleter,
Date deleteDate,
XWikiContext context)
A constructor with all the information about the deleted attachment. |
Method Summary | |
---|---|
Date |
getDate()
Getter for date . |
String |
getDeleter()
Getter for deleter . |
long |
getDocId()
Getter for docId . |
String |
getDocName()
Getter for docName . |
String |
getFilename()
Getter for filename . |
long |
getId()
Getter for id . |
String |
getXml()
Getter for xml . |
XWikiAttachment |
restoreAttachment(XWikiAttachment attachment,
XWikiContext context)
Restore a XWikiAttachment from a DeletedAttachment . |
protected void |
setAttachment(XWikiAttachment attachment,
XWikiContext context)
Export XWikiAttachment to DeletedAttachment . |
protected void |
setDate(Date date)
Setter for date . |
protected void |
setDeleter(String deleter)
Setter for deleter . |
protected void |
setDocId(long docId)
Setter for docId . |
protected void |
setDocName(String docName)
Setter for docName . |
protected void |
setFilename(String filename)
Setter for filename . |
protected void |
setId(long id)
Setter for id . |
protected void |
setXml(String xml)
Setter for xml . |
Methods inherited from class com.xpn.xwiki.util.AbstractSimpleClass |
---|
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected DeletedAttachment()
public DeletedAttachment(XWikiAttachment attachment, String deleter, Date deleteDate, XWikiContext context) throws XWikiException
attachment
- Deleted attachment.deleter
- User which deleted the attachment.deleteDate
- Date of delete action.context
- The current context. Used for determining the encoding.
XWikiException
- If the attachment cannot be exported to XML.Method Detail |
---|
public long getId()
id
.
protected void setId(long id)
id
.
id
- The synthetic id to set. Used only by hibernate.public long getDocId()
docId
.
protected void setDocId(long docId)
docId
.
docId
- The id of the document to set. Used only by hibernate.public String getDocName()
docName
.
protected void setDocName(String docName)
docName
.
docName
- The document name to set. Used only by hibernate.public String getFilename()
filename
.
protected void setFilename(String filename)
filename
.
filename
- The attachment filename to set. Used only by hibernate.public Date getDate()
date
.
protected void setDate(Date date)
date
.
date
- The date of the delete action to set. Used only by Hibernate.public String getDeleter()
deleter
.
XWiki.Admin
)protected void setDeleter(String deleter)
deleter
.
deleter
- The user which has removed the document to set. Used only by Hibernate.public String getXml()
xml
.
XWikiAttachment
protected void setXml(String xml)
xml
.
xml
- XML serialization of XWikiAttachment
. Used only by Hibernate.protected void setAttachment(XWikiAttachment attachment, XWikiContext context) throws XWikiException
XWikiAttachment
to DeletedAttachment
.
attachment
- the deleted attachmentcontext
- the current context, used in the XML export
XWikiException
- if an exception occurs during the XML exportpublic XWikiAttachment restoreAttachment(XWikiAttachment attachment, XWikiContext context) throws XWikiException
XWikiAttachment
from a DeletedAttachment
. Note that this method does not actually
restore the attachment to its owner document, it simply recomposes an XWikiAttachment
object from the
saved data.
attachment
- optional object where to put the attachment data, if not null
context
- the current context
XWikiException
- If an exception occurs while the Attachment is restored from the XML. See
XWikiAttachment.fromXML(String)
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |