com.xpn.xwiki.api
Class DeletedDocument

java.lang.Object
  extended by com.xpn.xwiki.api.Api
      extended by com.xpn.xwiki.api.DeletedDocument

public class DeletedDocument
extends Api

Information about a deleted document in the recycle bin.

Version:
$Id: 2c0440a480720743042e86c1d139229f228ca091 $

Field Summary
 
Fields inherited from class com.xpn.xwiki.api.Api
context
 
Constructor Summary
DeletedDocument(XWikiDeletedDocument deletedDoc, XWikiContext context)
          Simple constructor, initializes a new API object with the current context and the specified protected deleted document object.
 
Method Summary
 boolean canDelete()
           
 boolean canUndelete()
          Check if the current user has the right to restore the document.
 Date getDate()
           
 XWikiDeletedDocument getDeletedDocument()
           
 String getDeleter()
           
 Document getDocument()
           
 String getFullName()
           
 long getId()
           
 String getLanguage()
           
 
Methods inherited from class com.xpn.xwiki.api.Api
convert, convert, convert, convertAttachments, 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

DeletedDocument

public DeletedDocument(XWikiDeletedDocument deletedDoc,
                       XWikiContext context)
Simple constructor, initializes a new API object with the current context and the specified protected deleted document object.

Parameters:
deletedDoc - the internal object wrapped by this API
context - the current request context
Method Detail

getFullName

public String getFullName()
Returns:
full name of document (ie: Main.WebHome)

getLanguage

public String getLanguage()
Returns:
language of document

getDate

public Date getDate()
Returns:
date of delete action

getDeleter

public String getDeleter()
Returns:
user which delete document

getId

public long getId()
Returns:
id of deleted document. id is unique only for this document.

canUndelete

public boolean canUndelete()
Check if the current user has the right to restore the document.

Returns:
true if the current user can restore this document, false otherwise

canDelete

public boolean canDelete()
Returns:
true if the current user can permanently delete this document, false otherwise

getDeletedDocument

@Programming
public XWikiDeletedDocument getDeletedDocument()
Returns:
original deleted document if user has programming rights, else null.

getDocument

public Document getDocument()
Returns:
the document as it is in the recycle bin if the user has admin rights, null otherwise


Copyright © 2004–2014 XWiki. All rights reserved.