public class DeletedAttachment extends Api
getAttachment()
.
This object is immutable, since entries in the trash can not be modified.
Constructor and Description |
---|
DeletedAttachment(DeletedAttachment deletedAttachment,
XWikiContext context)
Simple constructor, initializes a new API object with the current
context and
the specified protected deleted attachment object. |
Modifier and Type | Method and Description |
---|---|
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.
|
convert, convert, convert, convertAttachments, getAuthorizationManager, getContextualAuthorizationManager, getXWikiContext, hasAccess, hasAccessLevel, hasAdminRights, hasProgrammingRights, hasWikiAdminRights
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 contextpublic 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 actionCopyright © 2004–2022 XWiki. All rights reserved.