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 deleted document in recycle bin.

Version:
$Id: DeletedDocument.java 10164 2008-06-09 12:44:53Z sdumitriu $

Field Summary
 
Fields inherited from class com.xpn.xwiki.api.Api
context
 
Constructor Summary
DeletedDocument(XWikiDeletedDocument deldoc, XWikiContext context)
           
 
Method Summary
 boolean canDelete()
           
 boolean canUndelete()
           
 java.util.Date getDate()
           
 XWikiDeletedDocument getDeletedDocument()
           
 java.lang.String getDeleter()
           
 Document getDocument()
           
 java.lang.String getFullName()
           
 long getId()
           
 java.lang.String getLanguage()
           
 
Methods inherited from class com.xpn.xwiki.api.Api
convert, convert, getXWikiContext, hasAccessLevel, hasAdminRights, hasProgrammingRights
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeletedDocument

public DeletedDocument(XWikiDeletedDocument deldoc,
                       XWikiContext context)
Parameters:
deldoc - - original deleted document
context - - used for Api
Method Detail

getFullName

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

getLanguage

public java.lang.String getLanguage()
Returns:
language of document

getDate

public java.util.Date getDate()
Returns:
date of delete action

getDeleter

public java.lang.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()
                    throws XWikiException
Returns:
can current user restore this document from recycle bin
Throws:
XWikiException - if any error

canDelete

public boolean canDelete()
                  throws XWikiException
Returns:
can current user permanently delete this document
Throws:
XWikiException - if any error

getDeletedDocument

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

getDocument

public Document getDocument()
                     throws XWikiException
Returns:
document, restored from recycle bin
Throws:
XWikiException - if error


Copyright © 2004-2008 XWiki. All Rights Reserved.