Class DeleteAction

  • All Implemented Interfaces:
    Direct Known Subclasses:

    public class DeleteAction
    extends XWikiAction
    Action for delete document to recycle bin and for delete documents from recycle bin.
    $Id: 184dee22a4e3e1fa42eaf9cc18da41cc817343ae $
    • Constructor Detail

      • DeleteAction

        public DeleteAction()
    • Method Detail

      • deleteDocument

        protected boolean deleteDocument​(EntityReference entityReference,
                                         XWikiContext context,
                                         boolean shouldSkipRecycleBin)
                                  throws XWikiException
        Create a job to delete an entity. An entity can either be deleted permanently or moved to the recycle bin. The preference of the user deleting the entity is stored in the shouldSkipRecycleBin parameter. When shouldSkipRecycleBin is true the entity is preferably permanently deleted. Otherwise, the entity is preferably moved to the recycle bin. Note that it only express a choice made by the user. If the user does not have the right to remove an entity permanently, the entity might still be saved in the recycle bin. If the wiki does not have access to a recycle bin, the entity might be permanently removed, regardless of the user's preferences.
        entityReference - the entity to delete
        context - the current context, used to access the user's request
        shouldSkipRecycleBin - if false the entity is preferably sent to the recycle bin, if true, the entity is preferably deleted permanently
        true if the user is redirected, false otherwise
        XWikiException - if anything goes wrong during the document deletion