|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.xpn.xwiki.api.Api com.xpn.xwiki.api.DeletedAttachment
public class DeletedAttachment
Information about a deleted attachment in the recycle bin. Note that this does not hold much information about the
real attachment, but only meta-information relevant to the trash: original document and filename, deleter, deletion
date. The attachment can be accessed using getAttachment()
.
This object is immutable, since entries in the trash can not be modified.
Field Summary |
---|
Fields inherited from class com.xpn.xwiki.api.Api |
---|
context |
Constructor Summary | |
---|---|
DeletedAttachment(DeletedAttachment deletedAttachment,
XWikiContext context)
Simple constructor, initializes a new API object with the current context and
the specified protected deleted attachment object. |
Method Summary | |
---|---|
boolean |
canDelete()
Check if the current user has the right to permanently delete the attachment from the trash. |
boolean |
canRestore()
Check if the current user has the right to restore the attachment. |
void |
delete()
Permanently delete this attachment from the trash. |
Attachment |
getAttachment()
Access to the real attachment object. |
Date |
getDate()
Retrieve the date and time this attachment has been deleted. |
DeletedAttachment |
getDeletedAttachment()
Privileged access to the internal object wrapped by this API. |
String |
getDeleter()
Retrieve the name of the user who deleted this attachment. |
String |
getDocName()
Retrieve the name of the document this attachment belonged to. |
String |
getFilename()
Retrieve the original name of this attachment. |
long |
getId()
Retrieve the internal entry index, used to uniquely identify this entity in the trash. |
Methods inherited from class com.xpn.xwiki.api.Api |
---|
convert, convert, getXWikiContext, hasAccessLevel, hasAdminRights, hasProgrammingRights, hasWikiAdminRights |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DeletedAttachment(DeletedAttachment deletedAttachment, XWikiContext context)
context
and
the specified protected deleted attachment
object.
deletedAttachment
- the internal object wrapped by this APIcontext
- the current request contextMethod Detail |
---|
public long getId()
public String getFilename()
MyPhoto.png
public String getDocName()
Space.Document
formatpublic String getDeleter()
XWiki.Admin
)public Date getDate()
public Attachment getAttachment()
@Programming public DeletedAttachment getDeletedAttachment()
null
.public boolean canRestore()
true
if the current user can restore this document, false
otherwisepublic boolean canDelete()
true
if the current user can purge this document, false
otherwisepublic void delete() throws XWikiException
XWikiException
- if the user does not have the right to perform this action
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |